summaryrefslogtreecommitdiff
path: root/src/irc/irc-recv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/irc-recv.c')
-rw-r--r--src/irc/irc-recv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index a28478207..1a9b9ee04 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -865,7 +865,10 @@ void irc_get_channel_modes (t_irc_server *server, t_irc_channel *channel,
NULL);
CHANNEL_SET_MODE(channel, (set_flag == '+'),
CHANNEL_MODE_LIMIT);
- channel->limit = atoi (parm);
+ if (set_flag == '-')
+ channel->limit = 0;
+ if ((set_flag == '+') && parm)
+ channel->limit = atoi (parm);
/* look for next parameter */
if (parm && pos)