X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_redirect.cpp;h=dbf6f1127e88ee6588b6834f749f1fa7108dc949;hb=d54fd9b1e6b31f69332a9241b5f17330c0ad61e0;hp=ae168730aa9d2531df6dad47f0ee9a234106b9aa;hpb=d0b4bb3811458aa335857514e4cbb95d5c84f433;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index ae168730a..dbf6f1127 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -16,17 +16,13 @@ using namespace std; -#include #include "users.h" #include "channels.h" #include "modules.h" -#include "helperfuncs.h" #include "inspircd.h" /* $ModDesc: Provides channel mode +L (limit redirection) */ -extern InspIRCd* ServerInstance; - class Redirect : public ModeHandler { public: @@ -120,19 +116,14 @@ class ModuleRedirect : public Module void Implements(char* List) { - List[I_On005Numeric] = List[I_OnUserPreJoin] = 1; + List[I_OnUserPreJoin] = 1; } - virtual void On005Numeric(std::string &output) - { - ServerInstance->ModeGrok->InsertMode(output, "L", 3); - } - virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { if (chan) { - if (chan->IsModeSet('L')) + if (chan->IsModeSet('L') && chan->limit) { if (chan->GetUserCounter() >= chan->limit) {