Esempio n. 1
0
        static void Main(string[] args)
        {
            string channel = args[0];
            string rnick   = args[1];
            string rmsg    = args[2];

            try
            {
                ObsidianFunctions.Functions ObsidFunc = new ObsidianFunctions.Functions();
                string query    = rmsg.Remove(0, 11).Replace("\0", "").Trim();
                bool   nickuser = ObsidFunc.isActiveUser(rnick);
                if (rnick == ObsidFunc.ownernick() && nickuser == true)
                {
                    Console.WriteLine("PRIVMSG " + channel + " :" + ObsidFunc.CSCompile(query));
                }
                else
                {
                    Console.WriteLine("PRIVMSG " + channel + " :Insufficient Permissions!");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("PRIVMSG " + channel + " :" + ex.ToString());
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            string channel = args[0];
            string rnick = args[1];
            string rmsg = args[2];
            try
            {
            ObsidianFunctions.Functions ObsidFunc = new ObsidianFunctions.Functions();
            string query = rmsg.Remove(0, 11).Replace("\0", "").Trim();
            bool nickuser = ObsidFunc.isActiveUser(rnick);
            if (rnick == ObsidFunc.ownernick() && nickuser == true)
            {
            string[] findFind = Regex.Split(query, "find(");
            string findStrings = findFind[1].Split(')')[0];
            string[] find = findStrings.Split(';');
            string[] replaceFind = Regex.Split(query, "replace(");
            string replaceStrings = replaceFind[1].Split(')')[0];
            string[] replace = replaceStrings.Split(';');
            string[] batchFind = Regex.Split(query, "batch(");
            string batchStrings = batchFind[1].Split(')')[0];
            Console.WriteLine("PRIVMSG " + channel + " :" + ObsidFunc.batchExec(batchStrings, find, replace));

            }
            else
            {
            Console.WriteLine("PRIVMSG " + channel + " :Insufficient Permissions!");
            }
            }
            catch (Exception ex)
            {
            Console.WriteLine("PRIVMSG " + channel + " :" + ex.ToString());
            }
        }
Esempio n. 3
0
 static void Main(string[] args)
 {
     string channel = args[0];
     string rnick = args[1];
     string rmsg = args[2];
     try
     {
     ObsidianFunctions.Functions ObsidFunc = new ObsidianFunctions.Functions();
         string query = rmsg.Remove(0, 7);
                     bool nickuser = ObsidFunc.isActiveUser(rnick);
                     if (rnick == ObsidFunc.ownernick() && nickuser == true)
                     {
                         ObsidFunc.batch(query);
                         Console.WriteLine("PRIVMSG " + channel + " :Success!");
                     }
                     else
                     {
                         Console.WriteLine("PRIVMSG " + channel + " :Insufficient Permissions!");
                     }
     }
     catch (Exception ex)
     {
         Console.WriteLine("PRIVMSG " + channel + " :" + ex.ToString());
     }
 }
Esempio n. 4
0
 static void Main(string[] args)
 {
     string channel = args[0];
     string rnick = args[1];
     string rmsg = args[2];
     try
     {
     ObsidianFunctions.Functions ObsidFunc = new ObsidianFunctions.Functions();
                     if (rnick == ObsidFunc.ownernick() && ObsidFunc.isActiveUser(rnick) == true)
                     {
                         string query = rmsg.Remove(0, 9).Trim();
                         string[] qSplit = query.Split(' ');
                         string file = qSplit[0].Remove(0, 1) + ".exe";
                         Console.WriteLine(ObsidFunc.exeExec(file, channel, rnick, query));
                     }
     }
     catch (Exception ex)
     {
         Console.WriteLine("PRIVMSG " + channel + " :" + ex.ToString());
     }
 }
Esempio n. 5
0
        static void Main(string[] args)
        {
            string channel = args[0];
            string rnick   = args[1];
            string rmsg    = args[2];

            try
            {
                ObsidianFunctions.Functions ObsidFunc = new ObsidianFunctions.Functions();
                if (rnick == ObsidFunc.ownernick() && ObsidFunc.isActiveUser(rnick) == true)
                {
                    string   query  = rmsg.Remove(0, 9).Trim();
                    string[] qSplit = query.Split(' ');
                    string   file   = qSplit[0].Remove(0, 1) + ".exe";
                    Console.WriteLine(ObsidFunc.exeExec(file, channel, rnick, query));
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("PRIVMSG " + channel + " :" + ex.ToString());
            }
        }