X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_delaymsg.cpp;h=63da04a63cedfb7cfe27378a93c31b787d94585c;hb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;hp=cc09629e358f434385f215104991241caf9e90c4;hpb=edd159566de1cdae6f39302961a10e1800b0ff2c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index cc09629e3..63da04a63 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -45,6 +45,10 @@ class ModuleDelayMsg : public Module DelayMsgMode djm; public: ModuleDelayMsg() : djm(this) + { + } + + void init() { if (!ServerInstance->Modes->AddMode(&djm)) throw ModuleException("Could not add new modes!"); @@ -96,7 +100,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()); } @@ -105,7 +109,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)