diff options
-rw-r--r-- | src/modules/extra/m_rline.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/modules/extra/m_rline.cpp b/src/modules/extra/m_rline.cpp index db0a64c05..545757f59 100644 --- a/src/modules/extra/m_rline.cpp +++ b/src/modules/extra/m_rline.cpp @@ -205,6 +205,10 @@ class ModuleRLine : public Module f = new RLineFactory(ServerInstance); ServerInstance->XLines->RegisterFactory(f); + + Implementation eventlist[] = { I_OnUserConnect }; + ServerInstance->Modules->Attach(eventlist, this, 1); + } virtual ~ModuleRLine() @@ -216,6 +220,18 @@ class ModuleRLine : public Module { return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION); } + + virtual void OnUserConnect(User* user) + { + // Apply lines on user connect + XLine *r = ServerInstance->XLines->MatchesLine("R", user); + + if (r) + { + // Bang. :P + r->Apply(user); + } + } }; MODULE_INIT(ModuleRLine) |