From efa08239271572e1c8024f808d61e02c7377ab54 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 26 Oct 2007 20:48:58 +0000 Subject: Add new event for this with gauranteed delivery of message BEFORE the text is sent out git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8376 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_delayjoin.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index d968f34a2..9626d9780 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -170,15 +170,15 @@ class ModuleDelayJoin : public Module } } - int OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) + void OnText(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) { if (target_type != TYPE_CHANNEL) - return 0; + return; Channel* channel = (Channel*) dest; if (!user->GetExt(std::string("delayjoin_")+channel->name)) - return 0; + return; /* Display the join to everyone else (the user who joined got it earlier) */ channel->WriteAllExcept(user, false, 0, exempt_list, "JOIN %s", channel->name); @@ -191,16 +191,9 @@ class ModuleDelayJoin : public Module */ for (UCListIter f = user->chans.begin(); f != user->chans.end(); f++) if (f->first->IsModeSet('D')) - return 0; + return; user->Shrink("delayjoin"); - - return 0; - } - - int OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) - { - return OnUserPreMessage(user, dest, target_type, text, status, exempt_list); } }; -- cgit v1.2.3