public WANTEDCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger, TradeHandler MyTradeHandler, Inventory MyInventory, Stats MyStats)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheLogger             = MyLogger;
            this.TheTradeHandler       = MyTradeHandler;
            this.TheInventory          = MyInventory;
            this.TheStats = MyStats;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#wanted",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                if (Settings.IsTradeBot == true)
                {
                    TheHelpCommandHandler.AddCommand("#wanted / #w - see what I am buying");
                    TheHelpCommandHandler.AddCommand("#w - null");
                    TheHelpCommandHandler.AddCommand("#want - null");
                    TheHelpCommandHandler.AddCommand("#buying - null");
                }

                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #2
0
        public PRIZECommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Inventory MyInventory, TradeHandler MyTradeHandler, Stats MyStats, Logger MyLogger, ActorHandler MyActorHandler)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheInventory          = MyInventory;
            this.TheTradeHandler       = MyTradeHandler;
            this.TheStats                  = MyStats;
            this.TheActorHandler           = MyActorHandler;
            this.TheLogger                 = MyLogger;
            this.TheTCPWrapper.GotCommand += new TCPWrapper.GotCommandEventHandler(OnGotCommand);

            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#inv",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                if (Settings.IsTradeBot == true && TheMySqlManager.IGamble())
                {
                    TheHelpCommandHandler.AddCommand("#prize - show my prize list");
                    TheHelpCommandHandler.AddCommand("#prizes - null");
                }
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
                this.TheInventory.GotNewInventoryList += new Inventory.GotNewInventoryListEventHandler(OnGotNewInventoryList);
                this.TheMessageParser.Got_AbortTrade  += new BasicCommunication.MessageParser.Got_AbortTrade_EventHandler(OnGotAbortTrade);
            }
        }
        public PRIZECommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser,HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Inventory MyInventory, TradeHandler MyTradeHandler, Stats MyStats, Logger MyLogger, ActorHandler MyActorHandler)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheInventory = MyInventory;
            this.TheTradeHandler = MyTradeHandler;
            this.TheStats = MyStats;
            this.TheActorHandler = MyActorHandler;
            this.TheLogger = MyLogger;
            this.TheTCPWrapper.GotCommand += new TCPWrapper.GotCommandEventHandler(OnGotCommand);

            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#inv",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                if (Settings.IsTradeBot == true && TheMySqlManager.IGamble())
                {
                    TheHelpCommandHandler.AddCommand("#prize - show my prize list");
                    TheHelpCommandHandler.AddCommand("#prizes - null");
                }
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
                this.TheInventory.GotNewInventoryList += new Inventory.GotNewInventoryListEventHandler(OnGotNewInventoryList);
                this.TheMessageParser.Got_AbortTrade += new BasicCommunication.MessageParser.Got_AbortTrade_EventHandler(OnGotAbortTrade);
            }
        }
Beispiel #4
0
        public BANCommandHandler(HelpCommandHandler MyHelpCommandHandler, TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, AdminHelpCommandHandler MyAminHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
        {
            this.TheTCPWrapper              = MyTCPWrapper;
            this.TheMessageParser           = MyMessageParser;
            this.TheAdminHelpCommandHandler = MyAminHelpCommandHandler;
            this.TheMySqlManager            = MyMySqlManager;
            this.TheLogger             = MyLogger;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#BAN",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheAdminHelpCommandHandler.AddCommand("#ban - ban a player");
                TheAdminHelpCommandHandler.AddCommand("#unban - unban a banned player");
                TheAdminHelpCommandHandler.AddCommand("#banguild / #bg - ban a guild");
                TheAdminHelpCommandHandler.AddCommand("#unbanguild / #ug - unban a banned guild");
                TheAdminHelpCommandHandler.AddCommand("#prefer - give a player preferential rates");
                TheAdminHelpCommandHandler.AddCommand("#preferguild / #pg - give a guild preferential rates");
                TheAdminHelpCommandHandler.AddCommand("#rank - change player's admin level rank");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
                TheHelpCommandHandler.AddCommand("#bg - null");
                TheHelpCommandHandler.AddCommand("#ug - null");
                TheHelpCommandHandler.AddCommand("#pg - null");
            }
        }
        public WANTEDCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger, TradeHandler MyTradeHandler, Inventory MyInventory, Stats MyStats)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheLogger = MyLogger;
            this.TheTradeHandler = MyTradeHandler;
            this.TheInventory = MyInventory;
            this.TheStats = MyStats;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#wanted",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                if (Settings.IsTradeBot == true)
                {
                    TheHelpCommandHandler.AddCommand("#wanted / #w - see what I am buying");
                    TheHelpCommandHandler.AddCommand("#w - null");
                    TheHelpCommandHandler.AddCommand("#want - null");
                    TheHelpCommandHandler.AddCommand("#buying - null");
                }

                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #6
0
        public AFKCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheLogger = MyLogger;

            TheHelpCommandHandler.AddCommand("#automessage: - null");
            TheHelpCommandHandler.AddCommand("#automessage - null");
            TheHelpCommandHandler.AddCommand("#afk - null");
            TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
        }
Beispiel #7
0
        public AFKCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheLogger             = MyLogger;

            TheHelpCommandHandler.AddCommand("#automessage: - null");
            TheHelpCommandHandler.AddCommand("#automessage - null");
            TheHelpCommandHandler.AddCommand("#afk - null");
            TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
        }
Beispiel #8
0
        public TextCommandsHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheLogger             = MyLogger;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#donate",Settings.botid);
            string commands = TheMySqlManager.TextCommandlist(Settings.botid);

            if (commands.Length == 0)
            {
                return;
            }
            string[] commandsarray = commands.Split(' ');
            foreach (string command in commandsarray)
            {
                string paddedcommand = "";
                if (command[0] != '#')
                {
                    paddedcommand = "#";
                }
                paddedcommand = paddedcommand + command;
                if (TheMySqlManager.CheckIfTextCommandIsDisabled(paddedcommand, Settings.botid) == false)
                {
                    string text = TheMySqlManager.TextCommandHelpText(paddedcommand, Settings.botid);
                    TheHelpCommandHandler.AddCommand(paddedcommand + text);
                }
            }
            TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
        }
        public TextCommandsHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheLogger = MyLogger;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#donate",Settings.botid);
            string commands = TheMySqlManager.TextCommandlist(Settings.botid);
            if (commands.Length == 0)
            {
                return;
            }
            string[] commandsarray = commands.Split(' ');
            foreach (string command in commandsarray)
            {
                string paddedcommand = "";
                if (command[0] != '#')
                    paddedcommand = "#";
                paddedcommand = paddedcommand + command;
                if (TheMySqlManager.CheckIfTextCommandIsDisabled(paddedcommand, Settings.botid) == false)
                {
                    string text = TheMySqlManager.TextCommandHelpText(paddedcommand, Settings.botid);
                    TheHelpCommandHandler.AddCommand(paddedcommand + text);
                }

            }
            TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
        }
Beispiel #10
0
        //private bool CommandIsDisabled;

        public RetradeCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, ActorHandler MyActorHandler, TradeHandler MyTradeHandler)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheActorHandler       = MyActorHandler;
            this.TheTradeHandler       = MyTradeHandler;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#pm",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#retrade / #r - Reinitialise trade");
                TheHelpCommandHandler.AddCommand("#r - null");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
        //private bool CommandIsDisabled;
        public RetradeCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, ActorHandler MyActorHandler, TradeHandler MyTradeHandler)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheActorHandler = MyActorHandler;
            this.TheTradeHandler = MyTradeHandler;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#pm",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#retrade / #r - Reinitialise trade");
                TheHelpCommandHandler.AddCommand("#r - null");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #12
0
        public LOCCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheLogger             = MyLogger;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#loc",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#loc / #l - get my location");
                TheHelpCommandHandler.AddCommand("#l - null");
                TheHelpCommandHandler.AddCommand("#location - null");
                TheHelpCommandHandler.AddCommand("#lo - null");
                TheHelpCommandHandler.AddCommand("#where - null");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #13
0
        public LOCCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser,HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheLogger = MyLogger;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#loc",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#loc / #l - get my location");
                TheHelpCommandHandler.AddCommand("#l - null");
                TheHelpCommandHandler.AddCommand("#location - null");
                TheHelpCommandHandler.AddCommand("#lo - null");
                TheHelpCommandHandler.AddCommand("#where - null");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #14
0
        public BUYCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger, TradeHandler MyTradeHandler)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheLogger             = MyLogger;
            this.TheTradeHandler       = MyTradeHandler;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#buy",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                if (Settings.IsTradeBot == true)
                {
                    TheHelpCommandHandler.AddCommand("#buy / #b - buy something from me");
                    TheHelpCommandHandler.AddCommand("#b - null");
                    TheHelpCommandHandler.AddCommand("#byt - null");
                }
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #15
0
        public BUYCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser,HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger, TradeHandler MyTradeHandler)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheLogger = MyLogger;
            this.TheTradeHandler = MyTradeHandler;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#buy",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                if (Settings.IsTradeBot == true)
                {
                    TheHelpCommandHandler.AddCommand("#buy / #b - buy something from me");
                    TheHelpCommandHandler.AddCommand("#b - null");
                    TheHelpCommandHandler.AddCommand("#byt - null");
                }
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #16
0
        public OpenStorage(HelpCommandHandler MyHelpCommandHandler, TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, MySqlManager MyMySqlManager, ActorHandler MyActorHandler,AdminHelpCommandHandler MyAdminHelpCommandHandler)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMySqlManager = MyMySqlManager;
            this.TheActorHandler = MyActorHandler;
            this.TheMessageParser = MyMessageParser;
            this.TheAdminHelpCommandHandler = MyAdminHelpCommandHandler;
            this.TheHelpCommandHandler = MyHelpCommandHandler;

            TheAdminHelpCommandHandler.AddCommand("#openstorage / #os - Open storage");
            TheHelpCommandHandler.AddCommand("#os - null");
            TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
        }
Beispiel #17
0
        public OpenStorage(HelpCommandHandler MyHelpCommandHandler, TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, MySqlManager MyMySqlManager, ActorHandler MyActorHandler, AdminHelpCommandHandler MyAdminHelpCommandHandler)
        {
            this.TheTCPWrapper              = MyTCPWrapper;
            this.TheMySqlManager            = MyMySqlManager;
            this.TheActorHandler            = MyActorHandler;
            this.TheMessageParser           = MyMessageParser;
            this.TheAdminHelpCommandHandler = MyAdminHelpCommandHandler;
            this.TheHelpCommandHandler      = MyHelpCommandHandler;

            TheAdminHelpCommandHandler.AddCommand("#openstorage / #os - Open storage");
            TheHelpCommandHandler.AddCommand("#os - null");
            TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
        }
        public ISOnlineCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheLogger             = MyLogger;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#loc",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#isonline - tells you the online status of a player");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
        public ISOnlineCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser,HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheLogger = MyLogger;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#loc",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#isonline - tells you the online status of a player");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #20
0
        public ABOUTCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser,HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheLogger = MyLogger;

            TheHelpCommandHandler.AddCommand("#about / #a - displays some information about me");
            TheHelpCommandHandler.AddCommand("#a - null");
            TheHelpCommandHandler.AddCommand("#hi - null");
            TheHelpCommandHandler.AddCommand("#hello - null");
            TheHelpCommandHandler.AddCommand("#g'day - null");
            TheHelpCommandHandler.AddCommand("#ver / #version - display my software version");
            TheHelpCommandHandler.AddCommand("#v - null");
            TheHelpCommandHandler.AddCommand("#version - null");
            TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
        }
Beispiel #21
0
        public ABOUTCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheLogger             = MyLogger;

            TheHelpCommandHandler.AddCommand("#about / #a - displays some information about me");
            TheHelpCommandHandler.AddCommand("#a - null");
            TheHelpCommandHandler.AddCommand("#hi - null");
            TheHelpCommandHandler.AddCommand("#hello - null");
            TheHelpCommandHandler.AddCommand("#g'day - null");
            TheHelpCommandHandler.AddCommand("#ver / #version - display my software version");
            TheHelpCommandHandler.AddCommand("#v - null");
            TheHelpCommandHandler.AddCommand("#version - null");
            TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
        }
Beispiel #22
0
        public AdvHelpCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, PMHandler MyPMHandler, MySqlManager MyMySqlManager, HelpCommandHandler MyHelpCommandHandler)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.ThePMHandler          = MyPMHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#advhelp",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                ThePMHandler.AddCommand("#advhelp");
                ThePMHandler.AddCommand("#ah");
                TheHelpCommandHandler.AddCommand("#advhelp / #ah - displays advanced help");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
        public AdvHelpCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser,PMHandler MyPMHandler, MySqlManager MyMySqlManager,HelpCommandHandler MyHelpCommandHandler)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.ThePMHandler = MyPMHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#advhelp",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                ThePMHandler.AddCommand("#advhelp");
                ThePMHandler.AddCommand("#ah");
                TheHelpCommandHandler.AddCommand("#advhelp / #ah - displays advanced help");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #24
0
 public ELTCCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
 {
     this.TheTCPWrapper = MyTCPWrapper;
     this.TheMessageParser = MyMessageParser;
     this.TheHelpCommandHandler = MyHelpCommandHandler;
     this.TheMySqlManager = MyMySqlManager;
     this.TheLogger = MyLogger;
     TheHelpCommandHandler.AddCommand("#thx - null");
     TheHelpCommandHandler.AddCommand("#thy - null");
     TheHelpCommandHandler.AddCommand("#thank - null");
     TheHelpCommandHandler.AddCommand("#thanks - null");
     TheHelpCommandHandler.AddCommand("#ty - null");
     TheHelpCommandHandler.AddCommand("#tyvm - null");
     TheHelpCommandHandler.AddCommand("#thanx - null");
     TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
 }
Beispiel #25
0
 public ELTCCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger)
 {
     this.TheTCPWrapper         = MyTCPWrapper;
     this.TheMessageParser      = MyMessageParser;
     this.TheHelpCommandHandler = MyHelpCommandHandler;
     this.TheMySqlManager       = MyMySqlManager;
     this.TheLogger             = MyLogger;
     TheHelpCommandHandler.AddCommand("#thx - null");
     TheHelpCommandHandler.AddCommand("#thy - null");
     TheHelpCommandHandler.AddCommand("#thank - null");
     TheHelpCommandHandler.AddCommand("#thanks - null");
     TheHelpCommandHandler.AddCommand("#ty - null");
     TheHelpCommandHandler.AddCommand("#tyvm - null");
     TheHelpCommandHandler.AddCommand("#thanx - null");
     TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
 }
Beispiel #26
0
        public INVRCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Inventory MyInventory, TradeHandler MyTradeHandler, Stats MyStats)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheInventory          = MyInventory;
            this.TheTradeHandler       = MyTradeHandler;
            this.TheStats = MyStats;

            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#inv",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#invr - inventory without item numbers");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #27
0
        public INVRCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser,HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Inventory MyInventory, TradeHandler MyTradeHandler, Stats MyStats)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheInventory = MyInventory;
            this.TheTradeHandler = MyTradeHandler;
            this.TheStats = MyStats;

            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#inv",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#invr - inventory without item numbers");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
        public ReserveCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser,HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Inventory MyInventory, TradeHandler MyTradeHandler, Stats MyStats, Storage MyStorage)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheInventory = MyInventory;
            this.TheTradeHandler = MyTradeHandler;
            this.TheStats = MyStats;
            this.TheStorage = MyStorage;

            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#inv",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#reserve - manipulate reserved items");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
        public ReserveCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Inventory MyInventory, TradeHandler MyTradeHandler, Stats MyStats, Storage MyStorage)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheInventory          = MyInventory;
            this.TheTradeHandler       = MyTradeHandler;
            this.TheStats   = MyStats;
            this.TheStorage = MyStorage;

            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#inv",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#reserve - manipulate reserved items");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #30
0
        public GAMBLECommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger, TradeHandler MyTradeHandler, Inventory MyInventory)
        {
            this.TheTCPWrapper                = MyTCPWrapper;
            this.TheMessageParser             = MyMessageParser;
            this.TheHelpCommandHandler        = MyHelpCommandHandler;
            this.TheMySqlManager              = MyMySqlManager;
            this.TheLogger                    = MyLogger;
            this.TheTradeHandler              = MyTradeHandler;
            this.TheInventory                 = MyInventory;
            this.TheTCPWrapper.GotCommand    += new TCPWrapper.GotCommandEventHandler(OnGotCommand);
            TheInventory.GotNewInventoryList += new Inventory.GotNewInventoryListEventHandler(TheInventory_GotNewInventoryList);
            TheMessageParser.Got_AbortTrade  += new cs_elbot.BasicCommunication.MessageParser.Got_AbortTrade_EventHandler(TheMessageParser_Got_AbortTrade);
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#donate",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#gamble - gamble with me for a prize.");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
        public GAMBLECommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Logger MyLogger, TradeHandler MyTradeHandler, Inventory MyInventory)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheLogger = MyLogger;
            this.TheTradeHandler = MyTradeHandler;
            this.TheInventory = MyInventory;
            this.TheTCPWrapper.GotCommand += new TCPWrapper.GotCommandEventHandler(OnGotCommand);
            TheInventory.GotNewInventoryList += new Inventory.GotNewInventoryListEventHandler(TheInventory_GotNewInventoryList);
            TheMessageParser.Got_AbortTrade += new cs_elbot.BasicCommunication.MessageParser.Got_AbortTrade_EventHandler(TheMessageParser_Got_AbortTrade);
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#donate",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                TheHelpCommandHandler.AddCommand("#gamble - gamble with me for a prize.");
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
        public INVLISTCommandHandler(HelpCommandHandler MyHelpCommandHandler, TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, AdvHelpCommandHandler MyAdvHelpCommandHandler, MySqlManager MyMySqlManager, Inventory MyInventory, TradeHandler MyTradeHandler, Stats MyStats)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheAdvHelpCommandHandler = MyAdvHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheInventory = MyInventory;
            this.TheTradeHandler = MyTradeHandler;
            this.TheStats = MyStats;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#invlist",Settings.botid);

            //if (CommandIsDisabled == false)
            {
            //                if (Settings.IsTradeBot == true)
                {
                    TheAdvHelpCommandHandler.AddCommand("#invlist / #il - lists my entire inventory");
                    TheHelpCommandHandler.AddCommand("#il - null");
                }
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
        public INVLISTCommandHandler(HelpCommandHandler MyHelpCommandHandler, TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, AdvHelpCommandHandler MyAdvHelpCommandHandler, MySqlManager MyMySqlManager, Inventory MyInventory, TradeHandler MyTradeHandler, Stats MyStats)
        {
            this.TheTCPWrapper            = MyTCPWrapper;
            this.TheMessageParser         = MyMessageParser;
            this.TheAdvHelpCommandHandler = MyAdvHelpCommandHandler;
            this.TheMySqlManager          = MyMySqlManager;
            this.TheInventory             = MyInventory;
            this.TheTradeHandler          = MyTradeHandler;
            this.TheStats = MyStats;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#invlist",Settings.botid);

            //if (CommandIsDisabled == false)
            {
//                if (Settings.IsTradeBot == true)
                {
                    TheAdvHelpCommandHandler.AddCommand("#invlist / #il - lists my entire inventory");
                    TheHelpCommandHandler.AddCommand("#il - null");
                }
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #34
0
        public INVCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser,HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Inventory MyInventory, TradeHandler MyTradeHandler, Stats MyStats)
        {
            this.TheTCPWrapper = MyTCPWrapper;
            this.TheMessageParser = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager = MyMySqlManager;
            this.TheInventory = MyInventory;
            this.TheTradeHandler = MyTradeHandler;
            this.TheStats = MyStats;

            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#inv",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                if (Settings.IsTradeBot == true)
                {
                    TheHelpCommandHandler.AddCommand("#inventory / #inv / #i - show what I am selling");
                    TheHelpCommandHandler.AddCommand("#invmembers / #im - member rates");
                    TheHelpCommandHandler.AddCommand("#inv - null");
                    TheHelpCommandHandler.AddCommand("#i - null");
                    TheHelpCommandHandler.AddCommand("#inb - null");
                    TheHelpCommandHandler.AddCommand("#sell - null");
                    TheHelpCommandHandler.AddCommand("#selling - null");
                    TheHelpCommandHandler.AddCommand("#im - null");
                    TheHelpCommandHandler.AddCommand("#invmember - null");
                    TheHelpCommandHandler.AddCommand("#invmemver - null");
                    TheHelpCommandHandler.AddCommand("#invmemvers - null");
                }
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }
Beispiel #35
0
        public INVCommandHandler(TCPWrapper MyTCPWrapper, BasicCommunication.MessageParser MyMessageParser, HelpCommandHandler MyHelpCommandHandler, MySqlManager MyMySqlManager, Inventory MyInventory, TradeHandler MyTradeHandler, Stats MyStats)
        {
            this.TheTCPWrapper         = MyTCPWrapper;
            this.TheMessageParser      = MyMessageParser;
            this.TheHelpCommandHandler = MyHelpCommandHandler;
            this.TheMySqlManager       = MyMySqlManager;
            this.TheInventory          = MyInventory;
            this.TheTradeHandler       = MyTradeHandler;
            this.TheStats = MyStats;

            //this.CommandIsDisabled = MyMySqlManager.CheckIfCommandIsDisabled("#inv",Settings.botid);

            //if (CommandIsDisabled == false)
            {
                if (Settings.IsTradeBot == true)
                {
                    TheHelpCommandHandler.AddCommand("#inventory / #inv / #i - show what I am selling");
                    TheHelpCommandHandler.AddCommand("#invmembers / #im - member rates");
                    TheHelpCommandHandler.AddCommand("#inv - null");
                    TheHelpCommandHandler.AddCommand("#i - null");
                    TheHelpCommandHandler.AddCommand("#inb - null");
                    TheHelpCommandHandler.AddCommand("#sell - null");
                    TheHelpCommandHandler.AddCommand("#selling - null");
                    TheHelpCommandHandler.AddCommand("#im - null");
                    TheHelpCommandHandler.AddCommand("#invmember - null");
                    TheHelpCommandHandler.AddCommand("#invmemver - null");
                    TheHelpCommandHandler.AddCommand("#invmemvers - null");
                }
                TheMessageParser.Got_PM += new BasicCommunication.MessageParser.Got_PM_EventHandler(OnGotPM);
            }
        }