mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 15:42:26 +02:00
Add an option to strip trailing whitespace when parsing commands
This commit is contained in:
parent
6d6e672e8e
commit
1006fee802
2 changed files with 7 additions and 0 deletions
|
|
@ -748,6 +748,11 @@ int cmd_get_params(const char *data, gpointer *free_me, int count, ...)
|
|||
if (cnt == 0 && count & PARAM_FLAG_GETREST) {
|
||||
/* get rest */
|
||||
arg = datad;
|
||||
|
||||
/* strip the trailing whitespace */
|
||||
if (count & PARAM_FLAG_STRIP_TRAILING_WS) {
|
||||
arg = g_strchomp (arg);
|
||||
}
|
||||
} else {
|
||||
arg = (count & PARAM_FLAG_NOQUOTES) ?
|
||||
cmd_get_param(&datad) :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue