1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-15 04:28:09 -04:00

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
This commit is contained in:
Wouter Coekaerts 2006-08-20 17:56:06 +00:00 committed by coekie
parent 59f91046c1
commit 7e7c841ead

View File

@ -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);