diff options
| author | Adam <Adam@anope.org> | 2017-05-29 12:49:22 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2017-05-29 13:11:16 -0400 |
| commit | 3f143633541a5361bf5b02b0d69b65447aea7b79 (patch) | |
| tree | 3a33bd044bc8936150dcab38f355f3c3726b05e5 /modules/chanserv | |
| parent | e36d24a6c500b5ad921041fcb905f684c09d71e9 (diff) | |
Remove recognized status and secure
Also remove /ns status, which is now almost useless with no recognized
status, and /ns access.
Diffstat (limited to 'modules/chanserv')
| -rw-r--r-- | modules/chanserv/main/channel.cpp | 16 | ||||
| -rw-r--r-- | modules/chanserv/main/channel.h | 4 | ||||
| -rw-r--r-- | modules/chanserv/main/channeltype.cpp | 1 | ||||
| -rw-r--r-- | modules/chanserv/main/channeltype.h | 2 | ||||
| -rw-r--r-- | modules/chanserv/set.cpp | 71 |
5 files changed, 1 insertions, 93 deletions
diff --git a/modules/chanserv/main/channel.cpp b/modules/chanserv/main/channel.cpp index b9e519427..5f7c71c8c 100644 --- a/modules/chanserv/main/channel.cpp +++ b/modules/chanserv/main/channel.cpp @@ -247,16 +247,6 @@ void ChannelImpl::SetRestricted(bool restricted) Set(&ChannelType::restricted, restricted); } -bool ChannelImpl::IsSecure() -{ - return Get(&ChannelType::secure); -} - -void ChannelImpl::SetSecure(bool secure) -{ - Set(&ChannelType::secure, secure); -} - bool ChannelImpl::IsSecureOps() { return Get(&ChannelType::secureops); @@ -370,12 +360,6 @@ ChanServ::AccessGroup ChannelImpl::AccessFor(const User *u, bool updateLastUsed) return group; NickServ::Account *nc = u->Account(); - if (nc == NULL && !this->IsSecure() && u->IsRecognized()) - { - NickServ::Nick *na = NickServ::FindNick(u->nick); - if (na != NULL) - nc = na->GetAccount(); - } group.super_admin = u->super_admin; group.founder = IsFounder(u); diff --git a/modules/chanserv/main/channel.h b/modules/chanserv/main/channel.h index cd419b351..eebddf91b 100644 --- a/modules/chanserv/main/channel.h +++ b/modules/chanserv/main/channel.h @@ -35,7 +35,6 @@ class ChannelImpl : public ChanServ::Channel Serialize::Storage<bool> peace; Serialize::Storage<bool> securefounder; Serialize::Storage<bool> restricted; - Serialize::Storage<bool> secure; Serialize::Storage<bool> secureops; Serialize::Storage<bool> signkick; Serialize::Storage<bool> signkicklevel; @@ -110,9 +109,6 @@ class ChannelImpl : public ChanServ::Channel bool IsRestricted() override; void SetRestricted(bool) override; - bool IsSecure() override; - void SetSecure(bool) override; - bool IsSecureOps() override; void SetSecureOps(bool) override; diff --git a/modules/chanserv/main/channeltype.cpp b/modules/chanserv/main/channeltype.cpp index 8e5c10b48..ca74263cd 100644 --- a/modules/chanserv/main/channeltype.cpp +++ b/modules/chanserv/main/channeltype.cpp @@ -39,7 +39,6 @@ ChannelType::ChannelType(Module *me) : Serialize::Type<ChannelImpl>(me) , peace(this, "peace", &ChannelImpl::peace) , securefounder(this, "securefounder", &ChannelImpl::securefounder) , restricted(this, "restricted", &ChannelImpl::restricted) - , secure(this, "secure", &ChannelImpl::secure) , secureops(this, "secureops", &ChannelImpl::secureops) , signkick(this, "signkick", &ChannelImpl::signkick) , signkicklevel(this, "signkicklevel", &ChannelImpl::signkicklevel) diff --git a/modules/chanserv/main/channeltype.h b/modules/chanserv/main/channeltype.h index 1e10f01ea..af4bc6cc9 100644 --- a/modules/chanserv/main/channeltype.h +++ b/modules/chanserv/main/channeltype.h @@ -48,7 +48,7 @@ class ChannelType : public Serialize::Type<ChannelImpl> Serialize::ObjectField<ChannelImpl, BotInfo *> servicebot; Serialize::Field<ChannelImpl, bool> greet, fantasy, noautoop, peace, securefounder, - restricted, secure, secureops, signkick, signkicklevel, noexpire, keepmodes, + restricted, secureops, signkick, signkicklevel, noexpire, keepmodes, persist, topiclock, keeptopic, _private; ChannelType(Module *); diff --git a/modules/chanserv/set.cpp b/modules/chanserv/set.cpp index 0dbb8c65c..b35d3ae51 100644 --- a/modules/chanserv/set.cpp +++ b/modules/chanserv/set.cpp @@ -702,73 +702,6 @@ class CommandCSSetRestricted : public Command } }; -class CommandCSSetSecure : public Command -{ - public: - CommandCSSetSecure(Module *creator, const Anope::string &cname = "chanserv/set/secure") : Command(creator, cname, 2, 2) - { - this->SetDesc(_("Activate security features")); - this->SetSyntax(_("\037channel\037 {ON | OFF}")); - } - - void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override - { - const Anope::string &chan = params[0]; - const Anope::string ¶m = params[1]; - - if (Anope::ReadOnly) - { - source.Reply(_("Services are in read-only mode.")); - return; - } - - ChanServ::Channel *ci = ChanServ::Find(chan); - if (ci == NULL) - { - source.Reply(_("Channel \002{0}\002 isn't registered."), chan); - return; - } - - EventReturn MOD_RESULT; - MOD_RESULT = EventManager::Get()->Dispatch(&Event::SetChannelOption::OnSetChannelOption, source, this, ci, param); - if (MOD_RESULT == EVENT_STOP) - return; - - if (MOD_RESULT != EVENT_ALLOW && !source.AccessFor(ci).HasPriv("SET") && source.GetPermission().empty() && !source.HasOverridePriv("chanserv/administration")) - { - source.Reply(_("Access denied. You do not have privilege \002{0}\002 on \002{1}\002."), "SET", ci->GetName()); - return; - } - - if (param.equals_ci("ON")) - { - logger.Command(source, ci, _("{source} used {command} on {channel} to enable secure")); - - ci->SetSecure(true); - source.Reply(_("Secure option for \002{0}\002 is now \002on\002."), ci->GetName()); - } - else if (param.equals_ci("OFF")) - { - logger.Command(source, ci, _("{source} used {command} on {channel} to disable secure")); - - ci->SetSecure(false); - source.Reply(_("Secure option for \002{0}\002 is now \002off\002."), ci->GetName()); - } - else - { - this->OnSyntaxError(source, "SECURE"); - } - } - - bool OnHelp(CommandSource &source, const Anope::string &) override - { - source.Reply(_("Enables or disables security features for a channel." - " When \002secure\002 is set, only users who have logged in (eg. not recognized based on their hostmask)" - " will be given access to channels from account-based access entries")); - return true; - } -}; - class CommandCSSetSecureFounder : public Command { public: @@ -1143,7 +1076,6 @@ class CSSet : public Module CommandCSSetPeace commandcssetpeace; CommandCSSetPersist commandcssetpersist; CommandCSSetRestricted commandcssetrestricted; - CommandCSSetSecure commandcssetsecure; CommandCSSetSecureFounder commandcssetsecurefounder; CommandCSSetSecureOps commandcssetsecureops; CommandCSSetSignKick commandcssetsignkick; @@ -1176,7 +1108,6 @@ class CSSet : public Module , commandcssetpeace(this) , commandcssetpersist(this) , commandcssetrestricted(this) - , commandcssetsecure(this) , commandcssetsecurefounder(this) , commandcssetsecureops(this) , commandcssetsignkick(this) @@ -1301,8 +1232,6 @@ class CSSet : public Module info.AddOption(_("Peace")); if (ci->IsRestricted()) info.AddOption(_("Restricted access")); - if (ci->IsSecure()) - info.AddOption(_("Security")); if (ci->IsSecureFounder()) info.AddOption(_("Secure founder")); if (ci->IsSecureOps()) |
