Example #1
0
        public override void HandleResponse(JObject response)
        {
            Tebex.Instance.information.id             = (int)response["account"]["id"];
            Tebex.Instance.information.domain         = (string)response["account"]["domain"];
            Tebex.Instance.information.gameType       = (string)response["account"]["game_type"];
            Tebex.Instance.information.name           = (string)response["account"]["name"];
            Tebex.Instance.information.currency       = (string)response["account"]["currency"]["iso_4217"];
            Tebex.Instance.information.currencySymbol = (string)response["account"]["currency"]["symbol"];
            Tebex.Instance.information.serverId       = (int)response["server"]["id"];
            Tebex.Instance.information.serverName     = (string)response["server"]["name"];

            Tebex.logWarning("Your secret key has been validated! Webstore Name: " + Tebex.Instance.information.name);
            Context.Respond("Your secret key has been validated! Webstore Name: " + Tebex.Instance.information.name);
        }
Example #2
0
 public void TebexForcecheck()
 {
     Tebex.logWarning("Checking for commands to be executed...");
     try
     {
         TebexApiClient wc = new TebexApiClient();
         wc.setPlugin(Tebex.Instance);
         wc.DoGet("queue", this);
         wc.Dispose();
     }
     catch (TimeoutException)
     {
         Tebex.logWarning("Timeout!");
     }
 }
Example #3
0
        public void TebexSecret(string secret)
        {
            Tebex.Instance.Config.Secret = secret;

            try
            {
                TebexApiClient wc = new TebexApiClient();
                wc.setPlugin(Tebex.Instance);
                wc.DoGet("information", this);
                wc.Dispose();
            }
            catch (TimeoutException)
            {
                Tebex.logWarning("Timeout!");
            }
        }