From a635344582a13d935631fbe930d79d3788359c8a Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 25 Nov 2016 16:35:10 -0500 Subject: Rename most ext fields names to be consistent with everything else, add accessors for many --- modules/botserv/assign.cpp | 2 +- modules/botserv/badwords.cpp | 2 +- modules/botserv/main/botserv.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/botserv') 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 Serialize::Field type; BadWordsType(Module *me) : Serialize::Type(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("defaults", "greet fantasy")); for (Anope::string token; sep.GetToken(token);) - ci->SetS("BS_" + token.upper(), true); + ci->SetS(token, true); } void OnUserKicked(const MessageSource &source, User *target, const Anope::string &channel, ChannelStatus &status, const Anope::string &kickmsg) override -- cgit