From c17bb07ec34b749f305afc235ed4a1f4c86c37fe Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 3 Aug 2008 21:34:12 +0000 Subject: [PATCH] - Changed ghost command (using NickServ) - Ghost before registering svn path=/trunk/; revision=35091 --- irc/TechBot/TechBot.IRCLibrary/IRC.cs | 2 +- irc/TechBot/TechBot.IRCLibrary/IrcClient.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/irc/TechBot/TechBot.IRCLibrary/IRC.cs b/irc/TechBot/TechBot.IRCLibrary/IRC.cs index 0fee5f29ac0..f125ecea6d1 100644 --- a/irc/TechBot/TechBot.IRCLibrary/IRC.cs +++ b/irc/TechBot/TechBot.IRCLibrary/IRC.cs @@ -17,7 +17,7 @@ namespace TechBot.IRCLibrary public const string PRIVMSG = "PRIVMSG"; public const string USER = "USER"; public const string PASS = "PASS"; - public const string GHOST = "NS GHOST"; + public const string GHOST = "MSG NICKSERV GHOST"; public const string RPL_NAMREPLY = "353"; public const string RPL_ENDOFNAMES = "366"; diff --git a/irc/TechBot/TechBot.IRCLibrary/IrcClient.cs b/irc/TechBot/TechBot.IRCLibrary/IrcClient.cs index 8d07e50e5d8..6682bd7c4e4 100644 --- a/irc/TechBot/TechBot.IRCLibrary/IrcClient.cs +++ b/irc/TechBot/TechBot.IRCLibrary/IrcClient.cs @@ -637,10 +637,13 @@ namespace TechBot.IRCLibrary throw new ArgumentNullException("nickname", "Nickname cannot be null."); firstPingReceived = false; if (password != null) + { + /* First ghost ourself and then register */ + if (nickname != null) + SendMessage(new IrcMessage(IRC.GHOST, nickname + " " + password)); SubmitPassword(password); + } ChangeNick(nickname); - /* Before we send our nickname, just ghost it */ - SendMessage(new IrcMessage(IRC.GHOST, nickname)); /* OLD: USER */ /* NEW: USER */ SendMessage(new IrcMessage(IRC.USER, String.Format("{0} 0 * :{1}",