diff options
author | Sadie Powell <sadie@witchery.services> | 2024-10-11 16:55:36 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-10-11 16:55:36 +0100 |
commit | 883935c3e08c5aeccd448192901e1ed549d31a22 (patch) | |
tree | ab3cf907a656c6baa492736294f927f30509679a /modules/chanserv | |
parent | 3da9b6df0d4a02225f82f809d76fb8f5a27cb6a4 (diff) | |
parent | 6d34054b7889d9271e06f67889209f3f9f566f58 (diff) |
Merge branch '2.0' into 2.1.
Diffstat (limited to 'modules/chanserv')
-rw-r--r-- | modules/chanserv/cs_set.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/chanserv/cs_set.cpp b/modules/chanserv/cs_set.cpp index 4f39574af..a68aefa3c 100644 --- a/modules/chanserv/cs_set.cpp +++ b/modules/chanserv/cs_set.cpp @@ -513,12 +513,13 @@ public: /* Set the perm mode */ if (cm) { - if (ci->c && !ci->c->HasMode("PERM")) - ci->c->SetMode(NULL, cm); /* Add it to the channels mlock */ ModeLocks *ml = ci->Require<ModeLocks>("modelocks"); if (ml) ml->SetMLock(cm, true, "", source.GetNick()); + + if (ci->c && !ci->c->HasMode("PERM")) + ci->c->SetMode(NULL, cm); } /* No botserv bot, no channel mode, give them ChanServ. * Yes, this works fine with no BotServ. @@ -556,12 +557,13 @@ public: /* Unset perm mode */ if (cm) { - if (ci->c && ci->c->HasMode("PERM")) - ci->c->RemoveMode(NULL, cm); /* Remove from mlock */ ModeLocks *ml = ci->GetExt<ModeLocks>("modelocks"); if (ml) ml->RemoveMLock(cm, true); + + if (ci->c && ci->c->HasMode("PERM")) + ci->c->RemoveMode(NULL, cm); } /* No channel mode, no BotServ, but using ChanServ as the botserv bot * which was assigned when persist was set on |