From 0942fe7405f0ff38038f7445c241fdae0bd7d1a2 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 10 Jul 2006 17:21:26 +0000 Subject: Convert to templated GetExt git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4285 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_nicklock.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/modules/m_nicklock.cpp') diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp index cd36f1747..47c15e792 100644 --- a/src/modules/m_nicklock.cpp +++ b/src/modules/m_nicklock.cpp @@ -30,11 +30,12 @@ static Server *Srv; class cmd_nicklock : public command_t { + char* dummy; public: - cmd_nicklock () : command_t("NICKLOCK", 'o', 2) - { + cmd_nicklock () : command_t("NICKLOCK", 'o', 2) + { this->source = "m_nicklock.so"; - } + } void Handle(char **parameters, int pcnt, userrec *user) { @@ -44,7 +45,7 @@ class cmd_nicklock : public command_t if (source) { - if (source->GetExt("nick_locked")) + if (source->GetExt("nick_locked", dummy)) { WriteServ(user->fd,"946 %s %s :This user's nickname is already locked.",user->nick,source->nick); return; @@ -88,6 +89,7 @@ class ModuleNickLock : public Module { cmd_nicklock* cmd1; cmd_nickunlock* cmd2; + char* n; public: ModuleNickLock(Server* Me) : Module::Module(Me) @@ -115,7 +117,7 @@ class ModuleNickLock : public Module virtual int OnUserPreNick(userrec* user, const std::string &newnick) { - if (user->GetExt("nick_locked")) + if (user->GetExt("nick_locked", n)) { WriteServ(user->fd,"447 %s :You cannot change your nickname (your nick is locked)",user->nick); return 1; -- cgit v1.2.3