if (conf.get(real_character))
{
ServerInstance->Log(DEBUG,"Escaping %c", real_character);
+ if (real_character == 'n')
+ real_character = '\n';
line += real_character;
continue;
}
if ((*c == '\\') && (in_quote))
{
c++;
- current_value += *c;
+ if (*c == 'n')
+ current_value += '\n';
+ else
+ current_value += *c;
continue;
}
if (*c == '"')
char linebuf[MAXBUF];
F.clear();
- file = fopen(fname,"r");
+ file = fopen(fname, "r");
if (file)
{
while (!feof(file))
{
- fgets(linebuf,sizeof(linebuf),file);
- linebuf[strlen(linebuf)-1]='\0';
-
- if (!*linebuf)
- {
- strcpy(linebuf," ");
- }
+ fgets(linebuf, sizeof(linebuf), file);
+ linebuf[strlen(linebuf)-1] = 0;
if (!feof(file))
{
- F.push_back(linebuf);
+ F.push_back(*linebuf ? linebuf : " ");
}
}