comparison mcabber/src/settings.c @ 1272:033576acac4c

Add configurable roster colors (Michal 'vorner' Vaner)
author Mikael Berthe <mikael@lilotux.net>
date Tue, 21 Aug 2007 20:49:03 +0200
parents 9f5c5f176953
children c3107650d165
comparison
equal deleted inserted replaced
1271:f8a874ff453a 1272:033576acac4c
151 151
152 // Ignore empty lines and comments 152 // Ignore empty lines and comments
153 if ((*line == '\n') || (*line == '\0') || (*line == '#')) 153 if ((*line == '\n') || (*line == '\0') || (*line == '#'))
154 continue; 154 continue;
155 155
156 // We only allow assignments line, except for commands "pgp" and "source" 156 // We only allow assignments line, except for commands "pgp", "source"
157 // and "color"
157 if ((strchr(line, '=') != NULL) || 158 if ((strchr(line, '=') != NULL) ||
158 startswith(line, "pgp ", FALSE) || startswith(line, "source ", FALSE)) { 159 startswith(line, "pgp ", FALSE) || startswith(line, "source ", FALSE) ||
160 startswith(line, "color ", FALSE)) {
159 // Only accept the set, alias, bind, pgp and source commands 161 // Only accept the set, alias, bind, pgp and source commands
160 if (!startswith(line, "set ", FALSE) && 162 if (!startswith(line, "set ", FALSE) &&
161 !startswith(line, "bind ", FALSE) && 163 !startswith(line, "bind ", FALSE) &&
162 !startswith(line, "alias ", FALSE) && 164 !startswith(line, "alias ", FALSE) &&
163 !startswith(line, "pgp ", FALSE) && 165 !startswith(line, "pgp ", FALSE) &&
164 !startswith(line, "source ", FALSE)) { 166 !startswith(line, "source ", FALSE) &&
167 !startswith(line, "color ", FALSE)) {
165 scr_LogPrint(LPRINT_LOGNORM, 168 scr_LogPrint(LPRINT_LOGNORM,
166 "Error in configuration file (l. %d): bad command", ln); 169 "Error in configuration file (l. %d): bad command", ln);
167 err++; 170 err++;
168 continue; 171 continue;
169 } 172 }