mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05: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:
parent
59f91046c1
commit
7e7c841ead
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user