diff options
| author | 2021-03-17 17:26:55 +0000 | |
|---|---|---|
| committer | 2021-03-17 21:14:07 +0000 | |
| commit | c1aa1d5a2b34b6a3339a157af3031b553fb8dd05 (patch) | |
| tree | 5b4090c8603f734ae8c6f230351afcd94190bb9d /src/modules/m_nicklock.cpp | |
| parent | Implement support for automatically syncing extension items. (diff) | |
Add a subclass of ExtensionItem exclusively for booleans.
Diffstat (limited to 'src/modules/m_nicklock.cpp')
| -rw-r--r-- | src/modules/m_nicklock.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp index 252165f2b..a1565b1bc 100644 --- a/src/modules/m_nicklock.cpp +++ b/src/modules/m_nicklock.cpp @@ -39,8 +39,8 @@ enum class CommandNicklock : public Command { public: - IntExtItem& locked; - CommandNicklock (Module* Creator, IntExtItem& ext) : Command(Creator,"NICKLOCK", 2), + BoolExtItem& locked; + CommandNicklock (Module* Creator, BoolExtItem& ext) : Command(Creator,"NICKLOCK", 2), locked(ext) { access_needed = CmdAccess::OPERATOR; @@ -73,7 +73,7 @@ class CommandNicklock : public Command /* If we made it this far, extend the user */ if (IS_LOCAL(target)) { - locked.Set(target, 1); + locked.Set(target); std::string oldnick = target->nick; if (target->ChangeNick(parameters[1])) @@ -99,8 +99,8 @@ class CommandNicklock : public Command class CommandNickunlock : public Command { public: - IntExtItem& locked; - CommandNickunlock (Module* Creator, IntExtItem& ext) : Command(Creator,"NICKUNLOCK", 1), + BoolExtItem& locked; + CommandNickunlock (Module* Creator, BoolExtItem& ext) : Command(Creator,"NICKUNLOCK", 1), locked(ext) { access_needed = CmdAccess::OPERATOR; @@ -145,7 +145,7 @@ class CommandNickunlock : public Command class ModuleNickLock : public Module { private: - IntExtItem locked; + BoolExtItem locked; CommandNicklock cmd1; CommandNickunlock cmd2; |
