diff options
author | Timo Sirainen <cras@irssi.org> | 2000-08-25 10:46:47 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-08-25 10:46:47 +0000 |
commit | 9a2b8e95edeb8fef951c742474d1bcdf39fb492c (patch) | |
tree | 3817d1442df49ff6ab9617ab941b6f7f663bf7ba /src/fe-common/irc/fe-irc-commands.c | |
parent | c084cfc5cadf6f7eb2fb89163ec58d1212495bf2 (diff) | |
download | irssi-9a2b8e95edeb8fef951c742474d1bcdf39fb492c.zip |
/BAN could crash when showing bans
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@628 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-irc-commands.c')
-rw-r--r-- | src/fe-common/irc/fe-irc-commands.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/fe-common/irc/fe-irc-commands.c b/src/fe-common/irc/fe-irc-commands.c index e54b7a47..5a3ae50c 100644 --- a/src/fe-common/irc/fe-irc-commands.c +++ b/src/fe-common/irc/fe-irc-commands.c @@ -289,9 +289,10 @@ static void bans_show_channel(CHANNEL_REC *channel, IRC_SERVER_REC *server) BAN_REC *rec = tmp->data; printformat(server, channel->name, MSGLEVEL_CRAP, - *rec->setby == '\0' ? IRCTXT_BANLIST : - IRCTXT_BANLIST_LONG, channel->name, rec->ban, - rec->setby, (int) (time(NULL)-rec->time)); + (rec->setby == NULL || *rec->setby == '\0') ? + IRCTXT_BANLIST : IRCTXT_BANLIST_LONG, + channel->name, rec->ban, rec->setby, + (int) (time(NULL)-rec->time)); } /* ..and show ban exceptions.. */ @@ -299,9 +300,10 @@ static void bans_show_channel(CHANNEL_REC *channel, IRC_SERVER_REC *server) BAN_REC *rec = tmp->data; printformat(server, channel->name, MSGLEVEL_CRAP, - *rec->setby == '\0' ? IRCTXT_EBANLIST : - IRCTXT_EBANLIST_LONG, channel->name, rec->ban, - rec->setby, (int) (time(NULL)-rec->time)); + (rec->setby == NULL || *rec->setby == '\0') ? + IRCTXT_EBANLIST : IRCTXT_EBANLIST_LONG, + channel->name, rec->ban, rec->setby, + (int) (time(NULL)-rec->time)); } } |