X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/c4d2d01419cff3d4d9c6dd708937786255f9d3c2..cf09122bf77a905ea5ba6116dbba7660d976bce9:/modules/core/m_message.c diff --git a/modules/core/m_message.c b/modules/core/m_message.c index a6ac60d3..be1a732a 100644 --- a/modules/core/m_message.c +++ b/modules/core/m_message.c @@ -361,7 +361,9 @@ build_target_list(int p_or_n, const char *command, struct Client *client_p, if(!IsServer(source_p) && !IsService(source_p) && !is_chanop_voiced(msptr)) { sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), - me.name, source_p->name, with_prefix); + get_id(&me, source_p), + get_id(source_p, source_p), + with_prefix); return (-1); } @@ -763,6 +765,10 @@ msg_client(int p_or_n, const char *command, return; } } + + if (do_floodcount && + flood_attack_client(p_or_n, source_p, target_p)) + return; } else if(source_p->from == target_p->from) { @@ -796,9 +802,6 @@ msg_client(int p_or_n, const char *command, sendto_one_numeric(source_p, ERR_NONONREG, form_str(ERR_NONONREG), target_p->name); - /* Only so opers can watch for floods */ - if (do_floodcount) - (void) flood_attack_client(p_or_n, source_p, target_p); } else { @@ -824,25 +827,12 @@ msg_client(int p_or_n, const char *command, target_p->localClient->last_caller_id_time = rb_current_time(); } - /* Only so opers can watch for floods */ - if (do_floodcount) - (void) flood_attack_client(p_or_n, source_p, target_p); } } else - { - /* If the client is remote, we dont perform a special check for - * flooding.. as we wouldnt block their message anyway.. this means - * we dont give warnings.. we then check if theyre opered - * (to avoid flood warnings), lastly if theyre our client - * and flooding -- fl */ - if(!do_floodcount || - !flood_attack_client(p_or_n, source_p, target_p)) - sendto_anywhere(target_p, source_p, command, ":%s", text); - } + sendto_anywhere(target_p, source_p, command, ":%s", text); } - else if(!do_floodcount || - !flood_attack_client(p_or_n, source_p, target_p)) + else sendto_anywhere(target_p, source_p, command, ":%s", text); return;