protected void HandleWhois(IRCMessage sIRCMessage) { if(sIRCMessage.Info.Length < 5) { sSendMessage.SendChatMessage(sIRCMessage, sLManager.GetWarningText("NoWhoisName", sIRCMessage.Channel, sIRCMessage.ServerName)); return; } string nick = sIRCMessage.Info[4].ToLower(); if(WhoisList.ContainsKey(nick)) Monitor.Enter(WhoisList[nick].Lock); var whois = new Whois(); whois.Channel = sIRCMessage.Channel; whois.Message = string.Empty; whois.Online = false; Monitor.Enter(whois.Lock); if(WhoisList.ContainsKey(nick)) WhoisList.Remove(nick); WhoisList.Add(nick, whois); sSender.Whois(nick); }
protected void HandleWhois(IRCMessage sIRCMessage) { if (sIRCMessage.Info.Length < 5) { sSendMessage.SendChatMessage(sIRCMessage, sLManager.GetWarningText("NoWhoisName", sIRCMessage.Channel, sIRCMessage.ServerName)); return; } string nick = sIRCMessage.Info[4].ToLower(); if (WhoisList.ContainsKey(nick)) { Monitor.Enter(WhoisList[nick].Lock); } var whois = new Whois(); whois.Channel = sIRCMessage.Channel; whois.Message = string.Empty; whois.Online = false; Monitor.Enter(whois.Lock); if (WhoisList.ContainsKey(nick)) { WhoisList.Remove(nick); } WhoisList.Add(nick, whois); sSender.Whois(nick); }