mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Allow using custom nickserv for IRC bot (Thanks aezarkones)
This commit is contained in:
parent
fe67055701
commit
efd995390f
@ -297,9 +297,12 @@ namespace MCGalaxy.Network {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Authenticate() {
|
void Authenticate() {
|
||||||
|
string nickServ = ServerConfig.IRCNickServName;
|
||||||
|
if (nickServ.Length == 0) return;
|
||||||
|
|
||||||
if (ServerConfig.IRCIdentify && ServerConfig.IRCPassword.Length > 0) {
|
if (ServerConfig.IRCIdentify && ServerConfig.IRCPassword.Length > 0) {
|
||||||
Logger.Log(LogType.IRCCActivity, "Identifying with NickServ");
|
Logger.Log(LogType.IRCCActivity, "Identifying with " + nickServ);
|
||||||
bot.connection.Sender.PrivateMessage("NickServ", "IDENTIFY " + ServerConfig.IRCPassword);
|
bot.connection.Sender.PrivateMessage(nickServ, "IDENTIFY " + ServerConfig.IRCPassword);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,6 +154,8 @@ namespace MCGalaxy {
|
|||||||
public static string IRCOpChannels = "#changethistoo";
|
public static string IRCOpChannels = "#changethistoo";
|
||||||
[ConfigBool("irc-identify", "IRC bot", false)]
|
[ConfigBool("irc-identify", "IRC bot", false)]
|
||||||
public static bool IRCIdentify = false;
|
public static bool IRCIdentify = false;
|
||||||
|
[ConfigString("irc-nickserv-name", "IRC bot", "NickServ", true)]
|
||||||
|
public static string IRCNickServName = "NickServ";
|
||||||
[ConfigString("irc-password", "IRC bot", "", true)]
|
[ConfigString("irc-password", "IRC bot", "", true)]
|
||||||
public static string IRCPassword = "";
|
public static string IRCPassword = "";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user