diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-06-28 21:19:02 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-06-28 21:19:02 +0000 |
commit | b38908ff6786612771818c834de1245f63736d33 (patch) | |
tree | 942d42a7a4f561d1a941fc74fa01b700d2c96af8 /src/irc | |
parent | eccf1ad92d15be40bc9f652c339895517a5bb40a (diff) | |
download | weechat-b38908ff6786612771818c834de1245f63736d33.zip |
Fixed random crash when "MODE #chan -l" is received
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/irc-recv.c | 5 |
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) |