void Events_BotStateChangedEvent(BotShell bot, BotStateChangedArgs e) { if (e.State == 0) { bot.SendOrganizationMessage(bot.ColorHighlight + bot.Character + " has connected!"); } }
private void Events_BotStateChangedEvent(BotShell bot, BotStateChangedArgs e) { if (e.IsSlave) { if (e.State == BotState.Connected) { this.Output("State", String.Format("[Slave Bot] {0} has connected", e.Character)); } else if (e.State == BotState.Disconnected) { this.Output("State", String.Format("[Slave Bot] {0} has disconnected", e.Character)); } } else { if (e.State == BotState.Connected) { this.Output("State", String.Format("[Main Bot] {0} has connected", e.Character)); } else if (e.State == BotState.Disconnected) { this.Output("State", String.Format("[Main Bot] {0} has disconnected", e.Character)); } } }
private void BotStateChangedEvent(BotShell sender, BotStateChangedArgs e) { if (e.State != BotState.Connected) { lock (this.OnlineFriends) { List <UInt32> remove = new List <UInt32>(); foreach (KeyValuePair <UInt32, Friend> kvp in this.OnlineFriends) { if (e.IsSlave) { if (kvp.Value.OnSlave && kvp.Value.BotID == e.ID) { remove.Add(kvp.Value.UserID); } } else if (!kvp.Value.OnSlave) { remove.Add(kvp.Value.UserID); } } foreach (UInt32 userID in remove) { lock (this.OfflineFriends) { this.OfflineFriends.Add(userID, this.OnlineFriends[userID]); this.OnlineFriends.Remove(userID); } } } } }
internal void OnBotStateChanged(BotShell bot, BotStateChangedArgs e) { if (this.BotStateChangedEvent != null) { try { this.BotStateChangedEvent(bot, e); } catch { } } }
private void Events_BotStateChangedEvent(BotShell bot, BotStateChangedArgs e) { if (e.IsSlave) { return; } if (e.State == BotState.Connected) { bot.SendPrivateChannelMessage(bot.ColorHighlight + "System »» Online"); } }
private void Events_BotStateChangedEvent(BotShell bot, BotStateChangedArgs e) { if (e.IsSlave) { return; } if (e.State != BotState.Connected) { return; } this._timer.Start(); }
private void Events_BotStateChangedEvent(BotShell sender, BotStateChangedArgs e) { }