mirror of
https://github.com/anope/anope.git
synced 2026-06-29 21:46:38 +02:00
Remove operserv/oline and CanSVSO/SendSVSO in IRCDProto.
Now UnrealIRCd 3.2.x support has been removed nothing uses this.
This commit is contained in:
+3
-3
@@ -740,7 +740,7 @@ log
|
||||
{
|
||||
bot = "Global"
|
||||
target = "globops"
|
||||
admin = "global/* operserv/chankill operserv/mode operserv/kick operserv/akill operserv/s*line operserv/noop operserv/jupe operserv/oline operserv/set operserv/svsnick operserv/svsjoin operserv/svspart nickserv/getpass */drop"
|
||||
admin = "global/* operserv/chankill operserv/mode operserv/kick operserv/akill operserv/s*line operserv/noop operserv/jupe operserv/set operserv/svsnick operserv/svsjoin operserv/svspart nickserv/getpass */drop"
|
||||
servers = "squit"
|
||||
users = "oper"
|
||||
other = "expire/* bados akill/*"
|
||||
@@ -810,7 +810,7 @@ log
|
||||
* operserv/oper operserv/config operserv/umode operserv/logsearch
|
||||
* operserv/modload operserv/jupe operserv/set operserv/noop
|
||||
* operserv/quit operserv/update operserv/reload operserv/restart
|
||||
* operserv/shutdown operserv/svs operserv/oline operserv/kill
|
||||
* operserv/shutdown operserv/svs operserv/kill
|
||||
*
|
||||
* Firstly, we define 'opertypes' which are named whatever we want ('Network Administrator', etc).
|
||||
* These can contain commands for oper-only strings (see above) which grants access to that specific command,
|
||||
@@ -864,7 +864,7 @@ opertype
|
||||
|
||||
inherits = "Services Operator"
|
||||
|
||||
commands = "botserv/* chanserv/access/list chanserv/drop chanserv/getkey chanserv/saset/noexpire memoserv/sendall nickserv/saset/* nickserv/getemail operserv/news operserv/jupe operserv/svs operserv/stats operserv/oline operserv/noop operserv/forbid global/*"
|
||||
commands = "botserv/* chanserv/access/list chanserv/drop chanserv/getkey chanserv/saset/noexpire memoserv/sendall nickserv/saset/* nickserv/getemail operserv/news operserv/jupe operserv/svs operserv/stats operserv/noop operserv/forbid global/*"
|
||||
|
||||
privs = "*"
|
||||
}
|
||||
|
||||
@@ -506,17 +506,6 @@ command { service = "OperServ"; name = "RANDOMNEWS"; command = "operserv/randomn
|
||||
module { name = "os_noop" }
|
||||
command { service = "OperServ"; name = "NOOP"; command = "operserv/noop"; permission = "operserv/noop"; }
|
||||
|
||||
/*
|
||||
* os_oline
|
||||
*
|
||||
* Provides the command operserv/oline.
|
||||
*
|
||||
* Used to set oper flags on users, and is specific to UnrealIRCd 3.2.
|
||||
* See /helpop ?svso on your IRCd for more information.
|
||||
*/
|
||||
#module { name = "os_oline" }
|
||||
#command { service = "OperServ"; name = "OLINE"; command = "operserv/oline"; permission = "operserv/oline"; }
|
||||
|
||||
/*
|
||||
* os_oper
|
||||
*
|
||||
|
||||
@@ -60,8 +60,6 @@ class CoreExport IRCDProto : public Service
|
||||
bool CanSZLine;
|
||||
/* Can we place temporary holds on specific nicknames? */
|
||||
bool CanSVSHold;
|
||||
/* See os_oline */
|
||||
bool CanSVSO;
|
||||
/* See ns_cert */
|
||||
bool CanCertFP;
|
||||
/* Whether this IRCd requires unique IDs for each user or server. See TS6/P10. */
|
||||
@@ -179,10 +177,6 @@ class CoreExport IRCDProto : public Service
|
||||
virtual void SendInvite(const MessageSource &source, const Channel *c, User *u);
|
||||
virtual void SendGlobops(const MessageSource &source, const char *fmt, ...);
|
||||
|
||||
/** Sets oper flags on a user, currently only supported by Unreal
|
||||
*/
|
||||
virtual void SendSVSO(BotInfo *, const Anope::string &, const Anope::string &) { }
|
||||
|
||||
/** Sends a nick change of one of our clients.
|
||||
*/
|
||||
virtual void SendNickChange(User *u, const Anope::string &newnick);
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
/* OperServ core functions
|
||||
*
|
||||
* (C) 2003-2020 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
#include "module.h"
|
||||
|
||||
class CommandOSOLine : public Command
|
||||
{
|
||||
public:
|
||||
CommandOSOLine(Module *creator) : Command(creator, "operserv/oline", 2, 2)
|
||||
{
|
||||
this->SetDesc(_("Give Operflags to a certain user"));
|
||||
this->SetSyntax(_("\037nick\037 \037flags\037"));
|
||||
}
|
||||
|
||||
void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override
|
||||
{
|
||||
const Anope::string &nick = params[0];
|
||||
const Anope::string &flag = params[1];
|
||||
User *u2 = NULL;
|
||||
|
||||
/* let's check whether the user is online */
|
||||
if (!(u2 = User::Find(nick, true)))
|
||||
source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
|
||||
else if (u2 && flag[0] == '+')
|
||||
{
|
||||
IRCD->SendSVSO(source.service, nick, flag);
|
||||
u2->SetMode(source.service, "OPER");
|
||||
u2->SendMessage(source.service, _("You are now an IRC Operator."));
|
||||
source.Reply(_("Operflags \002%s\002 have been added for \002%s\002."), flag.c_str(), nick.c_str());
|
||||
Log(LOG_ADMIN, source, this) << "for " << nick;
|
||||
}
|
||||
else if (u2 && flag[0] == '-')
|
||||
{
|
||||
IRCD->SendSVSO(source.service, nick, flag);
|
||||
source.Reply(_("Operflags \002%s\002 have been removed from \002%s\002."), flag.c_str(), nick.c_str());
|
||||
Log(LOG_ADMIN, source, this) << "for " << nick;
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
|
||||
{
|
||||
this->SendSyntax(source);
|
||||
source.Reply(" ");
|
||||
source.Reply(_("Allows Services Operators to give Operflags to any user.\n"
|
||||
"Flags have to be prefixed with a \"+\" or a \"-\". To\n"
|
||||
"remove all flags simply type a \"-\" instead of any flags."));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class OSOLine : public Module
|
||||
{
|
||||
CommandOSOLine commandosoline;
|
||||
|
||||
public:
|
||||
OSOLine(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
|
||||
commandosoline(this)
|
||||
{
|
||||
|
||||
if (!IRCD || !IRCD->CanSVSO)
|
||||
throw ModuleException("Your IRCd does not support OMODE.");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
MODULE_INIT(OSOLine)
|
||||
+1
-1
@@ -25,7 +25,7 @@ IRCDProto::IRCDProto(Module *creator, const Anope::string &p) : Service(creator,
|
||||
{
|
||||
DefaultPseudoclientModes = "+io";
|
||||
CanSVSNick = CanSVSJoin = CanSetVHost = CanSetVIdent = CanSNLine = CanSQLine = CanSQLineChannel
|
||||
= CanSZLine = CanSVSHold = CanSVSO = CanCertFP = RequiresID = AmbiguousID = false;
|
||||
= CanSZLine = CanSVSHold = CanCertFP = RequiresID = AmbiguousID = false;
|
||||
MaxModes = 3;
|
||||
MaxLine = 512;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user