From b29d14d0004e357c8fe5985f0389e9ad2b64c91d Mon Sep 17 00:00:00 2001 From: w00t Date: Fri, 4 Apr 2008 12:36:26 +0000 Subject: Check for match and apply R:Lines on connect git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9298 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_rline.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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) -- cgit v1.2.3