changeset 622:2b7ef605ddc6

Add /version command
author Mikael Berthe <mikael@lilotux.net>
date Sat, 17 Dec 2005 00:36:57 +0100
parents f20c1934a8a7
children 7d9841ea20d8
files mcabber/src/commands.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/commands.c	Sat Dec 17 00:10:54 2005 +0100
+++ b/mcabber/src/commands.c	Sat Dec 17 00:36:57 2005 +0100
@@ -54,6 +54,7 @@
 static void do_rawxml(char *arg);
 static void do_room(char *arg);
 static void do_authorization(char *arg);
+static void do_version(char *arg);
 
 // Global variable for the commands list
 static GSList *Commands;
@@ -111,6 +112,7 @@
   cmd_add("status", "Show or set your status", COMPL_STATUS, 0, &do_status);
   cmd_add("status_to", "Show or set your status for one recipient",
           COMPL_JID, COMPL_STATUS, &do_status_to);
+  cmd_add("version", "Show mcabber version", 0, 0, &do_version);
 
   // Status category
   compl_add_category_word(COMPL_STATUS, "online");
@@ -1705,6 +1707,11 @@
   free_arg_lst(paramlst);
 }
 
+static void do_version(char *arg)
+{
+  scr_LogPrint(LPRINT_NORMAL, "This is mcabber version %s", PACKAGE_VERSION);
+}
+
 static void do_connect(char *arg)
 {
   mcabber_connect();