Smuxi.Engine.XmppProtocolManager.CommandHelp C# (CSharp) Method

CommandHelp() public method

public CommandHelp ( Smuxi.Engine.CommandModel cmd ) : void
cmd Smuxi.Engine.CommandModel
return void
        public void CommandHelp(CommandModel cmd)
        {
            var builder = CreateMessageBuilder();
            // TRANSLATOR: this line is used as a label / category for a
            // list of commands below
            builder.AppendHeader(_("{0} Commands"), Protocol);
            Session.AddMessageToFrontend(cmd, builder.ToMessage());

            string[] help = {
            "connect xmpp/jabber server port username password [resource]",
            "msg/query jid/nick message",
            "say message",
            "join muc-jid [password]",
            "part/leave [muc-jid]",
            "away [away-message]",
            "roster [full]",
            "contact add/remove jid/nick",
            "contact rename jid/nick [newnick]"
            };

            foreach (string line in help) {
                builder = CreateMessageBuilder();
                builder.AppendEventPrefix();
                builder.AppendText(line);
                Session.AddMessageToFrontend(cmd, builder.ToMessage());
            }

            // TRANSLATOR: this line is used as a label / category for a
            // list of commands below
            builder = CreateMessageBuilder();
            builder.AppendHeader(_("Advanced {0} Commands"), Protocol);
            Session.AddMessageToFrontend(cmd, builder.ToMessage());

            string[] help2 = {
            "contact addonly/subscribe/unsubscribe/approve/deny",
            "whois jid",
            "joinas muc-jid nickname [password]",
            "priority away/online/temp priority-value"
            };

            foreach (string line in help2) {
                builder = CreateMessageBuilder();
                builder.AppendEventPrefix();
                builder.AppendText(line);
                Session.AddMessageToFrontend(cmd, builder.ToMessage());
            }
        }