private void Connector_LogoutEvent(object sender, User e) { UserSocket userSocket = GetUserSocket(e.UserID); if (userSocket == null) { ShowMessage("要注销的用户不存在"); return; } LoginedUserList.Remove(userSocket); UserQuitEvent?.Invoke(this, userSocket.ToUser()); foreach (UserSocket u in LoginedUserList) { connector.SendUserChange(u, e, CommandType.UserQuit); } }
protected virtual void OnUserQuit(RemoteServer server, ChannelUserEventArgs args) { UserQuitEvent?.Invoke(server, args); }