X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/c7561f03ef5802a0ccb10c49788cc21bcaa45e06..ea41b24fd4807e3565bf5f8f293e2efc4c20b62d:/modules/m_invite.c diff --git a/modules/m_invite.c b/modules/m_invite.c index ae7e6d23..e20ea7a7 100644 --- a/modules/m_invite.c +++ b/modules/m_invite.c @@ -37,6 +37,7 @@ #include "modules.h" #include "packet.h" #include "tgchange.h" +#include "s_newconf.h" static const char invite_desc[] = "Provides /invite"; @@ -161,6 +162,7 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source else sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name, source_p->name, parv[2]); + return; } } @@ -175,7 +177,7 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source if(MyConnect(source_p)) { - if (ConfigFileEntry.target_change && !IsOper(source_p) && + if (ConfigFileEntry.target_change && !IsOperGeneral(source_p) && !find_allowing_channel(source_p, target_p) && !add_target(source_p, target_p)) { @@ -200,34 +202,6 @@ m_invite(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source if(MyConnect(target_p)) { - if(!IsOper(source_p) && (IsSetCallerId(target_p) || - (IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0])) && - !accept_message(source_p, target_p)) - { - if (IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0]) - { - sendto_one_numeric(source_p, ERR_NONONREG, - form_str(ERR_NONONREG), - target_p->name); - return; - } - else - { - /* instead of sending RPL_UMODEGMSG, - * just let the invite through - */ - if((target_p->localClient->last_caller_id_time + - ConfigFileEntry.caller_id_wait) >= rb_current_time()) - { - sendto_one_numeric(source_p, ERR_TARGUMODEG, - form_str(ERR_TARGUMODEG), - target_p->name); - return; - } - target_p->localClient->last_caller_id_time = rb_current_time(); - } - } - hdata.chptr = chptr; hdata.msptr = msptr; hdata.client = source_p;