Delete users from channel when a server disconnects

This commit is contained in:
Michiel Broek 2006-05-27 20:45:55 +00:00
parent 13ac2a332f
commit 0b722c0698
2 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ v0.83.20 27-May-2006
mbtask:
Changed welcome message.
Registration info for the clients was send double coded.
Delete users from channel when a server disconnects.
v0.83.19 23-May-2006 - 27-May-2006

View File

@ -291,9 +291,10 @@ void del_userchannel(char *channel)
int i;
for (i = 0; i < MAXIBC_CHN; i++) {
if (strcmp(chn_list[i].name, channel) == 0) {
if (strcmp(chn_list[i].name, channel) == 0 && chn_list[i].users) {
chnchg = TRUE;
chn_list[i].users--;
Syslog('r', "IBC: del_userchannel(%s), %d users left", channel, chn_list[i].users);
if (chn_list[i].users == 0) {
Syslog('+', "IBC: deleted empty channel %s", channel);
del_channel(channel);