internal void ProcessLeaveChatMessage(Node messageFrom, ChatAction action)
{
if (action.RoomName == null || !action.RoomName.StartsWith("#"))
{
return;
}
ChatRoom room = network.GetChatRoom(action.RoomId);
if (room != null)
{
if (room.Users.ContainsKey(messageFrom.NodeID))
{
room.RemoveUser(messageFrom);
network.RaiseLeftChat(messageFrom, room);
if (room.Users.Count == 0)
{
network.RemoveChatRoom(room);
}
}
}
else
{
Core.LoggingService.LogWarning("Received LeaveChat message for unknown room {0}", action.RoomName);
}
}