comparison 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
comparison
equal deleted inserted replaced
966:d9acb7f2a3d1 967:303408ef5e5d
134 if ((*line == '\n') || (*line == '\0') || (*line == '#')) 134 if ((*line == '\n') || (*line == '\0') || (*line == '#'))
135 continue; 135 continue;
136 136
137 if ((strchr(line, '=') != NULL)) { 137 if ((strchr(line, '=') != NULL)) {
138 // Only accept the set, alias and bind commands 138 // Only accept the set, alias and bind commands
139 if (strncmp(line, "set ", 4) && 139 if (strncmp(line, "set ", strlen("set ")) &&
140 strncmp(line, "bind ", 5) && 140 strncmp(line, "bind ", strlen("bind ")) &&
141 strncmp(line, "alias ", 6)) { 141 strncmp(line, "alias ", strlen("alias "))) {
142 scr_LogPrint(LPRINT_LOGNORM, 142 scr_LogPrint(LPRINT_LOGNORM,
143 "Error in configuration file (l. %d): bad command", ln); 143 "Error in configuration file (l. %d): bad command", ln);
144 err++; 144 err++;
145 continue; 145 continue;
146 } 146 }
147 *(--line) = '/'; // Set the leading '/' to build a command line 147 // Set the leading COMMAND_CHAR to build a command line
148 process_command(line); // Process the command 148 // and process the command
149 *(--line) = COMMAND_CHAR;
150 process_command(line);
149 } else { 151 } else {
150 scr_LogPrint(LPRINT_LOGNORM, 152 scr_LogPrint(LPRINT_LOGNORM,
151 "Error in configuration file (l. %d): no assignment", ln); 153 "Error in configuration file (l. %d): no assignment", ln);
152 err++; 154 err++;
153 } 155 }