mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 23:33:24 +08:00
Give Techbot the ability to check for and ghost existing bots, then rename itself
svn path=/trunk/; revision=35264
This commit is contained in:
@@ -88,7 +88,15 @@ namespace TechBot.Library
|
||||
m_IrcClient.Connect(hostname, port);
|
||||
|
||||
m_IrcClient.Register(botname, password, null);
|
||||
Console.WriteLine("Registered as {0}...", botname);
|
||||
Console.WriteLine("Registered as {0}...", m_IrcClient.Nickname);
|
||||
|
||||
/* Did we get the nick we wanted? */
|
||||
if (m_IrcClient.Nickname != botname)
|
||||
{
|
||||
/* there must have been an existing one, kill it */
|
||||
m_IrcClient.GhostNick(botname, password);;
|
||||
}
|
||||
|
||||
JoinChannels();
|
||||
|
||||
while (!isStopped)
|
||||
@@ -279,7 +287,7 @@ namespace TechBot.Library
|
||||
injectMessage,
|
||||
GetMessageSource(context)));
|
||||
InjectMessage(context,
|
||||
injectMessage);
|
||||
injectMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user