mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Fix naming convention to be consistant. (cmd_ -> Command)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10891 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
abdc701198
commit
187544bfd0
@ -207,12 +207,12 @@ class CoreExport CommandParser : public classbase
|
||||
/** Command handler class for the RELOAD command.
|
||||
* A command cant really reload itself, so this has to be in here.
|
||||
*/
|
||||
class cmd_reload : public Command
|
||||
class CommandReload : public Command
|
||||
{
|
||||
public:
|
||||
/** Standard constructor
|
||||
*/
|
||||
cmd_reload (InspIRCd* Instance) : Command(Instance,"RELOAD","o",1) { syntax = "<core-command>"; }
|
||||
CommandReload (InspIRCd* Instance) : Command(Instance,"RELOAD","o",1) { syntax = "<core-command>"; }
|
||||
/** Handle RELOAD
|
||||
*/
|
||||
CmdResult Handle(const std::vector<std::string>& parameters, User *user);
|
||||
|
@ -525,7 +525,7 @@ bool CommandParser::ReloadCommand(std::string cmd, User* user)
|
||||
return false;
|
||||
}
|
||||
|
||||
CmdResult cmd_reload::Handle(const std::vector<std::string>& parameters, User *user)
|
||||
CmdResult CommandReload::Handle(const std::vector<std::string>& parameters, User *user)
|
||||
{
|
||||
if (parameters.size() < 1)
|
||||
return CMD_FAILURE;
|
||||
@ -606,7 +606,7 @@ void CommandParser::SetupCommandTable()
|
||||
}
|
||||
|
||||
if (cmdlist.find("RELOAD") == cmdlist.end())
|
||||
this->CreateCommand(new cmd_reload(ServerInstance));
|
||||
this->CreateCommand(new CommandReload(ServerInstance));
|
||||
}
|
||||
|
||||
int CommandParser::TranslateUIDs(TranslateType to, const std::string &source, std::string &dest)
|
||||
|
@ -19,10 +19,10 @@
|
||||
|
||||
/** Handle /FINGERPRINT
|
||||
*/
|
||||
class cmd_fingerprint : public Command
|
||||
class CommandFingerprint : public Command
|
||||
{
|
||||
public:
|
||||
cmd_fingerprint (InspIRCd* Instance) : Command(Instance,"FINGERPRINT", 0, 1)
|
||||
CommandFingerprint (InspIRCd* Instance) : Command(Instance,"FINGERPRINT", 0, 1)
|
||||
{
|
||||
this->source = "m_ssl_oper_cert.so";
|
||||
syntax = "<nickname>";
|
||||
@ -67,14 +67,14 @@ class ModuleOperSSLCert : public Module
|
||||
{
|
||||
ssl_cert* cert;
|
||||
bool HasCert;
|
||||
cmd_fingerprint* mycommand;
|
||||
CommandFingerprint* mycommand;
|
||||
ConfigReader* cf;
|
||||
public:
|
||||
|
||||
ModuleOperSSLCert(InspIRCd* Me)
|
||||
: Module(Me)
|
||||
{
|
||||
mycommand = new cmd_fingerprint(ServerInstance);
|
||||
mycommand = new CommandFingerprint(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
cf = new ConfigReader(ServerInstance);
|
||||
Implementation eventlist[] = { I_OnPreCommand, I_OnRehash };
|
||||
|
@ -19,10 +19,10 @@
|
||||
|
||||
/** Handle /SSLINFO
|
||||
*/
|
||||
class cmd_sslinfo : public Command
|
||||
class CommandSSLInfo : public Command
|
||||
{
|
||||
public:
|
||||
cmd_sslinfo (InspIRCd* Instance) : Command(Instance,"SSLINFO", 0, 1)
|
||||
CommandSSLInfo (InspIRCd* Instance) : Command(Instance,"SSLINFO", 0, 1)
|
||||
{
|
||||
this->source = "m_sslinfo.so";
|
||||
this->syntax = "<nick>";
|
||||
@ -61,13 +61,13 @@ class cmd_sslinfo : public Command
|
||||
|
||||
class ModuleSSLInfo : public Module
|
||||
{
|
||||
cmd_sslinfo* newcommand;
|
||||
CommandSSLInfo* newcommand;
|
||||
public:
|
||||
ModuleSSLInfo(InspIRCd* Me)
|
||||
: Module(Me)
|
||||
{
|
||||
|
||||
newcommand = new cmd_sslinfo(ServerInstance);
|
||||
newcommand = new CommandSSLInfo(ServerInstance);
|
||||
ServerInstance->AddCommand(newcommand);
|
||||
|
||||
}
|
||||
|
@ -67,13 +67,13 @@ class ShunFactory : public XLineFactory
|
||||
|
||||
//typedef std::vector<Shun> shunlist;
|
||||
|
||||
class cmd_shun : public Command
|
||||
class CommandShun : public Command
|
||||
{
|
||||
private:
|
||||
InspIRCd *Srv;
|
||||
|
||||
public:
|
||||
cmd_shun(InspIRCd* Me) : Command(Me, "SHUN", "o", 1, 3), Srv(Me)
|
||||
CommandShun(InspIRCd* Me) : Command(Me, "SHUN", "o", 1, 3), Srv(Me)
|
||||
{
|
||||
this->source = "m_shun.so";
|
||||
this->syntax = "<nick!user@hostmask> [<shun-duration>] :<reason>";
|
||||
@ -143,7 +143,7 @@ class cmd_shun : public Command
|
||||
|
||||
class ModuleShun : public Module
|
||||
{
|
||||
cmd_shun* mycommand;
|
||||
CommandShun* mycommand;
|
||||
ShunFactory *f;
|
||||
std::map<std::string, bool> ShunEnabledCommands;
|
||||
bool NotifyOfShun;
|
||||
@ -154,7 +154,7 @@ class ModuleShun : public Module
|
||||
f = new ShunFactory(ServerInstance);
|
||||
ServerInstance->XLines->RegisterFactory(f);
|
||||
|
||||
mycommand = new cmd_shun(ServerInstance);
|
||||
mycommand = new CommandShun(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
|
||||
Implementation eventlist[] = { I_OnStats, I_OnPreCommand, I_OnUserConnect, I_OnRehash };
|
||||
|
@ -38,9 +38,9 @@ ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me)
|
||||
{
|
||||
ServerInstance->Modules->UseInterface("BufferedSocketHook");
|
||||
Utils = new SpanningTreeUtilities(ServerInstance, this);
|
||||
command_rconnect = new cmd_rconnect(ServerInstance, this, Utils);
|
||||
command_rconnect = new CommandRConnect(ServerInstance, this, Utils);
|
||||
ServerInstance->AddCommand(command_rconnect);
|
||||
command_rsquit = new cmd_rsquit(ServerInstance, this, Utils);
|
||||
command_rsquit = new CommandRSQuit(ServerInstance, this, Utils);
|
||||
ServerInstance->AddCommand(command_rsquit);
|
||||
RefreshTimer = new CacheRefreshTimer(ServerInstance, Utils);
|
||||
ServerInstance->Timers->AddTimer(RefreshTimer);
|
||||
|
@ -30,8 +30,8 @@ const long ProtocolVersion = 1201;
|
||||
|
||||
/** Forward declarations
|
||||
*/
|
||||
class cmd_rconnect;
|
||||
class cmd_rsquit;
|
||||
class CommandRConnect;
|
||||
class CommandRSQuit;
|
||||
class SpanningTreeUtilities;
|
||||
class CacheRefreshTimer;
|
||||
class TreeServer;
|
||||
@ -45,8 +45,8 @@ class ModuleSpanningTree : public Module
|
||||
int NumServers;
|
||||
unsigned int max_local;
|
||||
unsigned int max_global;
|
||||
cmd_rconnect* command_rconnect;
|
||||
cmd_rsquit* command_rsquit;
|
||||
CommandRConnect* command_rconnect;
|
||||
CommandRSQuit* command_rsquit;
|
||||
SpanningTreeUtilities* Utils;
|
||||
|
||||
public:
|
||||
|
@ -28,13 +28,13 @@
|
||||
|
||||
/* $ModDep: m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h */
|
||||
|
||||
cmd_rconnect::cmd_rconnect (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util) : Command(Instance, "RCONNECT", "o", 2), Creator(Callback), Utils(Util)
|
||||
CommandRConnect::CommandRConnect (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util) : Command(Instance, "RCONNECT", "o", 2), Creator(Callback), Utils(Util)
|
||||
{
|
||||
this->source = "m_spanningtree.so";
|
||||
syntax = "<remote-server-mask> <target-server-mask>";
|
||||
}
|
||||
|
||||
CmdResult cmd_rconnect::Handle (const std::vector<std::string>& parameters, User *user)
|
||||
CmdResult CommandRConnect::Handle (const std::vector<std::string>& parameters, User *user)
|
||||
{
|
||||
if (IS_LOCAL(user))
|
||||
{
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
/** Handle /RCONNECT
|
||||
*/
|
||||
class cmd_rconnect : public Command
|
||||
class CommandRConnect : public Command
|
||||
{
|
||||
Module* Creator; /* Creator */
|
||||
SpanningTreeUtilities* Utils; /* Utility class */
|
||||
public:
|
||||
cmd_rconnect (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);
|
||||
CommandRConnect (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);
|
||||
CmdResult Handle (const std::vector<std::string>& parameters, User *user);
|
||||
};
|
||||
|
||||
|
@ -26,13 +26,13 @@
|
||||
|
||||
/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h m_spanningtree/rsquit.h */
|
||||
|
||||
cmd_rsquit::cmd_rsquit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util) : Command(Instance, "RSQUIT", "o", 1), Creator(Callback), Utils(Util)
|
||||
CommandRSQuit::CommandRSQuit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util) : Command(Instance, "RSQUIT", "o", 1), Creator(Callback), Utils(Util)
|
||||
{
|
||||
this->source = "m_spanningtree.so";
|
||||
syntax = "<target-server-mask> [reason]";
|
||||
}
|
||||
|
||||
CmdResult cmd_rsquit::Handle (const std::vector<std::string>& parameters, User *user)
|
||||
CmdResult CommandRSQuit::Handle (const std::vector<std::string>& parameters, User *user)
|
||||
{
|
||||
TreeServer *server_target; // Server to squit
|
||||
TreeServer *server_linked; // Server target is linked to
|
||||
@ -71,7 +71,7 @@ CmdResult cmd_rsquit::Handle (const std::vector<std::string>& parameters, User *
|
||||
}
|
||||
|
||||
// XXX use protocol interface instead of rolling our own :)
|
||||
void cmd_rsquit::NoticeUser(User* user, const std::string &msg)
|
||||
void CommandRSQuit::NoticeUser(User* user, const std::string &msg)
|
||||
{
|
||||
if (IS_LOCAL(user))
|
||||
{
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
/** Handle /RCONNECT
|
||||
*/
|
||||
class cmd_rsquit : public Command
|
||||
class CommandRSQuit : public Command
|
||||
{
|
||||
Module* Creator; /* Creator */
|
||||
SpanningTreeUtilities* Utils; /* Utility class */
|
||||
public:
|
||||
cmd_rsquit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);
|
||||
CommandRSQuit (InspIRCd* Instance, Module* Callback, SpanningTreeUtilities* Util);
|
||||
CmdResult Handle (const std::vector<std::string>& parameters, User *user);
|
||||
void NoticeUser(User* user, const std::string &msg);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user