mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -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() {
|
||||
string nickServ = ServerConfig.IRCNickServName;
|
||||
if (nickServ.Length == 0) return;
|
||||
|
||||
if (ServerConfig.IRCIdentify && ServerConfig.IRCPassword.Length > 0) {
|
||||
Logger.Log(LogType.IRCCActivity, "Identifying with NickServ");
|
||||
bot.connection.Sender.PrivateMessage("NickServ", "IDENTIFY " + ServerConfig.IRCPassword);
|
||||
Logger.Log(LogType.IRCCActivity, "Identifying with " + nickServ);
|
||||
bot.connection.Sender.PrivateMessage(nickServ, "IDENTIFY " + ServerConfig.IRCPassword);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,6 +154,8 @@ namespace MCGalaxy {
|
||||
public static string IRCOpChannels = "#changethistoo";
|
||||
[ConfigBool("irc-identify", "IRC bot", 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)]
|
||||
public static string IRCPassword = "";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user