Example #1
0
        public InputBoxFilters(IAppControls app)
        {
            this.app = app;
            InputBox inputBox   = app.InputBox;
            Quirk    connection = app.Connection;

            inputBox.Message += new InputBox.MessageDel(PrivmsgCurrentChannel);
            inputBox.Command += (cmd, arg) => {
                switch (cmd)
                {
                // arg is a channel.
                case "j":
                    connection.Message("JOIN " + arg); break;

                case "raw":
                    connection.Message(arg); break;

                // arg is a quit message.
                case "q":
                    connection.Dispose(arg); break;

                case "me":
                    connection.Message(PRIVMSG, app.CurrentChannel, arg);
                    break;
                }
            };
        }