diff options
author | Wouter Coekaerts <coekie@irssi.org> | 2006-08-20 17:56:06 +0000 |
---|---|---|
committer | coekie <coekie@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2006-08-20 17:56:06 +0000 |
commit | 7e7c841eaddd4dd66c6f1db98e4f584fa4fc8baf (patch) | |
tree | 2e7f9628a4426be8aad42c3355598e67d5e0fb9d /src/irc | |
parent | 59f91046c195887deda721191d5070b3a29173cf (diff) | |
download | irssi-7e7c841eaddd4dd66c6f1db98e4f584fa4fc8baf.zip |
Don't get confused by a join command with too many arguments; keys can't have spaces in them. (Bug 437)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4322 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-channels.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/irc/core/irc-channels.c b/src/irc/core/irc-channels.c index 431f2458..a67504ed 100644 --- a/src/irc/core/irc-channels.c +++ b/src/irc/core/irc-channels.c @@ -69,7 +69,7 @@ static void irc_channels_join(IRC_SERVER_REC *server, const char *data, CHANNEL_SETUP_REC *schannel; IRC_CHANNEL_REC *chanrec; GString *outchans, *outkeys; - char *channels, *keys, *key; + char *channels, *keys, *key, *space; char **chanlist, **keylist, **tmp, **tmpkey, **tmpstr, *channel, *channame; void *free_arg; int use_keys, cmdlen; @@ -82,6 +82,12 @@ static void irc_channels_join(IRC_SERVER_REC *server, const char *data, &channels, &keys)) return; + /* keys shouldn't contain space */ + space = strchr(keys, ' '); + if (space != NULL) { + *space = '\0'; + } + chanlist = g_strsplit(channels, ",", -1); keylist = g_strsplit(keys, ",", -1); |