comparison mcabber/src/commands.c @ 622:2b7ef605ddc6

Add /version command
author Mikael Berthe <mikael@lilotux.net>
date Sat, 17 Dec 2005 00:36:57 +0100
parents 97dd14e22b2a
children 028c01940490
comparison
equal deleted inserted replaced
621:f20c1934a8a7 622:2b7ef605ddc6
52 static void do_connect(char *arg); 52 static void do_connect(char *arg);
53 static void do_disconnect(char *arg); 53 static void do_disconnect(char *arg);
54 static void do_rawxml(char *arg); 54 static void do_rawxml(char *arg);
55 static void do_room(char *arg); 55 static void do_room(char *arg);
56 static void do_authorization(char *arg); 56 static void do_authorization(char *arg);
57 static void do_version(char *arg);
57 58
58 // Global variable for the commands list 59 // Global variable for the commands list
59 static GSList *Commands; 60 static GSList *Commands;
60 61
61 62
109 //cmd_add("search"); 110 //cmd_add("search");
110 cmd_add("set", "Set/query an option value", 0, 0, &do_set); 111 cmd_add("set", "Set/query an option value", 0, 0, &do_set);
111 cmd_add("status", "Show or set your status", COMPL_STATUS, 0, &do_status); 112 cmd_add("status", "Show or set your status", COMPL_STATUS, 0, &do_status);
112 cmd_add("status_to", "Show or set your status for one recipient", 113 cmd_add("status_to", "Show or set your status for one recipient",
113 COMPL_JID, COMPL_STATUS, &do_status_to); 114 COMPL_JID, COMPL_STATUS, &do_status_to);
115 cmd_add("version", "Show mcabber version", 0, 0, &do_version);
114 116
115 // Status category 117 // Status category
116 compl_add_category_word(COMPL_STATUS, "online"); 118 compl_add_category_word(COMPL_STATUS, "online");
117 compl_add_category_word(COMPL_STATUS, "avail"); 119 compl_add_category_word(COMPL_STATUS, "avail");
118 compl_add_category_word(COMPL_STATUS, "invisible"); 120 compl_add_category_word(COMPL_STATUS, "invisible");
1703 } 1705 }
1704 1706
1705 free_arg_lst(paramlst); 1707 free_arg_lst(paramlst);
1706 } 1708 }
1707 1709
1710 static void do_version(char *arg)
1711 {
1712 scr_LogPrint(LPRINT_NORMAL, "This is mcabber version %s", PACKAGE_VERSION);
1713 }
1714
1708 static void do_connect(char *arg) 1715 static void do_connect(char *arg)
1709 { 1716 {
1710 mcabber_connect(); 1717 mcabber_connect();
1711 } 1718 }
1712 1719