diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_mlock.cpp | 13 | ||||
-rw-r--r-- | src/modules/m_sajoin.cpp | 3 |
2 files changed, 5 insertions, 11 deletions
diff --git a/src/modules/m_mlock.cpp b/src/modules/m_mlock.cpp index 719701d02..d1df81354 100644 --- a/src/modules/m_mlock.cpp +++ b/src/modules/m_mlock.cpp @@ -31,7 +31,7 @@ public: void init() { - ServerInstance->Modules->Attach(I_OnPreMode, this); + ServerInstance->Modules->Attach(I_OnRawMode, this); ServerInstance->Modules->AddService(this->mlock); } @@ -40,12 +40,7 @@ public: return Version("Implements the ability to have server-side MLOCK enforcement.", VF_VENDOR); } - void Prioritize() - { - ServerInstance->Modules->SetPriority(this, I_OnPreMode, PRIORITY_FIRST); - } - - ModResult OnPreMode(User* source, User* dest, Channel* channel, const std::vector<std::string>& parameters) + ModResult OnRawMode(User* source, Channel* channel, const char mode, const std::string& parameter, bool adding, int pcnt) { if (!channel) return MOD_RES_PASSTHRU; @@ -57,11 +52,11 @@ public: if (!mlock_str) return MOD_RES_PASSTHRU; - std::string::size_type p = parameters[1].find_first_of(*mlock_str); + std::string::size_type p = mlock_str->find(mode); if (p != std::string::npos) { source->WriteNumeric(742, "%s %c %s :MODE cannot be set due to channel having an active MLOCK restriction policy", - channel->name.c_str(), parameters[1][p], mlock_str->c_str()); + channel->name.c_str(), mode, mlock_str->c_str()); return MOD_RES_DENY; } diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index 932b564fa..7ac465732 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -65,7 +65,7 @@ class CommandSajoin : public Command { if (n->HasUser(dest)) { - ServerInstance->SNO->WriteToSnoMask('a', user->nick+" used SAJOIN to make "+dest->nick+" join "+parameters[1]); + ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used SAJOIN to make "+dest->nick+" join "+parameters[1]); return CMD_SUCCESS; } else @@ -82,7 +82,6 @@ class CommandSajoin : public Command } else { - ServerInstance->SNO->WriteToSnoMask('a', user->nick+" sent remote SAJOIN to make "+dest->nick+" join "+parameters[1]); return CMD_SUCCESS; } } |