aboutsummaryrefslogtreecommitdiffstats
path: root/root_commands.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-04-25 09:21:49 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2006-04-25 09:21:49 +0200
commit79c6f9f8fff2b4c4627353e8a8eeb591d99a2098 (patch)
treeed6917e1ebee4090dd0d7088b3b91ec87c8759fe /root_commands.c
parent6e62132fd4433e48ca85ee8ffcc6e848acb2547e (diff)
Implemented better quoting for root command arguments.
(Support for backslashes instead of just "' quotes.)
Diffstat (limited to 'root_commands.c')
-rw-r--r--root_commands.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/root_commands.c b/root_commands.c
index 0b5f4da5..6d9868ac 100644
--- a/root_commands.c
+++ b/root_commands.c
@@ -57,6 +57,13 @@ void root_command_string( irc_t *irc, user_t *u, char *command, int flags )
s --;
}
}
+ else if( *s == '\\' && ( ( !q && s[1] ) || ( q && q == s[1] ) ) )
+ {
+ char *cpy;
+
+ for( cpy = s; *cpy; cpy ++ )
+ cpy[0] = cpy[1];
+ }
else if( *s == q )
{
q = *s = 0;