Example #1
0
        private void Script_TEST_DNS(string line)
        {
            string         svar = Get_String(ref line);
            ScriptVariable var  = Get_Var(svar);

            string addy = Get_String(ref line);

            bool success = Util.TestDNS(addy);

            if (success)
            {
                switch (var.Type)
                {
                case Var_Types.INT:
                    var.Value = 1L;
                    break;

                case Var_Types.DOUBLE:
                    var.Value = 1D;
                    break;

                case Var_Types.STRING:
                    var.Value = "1";
                    break;
                }
            }
            else
            {
                switch (var.Type)
                {
                case Var_Types.INT:
                    var.Value = 0L;
                    break;

                case Var_Types.DOUBLE:
                    var.Value = 0D;
                    break;

                case Var_Types.STRING:
                    var.Value = "0";
                    break;
                }
            }
        }