public void SendNickChange(string oldNick, string newNick) { var temp = Clients[oldNick]; Clients.Remove(oldNick); Clients.Add(newNick, temp); if (OperClients.ContainsKey(oldNick)) { temp = OperClients[oldNick]; OperClients.Remove(oldNick); OperClients.Add(newNick, temp); } if (BannedClients.ContainsKey(oldNick)) { temp = BannedClients[oldNick]; BannedClients.Remove(oldNick); BannedClients.Add(newNick, temp); } foreach (var client in Clients.Values) { client.SendNickChange(Name, oldNick, newNick); } }
public void SendQuit(BroadcastChatClient cl, string reason) { Clients.Remove(cl.Nick); if (OperClients.ContainsKey(cl.Nick)) { OperClients.Remove(cl.Nick); } foreach (var client in Clients.Values) { client.SendQuit(Name, cl.Nick, reason); } }
public void SendLeave(string nick, string reason) { foreach (var client in Clients.Values) { client.SendLeave(Name, nick, reason); } Clients.Remove(nick); if (OperClients.ContainsKey(nick)) { OperClients.Remove(nick); } }
public void SendKick(string kicker, BroadcastChatClient kicked) { foreach (var client in Clients.Values) { client.SendKick(Name, kicked.Nick, kicker); } Clients.Remove(kicked.Nick); if (OperClients.ContainsKey(kicked.Nick)) { OperClients.Remove(kicked.Nick); } kicked.Channels.Remove(Name); }