Do not change \s in xlines to spaces, match_esc() treats \s correctly.
This undoes erroneous revert in a3c064b3b8a2.
This commit is contained in:
parent
36999fb194
commit
c2e615382b
|
@ -275,42 +275,7 @@ apply_xline(struct Client *source_p, const char *name, const char *reason, int t
|
||||||
|
|
||||||
aconf = make_conf();
|
aconf = make_conf();
|
||||||
aconf->status = CONF_XLINE;
|
aconf->status = CONF_XLINE;
|
||||||
|
aconf->host = rb_strdup(name);
|
||||||
if(strstr(name, "\\s"))
|
|
||||||
{
|
|
||||||
char *tmp = LOCAL_COPY(name);
|
|
||||||
char *orig = tmp;
|
|
||||||
char *new = tmp;
|
|
||||||
|
|
||||||
while(*orig)
|
|
||||||
{
|
|
||||||
if(*orig == '\\' && *(orig + 1) != '\0')
|
|
||||||
{
|
|
||||||
if(*(orig + 1) == 's')
|
|
||||||
{
|
|
||||||
*new++ = ' ';
|
|
||||||
orig += 2;
|
|
||||||
}
|
|
||||||
/* otherwise skip that and the escaped
|
|
||||||
* character after it, so we dont mistake
|
|
||||||
* \\s as \s --fl
|
|
||||||
*/
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*new++ = *orig++;
|
|
||||||
*new++ = *orig++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
*new++ = *orig++;
|
|
||||||
}
|
|
||||||
|
|
||||||
*new = '\0';
|
|
||||||
aconf->host = rb_strdup(tmp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
aconf->host = rb_strdup(name);
|
|
||||||
|
|
||||||
aconf->passwd = rb_strdup(reason);
|
aconf->passwd = rb_strdup(reason);
|
||||||
collapse(aconf->host);
|
collapse(aconf->host);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue