]> jfr.im git - irc/irssi/irssi.git/commitdiff
Strip the trailing whitespace from /join commands.
authorLemonBoy <redacted>
Mon, 9 Nov 2015 17:39:13 +0000 (18:39 +0100)
committerLemonBoy <redacted>
Mon, 9 Nov 2015 17:42:49 +0000 (18:42 +0100)
Fixes #99 for great good.

src/core/commands.c
src/fe-common/core/fe-channels.c

index 0fb373c7a73dd26b816a6e00b98897ae9b2fa9bd..88d1208c3e1195e36198acbc1d9bae599a90d2d7 100644 (file)
@@ -751,7 +751,7 @@ int cmd_get_params(const char *data, gpointer *free_me, int count, ...)
 
                                /* strip the trailing whitespace */
                                if (count & PARAM_FLAG_STRIP_TRAILING_WS) {
-                                       arg = g_strchomp (arg);
+                                       arg = g_strchomp(arg);
                                }
                        } else {
                                arg = (count & PARAM_FLAG_NOQUOTES) ?
index a171596d1cd03833501848b71aeff02c4094369b..046d641a75e0a2f0b3c03f1b50383797015dbf73 100644 (file)
@@ -122,7 +122,8 @@ static void cmd_join(const char *data, SERVER_REC *server)
        void *free_arg;
 
        if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS |
-                           PARAM_FLAG_UNKNOWN_OPTIONS | PARAM_FLAG_GETREST,
+                           PARAM_FLAG_UNKNOWN_OPTIONS | PARAM_FLAG_GETREST |
+                           PARAM_FLAG_STRIP_TRAILING_WS,
                            "join", &optlist, &pdata))
                return;