X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/8cf4cea3da2528938b162b9b5f92524c27628fdf..7e6c9180dadba56c2d1d745b09b1cce65700cb52:/modules/core/m_join.c diff --git a/modules/core/m_join.c b/modules/core/m_join.c index 439fab4..c01aba7 100644 --- a/modules/core/m_join.c +++ b/modules/core/m_join.c @@ -305,7 +305,8 @@ m_join(struct Client *client_p, struct Client *source_p, int parc, const char *p sendto_one_numeric(source_p, ERR_LINKCHANNEL, form_str(ERR_LINKCHANNEL), name, chptr->chname); } - if(!IsOper(source_p) && !IsExemptSpambot(source_p)) + if(flags == 0 && + !IsOper(source_p) && !IsExemptSpambot(source_p)) check_spambot_warning(source_p, name); /* add the user to the channel */ @@ -943,8 +944,6 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char * output - NONE * side effects - Use has decided to join 0. This is legacy * from the days when channels were numbers not names. *sigh* - * There is a bunch of evilness necessary here due to - * anti spambot code. */ static void do_join_0(struct Client *client_p, struct Client *source_p) @@ -959,12 +958,12 @@ do_join_0(struct Client *client_p, struct Client *source_p) sendto_server(client_p, NULL, CAP_TS6, NOCAPS, ":%s JOIN 0", use_id(source_p)); - if(source_p->user->channel.head && MyConnect(source_p) && - !IsOper(source_p) && !IsExemptSpambot(source_p)) - check_spambot_warning(source_p, NULL); - while((ptr = source_p->user->channel.head)) { + if(MyConnect(source_p) && + !IsOper(source_p) && !IsExemptSpambot(source_p)) + check_spambot_warning(source_p, NULL); + msptr = ptr->data; chptr = msptr->chptr; sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s PART %s",