diff mcabber/src/screen.c @ 967:303408ef5e5d

Configurable command character This patch sets the command character as a configurable compile time option.
author Alexis Hildebrandt
date Fri, 29 Sep 2006 20:28:20 +0200
parents d9acb7f2a3d1
children 11b632d824f6
line wrap: on
line diff
--- a/mcabber/src/screen.c	Thu Sep 28 21:36:58 2006 +0200
+++ b/mcabber/src/screen.c	Fri Sep 29 20:28:20 2006 +0200
@@ -2064,7 +2064,7 @@
   int quote = FALSE;
 
   // Not a command?
-  if ((ptr_inputline == inputLine) || (inputLine[0] != '/')) {
+  if ((ptr_inputline == inputLine) || (inputLine[0] != COMMAND_CHAR)) {
     if (!current_buddy) return -2;
     if (buddy_gettype(BUDDATA(current_buddy)) == ROSTER_TYPE_ROOM) {
       *p_row = inputLine;
@@ -2253,7 +2253,7 @@
 {
   if (!Curses) return;
   // Leave multi-line mode
-  process_command("/msay abort");
+  process_command(mkcmdstr("msay abort"));
   // Same as Ctrl-g, now
   scr_cancel_current_completion();
   scr_end_current_completion();
@@ -2444,7 +2444,7 @@
   if (boundcmd) {
     gchar *cmd, *boundcmd_locale;
     boundcmd_locale = from_utf8(boundcmd);
-    cmd = g_strdup_printf("/%s", boundcmd_locale);
+    cmd = g_strdup_printf(mkcmdstr("%s"), boundcmd_locale);
     scr_CheckAutoAway(TRUE);
     if (process_command(cmd))
       return 255; // Quit