Exemple #1
0
 // -------------------------------------------------------------------------------
 public void OnClientLoginSuccess(NetworkConnection conn, MsgChatLoginSuccessFromServer msg)
 {
     if (!string.IsNullOrEmpty(msg.userId))
     {
         SetClientChatUser(msg.userId, msg.name);
     }
 }
Exemple #2
0
 // -------------------------------------------------------------------------------
 public void AddChatUser(ChatUser user)
 {
     if (user != null && user.conn != null && !ChatUsers.ContainsKey(user.conn))
     {
         ChatUsers.Add(user.conn, user);
         MsgChatLoginSuccessFromServer msg = new MsgChatLoginSuccessFromServer();
         msg.userId = user.userId;
         msg.name   = user.name;
         user.conn.Send(msg);
     }
 }