- Changed ghost command (using NickServ)
authorPierre Schweitzer <pierre@reactos.org>
Sun, 3 Aug 2008 21:34:12 +0000 (21:34 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 3 Aug 2008 21:34:12 +0000 (21:34 +0000)
- Ghost before registering

svn path=/trunk/; revision=35091

irc/TechBot/TechBot.IRCLibrary/IRC.cs
irc/TechBot/TechBot.IRCLibrary/IrcClient.cs

index 0fee5f2..f125ece 100644 (file)
@@ -17,7 +17,7 @@ namespace TechBot.IRCLibrary
                public const string PRIVMSG = "PRIVMSG";\r
                public const string USER = "USER";\r
                public const string PASS = "PASS";\r
-               public const string GHOST = "NS GHOST";\r
+               public const string GHOST = "MSG NICKSERV GHOST";\r
 \r
                public const string RPL_NAMREPLY = "353";\r
                public const string RPL_ENDOFNAMES = "366";\r
index 8d07e50..6682bd7 100644 (file)
@@ -637,10 +637,13 @@ namespace TechBot.IRCLibrary
                                throw new ArgumentNullException("nickname", "Nickname cannot be null.");\r
                        firstPingReceived = false;\r
                        if (password != null)\r
+                       {\r
+                               /* First ghost ourself and then register */\r
+                               if (nickname != null)\r
+                                       SendMessage(new IrcMessage(IRC.GHOST, nickname + " " + password));\r
                                SubmitPassword(password);\r
+                       }\r
                        ChangeNick(nickname);\r
-                       /* Before we send our nickname, just ghost it */\r
-                       SendMessage(new IrcMessage(IRC.GHOST, nickname));\r
                        /* OLD: USER <username> <hostname> <servername> <realname> */\r
                        /* NEW: USER <user> <mode> <unused> <realname> */\r
                        SendMessage(new IrcMessage(IRC.USER, String.Format("{0} 0 * :{1}",\r