summaryrefslogtreecommitdiff
path: root/src/modules/m_nicklock.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-10 17:21:26 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-10 17:21:26 +0000
commit0942fe7405f0ff38038f7445c241fdae0bd7d1a2 (patch)
tree2d386c188161a949e7c32e28744a097c0d06247c /src/modules/m_nicklock.cpp
parent3eefd1dfbdf611e526670b89dbd738e17c392c2c (diff)
Convert to templated GetExt
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4285 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_nicklock.cpp')
-rw-r--r--src/modules/m_nicklock.cpp12
1 files changed, 7 insertions, 5 deletions
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;