comparison mcabber/src/commands.c @ 1518:63dc211a4c1a

New command: /echo (display a message in the log window)
author Mikael Berthe <mikael@lilotux.net>
date Sat, 27 Sep 2008 22:41:29 +0200
parents 86620c83123b
children 68580b6be895
comparison
equal deleted inserted replaced
1517:6df03b9b17ba 1518:63dc211a4c1a
83 static void do_chat_disable(char *arg); 83 static void do_chat_disable(char *arg);
84 static void do_source(char *arg); 84 static void do_source(char *arg);
85 static void do_color(char *arg); 85 static void do_color(char *arg);
86 static void do_otr(char *arg); 86 static void do_otr(char *arg);
87 static void do_otrpolicy(char *arg); 87 static void do_otrpolicy(char *arg);
88 static void do_echo(char *arg);
88 89
89 static void do_say_internal(char *arg, int parse_flags); 90 static void do_say_internal(char *arg, int parse_flags);
90 91
91 // Global variable for the commands list 92 // Global variable for the commands list
92 static GSList *Commands; 93 static GSList *Commands;
123 cmd_add("bind", "Add an key binding", 0, 0, &do_bind); 124 cmd_add("bind", "Add an key binding", 0, 0, &do_bind);
124 cmd_add("buffer", "Manipulate current buddy's buffer (chat window)", 125 cmd_add("buffer", "Manipulate current buddy's buffer (chat window)",
125 COMPL_BUFFER, 0, &do_buffer); 126 COMPL_BUFFER, 0, &do_buffer);
126 cmd_add("chat_disable", "Disable chat mode", 0, 0, &do_chat_disable); 127 cmd_add("chat_disable", "Disable chat mode", 0, 0, &do_chat_disable);
127 cmd_add("clear", "Clear the dialog window", 0, 0, &do_clear); 128 cmd_add("clear", "Clear the dialog window", 0, 0, &do_clear);
129 cmd_add("color", "Set coloring options", COMPL_COLOR, 0, &do_color);
128 cmd_add("connect", "Connect to the server", 0, 0, &do_connect); 130 cmd_add("connect", "Connect to the server", 0, 0, &do_connect);
129 cmd_add("del", "Delete the current buddy", 0, 0, &do_del); 131 cmd_add("del", "Delete the current buddy", 0, 0, &do_del);
130 cmd_add("disconnect", "Disconnect from server", 0, 0, &do_disconnect); 132 cmd_add("disconnect", "Disconnect from server", 0, 0, &do_disconnect);
133 cmd_add("echo", "Display a string in the log window", 0, 0, &do_echo);
131 cmd_add("event", "Process an event", COMPL_EVENTSID, COMPL_EVENTS, &do_event); 134 cmd_add("event", "Process an event", COMPL_EVENTSID, COMPL_EVENTS, &do_event);
132 cmd_add("group", "Change group display settings", 135 cmd_add("group", "Change group display settings",
133 COMPL_GROUP, COMPL_GROUPNAME, &do_group); 136 COMPL_GROUP, COMPL_GROUPNAME, &do_group);
134 cmd_add("help", "Display some help", COMPL_CMD, 0, &do_help); 137 cmd_add("help", "Display some help", COMPL_CMD, 0, &do_help);
135 cmd_add("iline", "Manipulate input buffer", 0, 0, &do_iline); 138 cmd_add("iline", "Manipulate input buffer", 0, 0, &do_iline);
159 cmd_add("source", "Read a configuration file", 0, 0, &do_source); 162 cmd_add("source", "Read a configuration file", 0, 0, &do_source);
160 cmd_add("status", "Show or set your status", COMPL_STATUS, 0, &do_status); 163 cmd_add("status", "Show or set your status", COMPL_STATUS, 0, &do_status);
161 cmd_add("status_to", "Show or set your status for one recipient", 164 cmd_add("status_to", "Show or set your status for one recipient",
162 COMPL_JID, COMPL_STATUS, &do_status_to); 165 COMPL_JID, COMPL_STATUS, &do_status_to);
163 cmd_add("version", "Show mcabber version", 0, 0, &do_version); 166 cmd_add("version", "Show mcabber version", 0, 0, &do_version);
164 cmd_add("color", "Set coloring options", COMPL_COLOR, 0, &do_color);
165 167
166 // Status category 168 // Status category
167 compl_add_category_word(COMPL_STATUS, "online"); 169 compl_add_category_word(COMPL_STATUS, "online");
168 compl_add_category_word(COMPL_STATUS, "avail"); 170 compl_add_category_word(COMPL_STATUS, "avail");
169 compl_add_category_word(COMPL_STATUS, "invisible"); 171 compl_add_category_word(COMPL_STATUS, "invisible");
3617 static void do_help(char *arg) 3619 static void do_help(char *arg)
3618 { 3620 {
3619 help_process(arg); 3621 help_process(arg);
3620 } 3622 }
3621 3623
3624 static void do_echo(char *arg)
3625 {
3626 if (arg)
3627 scr_print_logwindow(arg);
3628 }
3629
3630
3622 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ 3631 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */