// EVENT /////////////////////////
 public static void on_player_connected(object data, NetworkPlayer np)
 {
     PurpleNetworkUser newUser = new PurpleNetworkUser (np);
     PurpleServer.UserList.Add (newUser);
 }
Ejemplo n.º 2
0
        private static bool update_user_reference(PurpleAccount user, PurpleNetworkUser pnu, bool authenticated)
        {
            if(pnu != null)
            {
                pnu.UserGUID 			= new Guid(user.guid);
                pnu.UserID 				= user.id;
                pnu.UserType 			= (PurpleNetwork.UserTypes) Enum.Parse(
                                            typeof(PurpleNetwork.UserTypes), user.account_type, true);
                pnu.UserName			= user.username;
                pnu.UserPassword        = user.password;
                pnu.UserToken			= user.token;
                pnu.UserTokenCreated	= user.token_created;

                pnu.UserAuthenticated	= authenticated;
            }
            user.last_seen 				= DateTime.Now;
            return update_database_user (user);
        }