X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_delaymsg.cpp;h=1a0734ed9b01506f3ec3d4949f5ad02602576847;hb=44e89aafb69fb266bdf780d12a31947bfff4e330;hp=c0ff09ccf44f138e645ea02bc41188e15e4dbbfd;hpb=65b0aa4d5feb8aaf90e60c654636f547ea047682;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index c0ff09ccf..1a0734ed9 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -61,6 +61,9 @@ ModeAction DelayMsgMode::OnModeChange(User* source, User* dest, Channel* channel { if (adding) { + if ((channel->IsModeSet('d')) && (channel->GetModeParameter('d') == parameter)) + return MODEACTION_DENY; + /* Setting a new limit, sanity check */ long limit = atoi(parameter.c_str()); @@ -93,7 +96,7 @@ Version ModuleDelayMsg::GetVersion() void ModuleDelayMsg::OnUserJoin(Membership* memb, bool sync, bool created, CUList&) { - if (memb->chan->IsModeSet('d')) + if ((IS_LOCAL(memb->user)) && (memb->chan->IsModeSet('d'))) { djm.jointime.set(memb, ServerInstance->Time()); } @@ -102,7 +105,7 @@ void ModuleDelayMsg::OnUserJoin(Membership* memb, bool sync, bool created, CULis ModResult ModuleDelayMsg::OnUserPreMessage(User* user, void* dest, int target_type, std::string &text, char status, CUList &exempt_list) { /* Server origin */ - if (!user) + if ((!user) || (!IS_LOCAL(user))) return MOD_RES_PASSTHRU; if (target_type != TYPE_CHANNEL)