X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/75818939ab299b595e847692904a41055178f69f..6abfcc55d0633e93af512c2679dc33a767960334:/src/channel.c diff --git a/src/channel.c b/src/channel.c index 702038e..80bf5c5 100644 --- a/src/channel.c +++ b/src/channel.c @@ -26,6 +26,7 @@ #include "stdinc.h" #include "channel.h" +#include "chmode.h" #include "client.h" #include "common.h" #include "hash.h" @@ -41,6 +42,13 @@ #include "s_newconf.h" #include "logger.h" +struct config_channel_entry ConfigChannel; +rb_dlink_list global_channel_list; +static rb_bh *channel_heap; +static rb_bh *ban_heap; +static rb_bh *topic_heap; +static rb_bh *member_heap; + static int channel_capabs[] = { CAP_EX, CAP_IE, CAP_SERVICE, CAP_TS6 @@ -233,8 +241,6 @@ remove_user_from_channel(struct membership *msptr) if(client_p->servptr == &me) rb_dlinkDelete(&msptr->locchannode, &chptr->locmembers); - chptr->users_last = rb_current_time(); - if(!(chptr->mode.mode & MODE_PERMANENT) && rb_dlink_list_length(&chptr->members) <= 0) destroy_channel(chptr); @@ -270,8 +276,6 @@ remove_user_from_channels(struct Client *client_p) if(client_p->servptr == &me) rb_dlinkDelete(&msptr->locchannode, &chptr->locmembers); - chptr->users_last = rb_current_time(); - if(!(chptr->mode.mode & MODE_PERMANENT) && rb_dlink_list_length(&chptr->members) <= 0) destroy_channel(chptr); @@ -914,19 +918,14 @@ check_spambot_warning(struct Client *source_p, const char *name) source_p->localClient->oper_warn_count_down--; else source_p->localClient->oper_warn_count_down = 0; - if(source_p->localClient->oper_warn_count_down == 0) + if(source_p->localClient->oper_warn_count_down == 0 && + name != NULL) { /* Its already known as a possible spambot */ - if(name != NULL) - sendto_realops_snomask(SNO_BOTS, L_NETWIDE, - "User %s (%s@%s) trying to join %s is a possible spambot", - source_p->name, - source_p->username, source_p->orighost, name); - else - sendto_realops_snomask(SNO_BOTS, L_NETWIDE, - "User %s (%s@%s) is a possible spambot", - source_p->name, - source_p->username, source_p->orighost); + sendto_realops_snomask(SNO_BOTS, L_NETWIDE, + "User %s (%s@%s) trying to join %s is a possible spambot", + source_p->name, + source_p->username, source_p->orighost, name); source_p->localClient->oper_warn_count_down = OPER_SPAM_COUNTDOWN; } } @@ -992,6 +991,7 @@ check_splitmode(void *unused) "Network rejoined, deactivating splitmode"); rb_event_delete(check_splitmode_ev); + check_splitmode_ev = NULL; } } }