diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_rline.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index bbe8ede9a..160092a63 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -241,7 +241,7 @@ class ModuleRLine : public Module ServerInstance->Modules->AddService(r); ServerInstance->XLines->RegisterFactory(&f); - Implementation eventlist[] = { I_OnUserConnect, I_OnRehash, I_OnUserPostNick, I_OnStats, I_OnBackgroundTimer, I_OnUnloadModule }; + Implementation eventlist[] = { I_OnUserRegister, I_OnRehash, I_OnUserPostNick, I_OnStats, I_OnBackgroundTimer, I_OnUnloadModule }; ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } @@ -256,7 +256,7 @@ class ModuleRLine : public Module return Version("RLINE: Regexp user banning.", VF_COMMON | VF_VENDOR, rxfactory ? rxfactory->name : ""); } - virtual void OnUserConnect(LocalUser* user) + ModResult OnUserRegister(LocalUser* user) { // Apply lines on user connect XLine *rl = ServerInstance->XLines->MatchesLine("R", user); @@ -265,7 +265,9 @@ class ModuleRLine : public Module { // Bang. :P rl->Apply(user); + return MOD_RES_DENY; } + return MOD_RES_PASSTHRU; } virtual void OnRehash(User *user) @@ -349,6 +351,12 @@ class ModuleRLine : public Module ServerInstance->XLines->DelAll(f.GetType()); } } + + void Prioritize() + { + Module* mod = ServerInstance->Modules->Find("m_cgiirc.so"); + ServerInstance->Modules->SetPriority(this, I_OnUserRegister, PRIORITY_AFTER, mod); + } }; MODULE_INIT(ModuleRLine) |