X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_delayjoin.cpp;h=e864a8289c75e0f8d6be6b174fc7f33f4c65524c;hb=bd1471bc08be28bc2554d35fdaeb078338b14266;hp=55ffd08d706d649cb03686a78383cf50a2d18524;hpb=fb8cb2114483689c5a52f951e301c31bdd2a60a2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index 55ffd08d7..e864a8289 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -39,7 +39,9 @@ class ModuleDelayJoin : public Module DelayJoinMode djm; public: LocalIntExt unjoined; - ModuleDelayJoin() : djm(this), unjoined("delayjoin", this) + ModuleDelayJoin() + : djm(this) + , unjoined("delayjoin", ExtensionItem::EXT_MEMBERSHIP, this) { } @@ -138,10 +140,6 @@ void ModuleDelayJoin::OnBuildNeighborList(User* source, IncludeChanList& include void ModuleDelayJoin::OnText(User* user, void* dest, int target_type, const std::string &text, char status, CUList &exempt_list) { - /* Server origin */ - if (!user) - return; - if (target_type != TYPE_CHANNEL) return; @@ -165,7 +163,11 @@ void ModuleDelayJoin::OnText(User* user, void* dest, int target_type, const std: /* make the user visible if he receives any mode change */ ModResult ModuleDelayJoin::OnRawMode(User* user, Channel* channel, ModeHandler* mh, const std::string& param, bool adding) { - if (!user || !channel || param.empty()) + if (!channel || param.empty()) + return MOD_RES_PASSTHRU; + + // If not a prefix mode then we got nothing to do here + if (!mh->IsPrefixMode()) return MOD_RES_PASSTHRU; User* dest;