private void OnIRCReplyUserList(string[] tokens, string message) { m_lastStatusMessage = message; string[] list = message.Split(new char[] { ' ' }); string target = tokens[4]; int i = list.Length; while (--i > -1) { if (list[i] == "" || list[i] == " " || list[i] == null) { continue; } IRCJoinEvent name = new IRCJoinEvent(); IRCUser user = new IRCUser(); user.Nick = list[i]; name.User = user; name.Channel = target; name.OnJoin = false; DispatchEvent(name); } DispatchEvent(new IRCEvent(IRCEvent.EVENT_STATUSMESSAGE)); }
private void JoinEventHandler(IRCEvent e) { IRCJoinEvent joinEvent = (IRCJoinEvent)e; string properChannelName = "#" + m_ircChannelName; LogText("[" + joinEvent.User.Nick + " joined channel" + joinEvent.Channel + "]"); // Ignore the redundant ops user join if (joinEvent.User.Nick[0] != '@') { if (joinEvent.User.Nick == m_ircNick) { if (m_state == eState.joining_game_channel && joinEvent.Channel == properChannelName) { SetState(eState.in_game_channel); // Notify other players with a game event to ping the server state since we joined PostThisPlayerJoinedGameChannel(); } } if (joinEvent.Channel == properChannelName) { OutputText(joinEvent.User.Nick + " joined the game"); } } }
private void OnIRCUserJoin(string[] tokens) { IRCJoinEvent join = new IRCJoinEvent(); join.User = IRCUser.GetUserFromAddress(tokens[0].Substring(1)); join.Channel = tokens[2]; if (join.User.Nick == m_nickName) { m_socket.SendString("MODE " + join.Channel); } DispatchEvent(join); }
private void OnIRCReplyUserList(string[] tokens, string message) { m_lastStatusMessage = message; string[] list = message.Split(new char[] { ' ' }); string target = tokens[4]; int i = list.Length; while (--i > -1) { if (list[i] == "" || list[i] == " " || list[i] == null) continue; IRCJoinEvent name = new IRCJoinEvent(); IRCUser user = new IRCUser(); user.Nick = list[i]; name.User = user; name.Channel = target; name.OnJoin = false; DispatchEvent(name); } DispatchEvent(new IRCEvent(IRCEvent.EVENT_STATUSMESSAGE)); }