summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/core/irc-channels.c8
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);