diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-04 12:36:26 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-04 12:36:26 +0000 |
commit | b29d14d0004e357c8fe5985f0389e9ad2b64c91d (patch) | |
tree | 53da3d50b5df5f87705665308818869e338bfa6e | |
parent | e48c7e038abe2954ecec30f465c811f017793332 (diff) |
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
-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) |