mirror of
https://github.com/reactos/reactos.git
synced 2025-06-14 13:08:31 +00: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:
parent
b2a074adbf
commit
197cc3f634
3 changed files with 99 additions and 8 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue