diff options
author | Adam <Adam@anope.org> | 2017-10-07 21:11:06 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2017-10-07 21:11:06 -0400 |
commit | 85f10a20bb3f59afb0d97e42452f2aea60882551 (patch) | |
tree | e3d6bbb3eb75c4165907bb5d551b623ca0777d2b /modules | |
parent | 2312f1fbd06ac01bb55e1d99070cde05a09a5a17 (diff) |
Fix mode locks
Diffstat (limited to 'modules')
-rw-r--r-- | modules/chanserv/mode.cpp | 9 | ||||
-rw-r--r-- | modules/chanserv/register.cpp | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/modules/chanserv/mode.cpp b/modules/chanserv/mode.cpp index 7d7f7c85d..9b98534a0 100644 --- a/modules/chanserv/mode.cpp +++ b/modules/chanserv/mode.cpp @@ -108,7 +108,7 @@ Anope::string ModeLockImpl::GetParam() void ModeLockImpl::SetParam(const Anope::string &p) { - Set(&ModeLockType::name, p); + Set(&ModeLockType::param, p); } Anope::string ModeLockImpl::GetSetter() @@ -118,7 +118,7 @@ Anope::string ModeLockImpl::GetSetter() void ModeLockImpl::SetSetter(const Anope::string &s) { - Set(&ModeLockType::name, s); + Set(&ModeLockType::setter, s); } time_t ModeLockImpl::GetCreated() @@ -193,7 +193,7 @@ class ModeLocksImpl : public ModeLocks if (MOD_RESULT == EVENT_STOP) break; - delete m; + m->Delete(); return true; } @@ -352,7 +352,8 @@ class CommandCSMode : public Command break; } - mlocks->SetMLock(ci, cm, adding, mode_param, source.GetNick()); + if (!mlocks->SetMLock(ci, cm, adding, mode_param, source.GetNick())) + continue; if (adding) { diff --git a/modules/chanserv/register.cpp b/modules/chanserv/register.cpp index 00fc00927..c00470a2d 100644 --- a/modules/chanserv/register.cpp +++ b/modules/chanserv/register.cpp @@ -125,11 +125,13 @@ class CommandCSRegister : public Command /* Implement new mode lock */ if (c) { - c->CheckModes(); if (u) c->SetCorrectModes(u, true); EventManager::Get()->Dispatch(&Event::ChanRegistered::OnChanRegistered, ci); + + // Check modes after default lock is applied + c->CheckModes(); } } |