diff options
| author | Adam <Adam@anope.org> | 2016-11-25 16:35:10 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2016-11-25 16:35:56 -0500 |
| commit | a635344582a13d935631fbe930d79d3788359c8a (patch) | |
| tree | cd7b372d02f94c7f6c18542e06d29deff0f19842 /modules/botserv | |
| parent | f30d99f81f6fb8abd7ca555068173bad6c99e07a (diff) | |
Rename most ext fields names to be consistent with everything else, add accessors for many
Diffstat (limited to 'modules/botserv')
| -rw-r--r-- | modules/botserv/assign.cpp | 2 | ||||
| -rw-r--r-- | modules/botserv/badwords.cpp | 2 | ||||
| -rw-r--r-- | modules/botserv/main/botserv.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/botserv/assign.cpp b/modules/botserv/assign.cpp index 95691b6a9..eca103e9f 100644 --- a/modules/botserv/assign.cpp +++ b/modules/botserv/assign.cpp @@ -140,7 +140,7 @@ class CommandBSUnassign : public Command return; } - if (ci->HasFieldS("PERSIST") && !ModeManager::FindChannelModeByName("PERM")) + if (ci->IsPersist() && !ModeManager::FindChannelModeByName("PERM")) { source.Reply(_("You cannot unassign bots while persist is set on the channel.")); return; diff --git a/modules/botserv/badwords.cpp b/modules/botserv/badwords.cpp index 1348c8aff..914e89ea9 100644 --- a/modules/botserv/badwords.cpp +++ b/modules/botserv/badwords.cpp @@ -50,7 +50,7 @@ class BadWordsType : public Serialize::Type<BadWordImpl> Serialize::Field<BadWordImpl, BadWordType> type; BadWordsType(Module *me) : Serialize::Type<BadWordImpl>(me) - , channel(this, "ci", &BadWordImpl::channel, true) + , channel(this, "channel", &BadWordImpl::channel, true) , word(this, "word", &BadWordImpl::word) , type(this, "type", &BadWordImpl::type) { diff --git a/modules/botserv/main/botserv.cpp b/modules/botserv/main/botserv.cpp index a297db153..c6e1c6413 100644 --- a/modules/botserv/main/botserv.cpp +++ b/modules/botserv/main/botserv.cpp @@ -127,7 +127,7 @@ class BotServCore : public Module, public BotServ::BotServService void OnLeaveChannel(User *u, Channel *c) override { /* Channel is persistent, it shouldn't be deleted and the service bot should stay */ - if (c->ci && c->ci->HasFieldS("PERSIST")) + if (c->ci && c->ci->IsPersist()) return; /* Channel is syncing from a netburst, don't destroy it as more users are probably wanting to join immediately @@ -219,7 +219,7 @@ class BotServCore : public Module, public BotServ::BotServService /* Set default bot flags */ spacesepstream sep(Config->GetModule(this)->Get<Anope::string>("defaults", "greet fantasy")); for (Anope::string token; sep.GetToken(token);) - ci->SetS<bool>("BS_" + token.upper(), true); + ci->SetS<bool>(token, true); } void OnUserKicked(const MessageSource &source, User *target, const Anope::string &channel, ChannelStatus &status, const Anope::string &kickmsg) override |
