Пример #1
0
 public override void OnLoad(BotShell bot)
 {
     this.BotName = bot.ToString();
     bot.Events.ChannelMessageEvent             += new ChannelMessageHandler(Events_ChannelMessageEvent);
     bot.Events.PrivateChannelMessageEvent      += new PrivateChannelMessageHandler(Events_PrivateChannelMessageEvent);
     bot.Events.PrivateMessageEvent             += new PrivateMessageHandler(Events_PrivateMessageEvent);
     bot.SlaveEvents.PrivateMessageEvent        += new PrivateMessageSlaveHandler(SlaveEvents_PrivateMessageEvent);
     bot.Events.UserJoinChannelEvent            += new UserJoinChannelHandler(Events_UserJoinChannelEvent);
     bot.Events.UserLeaveChannelEvent           += new UserLeaveChannelHandler(Events_UserLeaveChannelEvent);
     bot.Events.UserLogonEvent                  += new UserLogonHandler(Events_UserLogonEvent);
     bot.Events.UserLogoffEvent                 += new UserLogoffHandler(Events_UserLogoffEvent);
     bot.Events.BotStateChangedEvent            += new BotStateChangedHandler(Events_BotStateChangedEvent);
     bot.SlaveEvents.PrivateChannelMessageEvent += new PrivateChannelMessageSlaveHandler(SlaveEvents_PrivateChannelMessageEvent);
 }