diff options
| author | 2007-10-26 20:48:58 +0000 | |
|---|---|---|
| committer | 2007-10-26 20:48:58 +0000 | |
| commit | efa08239271572e1c8024f808d61e02c7377ab54 (patch) | |
| tree | b031c47529b6a1d602755a0af419c46f4e9a6b72 /src/modules/m_delayjoin.cpp | |
| parent | Damnit! this should fix :p (diff) | |
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
Diffstat (limited to 'src/modules/m_delayjoin.cpp')
| -rw-r--r-- | src/modules/m_delayjoin.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
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); } }; |
