summaryrefslogtreecommitdiff
path: root/src/modules/m_rline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_rline.cpp')
-rw-r--r--src/modules/m_rline.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp
index 9d090ec2e..824d6229a 100644
--- a/src/modules/m_rline.cpp
+++ b/src/modules/m_rline.cpp
@@ -186,25 +186,21 @@ class CommandRLine : public Command
class ModuleRLine : public Module
{
private:
- CommandRLine *r;
- RLineFactory *f;
+ CommandRLine r;
+ RLineFactory f;
bool MatchOnNickChange;
std::string RegexEngine;
public:
- ModuleRLine(InspIRCd* Me) : Module(Me)
+ ModuleRLine(InspIRCd* Me) : Module(Me), r(Me), f(Me)
{
mymodule = this;
OnRehash(NULL);
Me->Modules->UseInterface("RegularExpression");
- // Create a new command
- r = new CommandRLine(ServerInstance);
- ServerInstance->AddCommand(r);
-
- f = new RLineFactory(ServerInstance);
- ServerInstance->XLines->RegisterFactory(f);
+ ServerInstance->AddCommand(&r);
+ ServerInstance->XLines->RegisterFactory(&f);
Implementation eventlist[] = { I_OnUserConnect, I_OnRehash, I_OnUserPostNick, I_OnLoadModule, I_OnStats };
ServerInstance->Modules->Attach(eventlist, this, 5);
@@ -215,7 +211,7 @@ class ModuleRLine : public Module
{
ServerInstance->Modules->DoneWithInterface("RegularExpression");
ServerInstance->XLines->DelAll("R");
- ServerInstance->XLines->UnregisterFactory(f);
+ ServerInstance->XLines->UnregisterFactory(&f);
}
virtual Version GetVersion()