Exemple #1
0
        public static void OnUsernameUpdate(dynamic message, SyncService s, SyncRoom room)
        {
            s.Nickname = (string)message.Nickname;

            //notify of nickname change
            var res1 = new
            {
                CommandType = CommandType.SETUSERNICKNAME.Value,
                Nickname    = s.Nickname
            };

            s.SendMessage(JsonConvert.SerializeObject(res1));

            //notify rest of room of nickname change
            room.SendUserList();
        }
Exemple #2
0
 public static void OnStatusUpdate(dynamic message, SyncService s, SyncRoom room)
 {
     s.status = (UserStatus)message.Status;
     room.SendUserList();
 }
Exemple #3
0
 public static void OnUserListRequested(dynamic message, SyncService s, SyncRoom room)
 {
     room.SendUserList();
 }