diff mcabber/src/settings.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 b461d7ee6d96
children b57a01ffeed6
line wrap: on
line diff
--- a/mcabber/src/settings.c	Thu Sep 28 21:36:58 2006 +0200
+++ b/mcabber/src/settings.c	Fri Sep 29 20:28:20 2006 +0200
@@ -136,16 +136,18 @@
 
     if ((strchr(line, '=') != NULL)) {
       // Only accept the set, alias and bind commands
-      if (strncmp(line, "set ", 4) &&
-          strncmp(line, "bind ", 5) &&
-          strncmp(line, "alias ", 6)) {
+      if (strncmp(line, "set ", strlen("set ")) &&
+          strncmp(line, "bind ", strlen("bind ")) &&
+          strncmp(line, "alias ", strlen("alias "))) {
         scr_LogPrint(LPRINT_LOGNORM,
                      "Error in configuration file (l. %d): bad command", ln);
         err++;
         continue;
       }
-      *(--line) = '/';        // Set the leading '/' to build a command line
-      process_command(line);  // Process the command
+      // Set the leading COMMAND_CHAR to build a command line
+      // and process the command
+      *(--line) = COMMAND_CHAR;
+      process_command(line);
     } else {
       scr_LogPrint(LPRINT_LOGNORM,
                    "Error in configuration file (l. %d): no assignment", ln);