Delete users from channel when a server disconnects
This commit is contained in:
parent
13ac2a332f
commit
0b722c0698
@ -9,6 +9,7 @@ v0.83.20 27-May-2006
|
|||||||
mbtask:
|
mbtask:
|
||||||
Changed welcome message.
|
Changed welcome message.
|
||||||
Registration info for the clients was send double coded.
|
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
|
v0.83.19 23-May-2006 - 27-May-2006
|
||||||
|
@ -291,9 +291,10 @@ void del_userchannel(char *channel)
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MAXIBC_CHN; 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;
|
chnchg = TRUE;
|
||||||
chn_list[i].users--;
|
chn_list[i].users--;
|
||||||
|
Syslog('r', "IBC: del_userchannel(%s), %d users left", channel, chn_list[i].users);
|
||||||
if (chn_list[i].users == 0) {
|
if (chn_list[i].users == 0) {
|
||||||
Syslog('+', "IBC: deleted empty channel %s", channel);
|
Syslog('+', "IBC: deleted empty channel %s", channel);
|
||||||
del_channel(channel);
|
del_channel(channel);
|
||||||
|
Reference in New Issue
Block a user