コード例 #1
0
ファイル: Account.cs プロジェクト: TheFirewall/xCoreSplit
 public void Auth(xPlayer player, params string[] password)
 {
     if (player.PlayerData.password != null)
     {
         if (player.PlayerData.password == GetPasswordHash(string.Join("", password)))
         {
         }
         else
         {
             player.SendMessage(player.PlayerData.lang.get("authme.login.error.password"));
         }
     }
     else
     {
         player.SendMessage(player.PlayerData.lang.get("authme.login.error.noaccount"));
     }
 }
コード例 #2
0
ファイル: Account.cs プロジェクト: TheFirewall/xCoreSplit
        public void Reg(xPlayer player, params string[] password)
        {
            string Name = player.Username;

            if (player.PlayerData.isAuth)
            {
                return;
            }
            Dictionary <string, string> userdata = Query("SELECT user_low FROM userdata WHERE user_low='" + player.Username.ToLower() + "'");

            if (userdata == null)
            {
                //Register code
            }
            else
            {
                player.SendMessage(player.PlayerData.lang.get("authme.register.error.registered"));
            }
        }