Fixed channel delete

This commit is contained in:
Michiel Broek 2006-05-28 09:44:07 +00:00
parent ee291a315d
commit f50554acfc

View File

@ -388,9 +388,10 @@ void del_channel(char *name)
int i; int i;
for (i = 0; i < MAXIBC_CHN; i++) { for (i = 0; i < MAXIBC_CHN; i++) {
if (strcmp(chn_list[i].name, name) == 0) { if (strlen(chn_list[i].server) && (strcmp(chn_list[i].name, name) == 0)) {
Syslog('r', "IBC: del_channel(%s), slot=%d", name, i); Syslog('r', "IBC: del_channel(%s), slot=%d", name, i);
memset(&chn_list[i], 0, sizeof(_chn_list)); memset(&chn_list[i], 0, sizeof(_chn_list));
return;
} }
} }
} }