1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Don't dynamically allocate commands in modules anymore, instead made them members of modules. This means the commands are automatically destructed when the module is unloaded. Cleans up some old ugly code.

This commit is contained in:
Adam
2010-07-31 21:37:45 -04:00
parent 9d0d44d738
commit c770c47e18
149 changed files with 743 additions and 444 deletions
+8 -2
View File
@@ -106,9 +106,15 @@ class CoreExport Command : public Flags<CommandFlag>
virtual bool AddSubcommand(Command *c);
/** Delete a subcommand from this command
* @param cname The subcommand name
* @param c The command
*/
virtual bool DelSubcommand(const Anope::string &cname);
virtual bool DelSubcommand(Command *c);
/** Find a subcommand
* @param name The subcommand name
* @return The subcommand
*/
virtual Command *FindSubcommand(const Anope::string &name);
};
#endif // COMMANDS_H
+3 -1
View File
@@ -73,13 +73,15 @@ class CommandBSAct : public Command
class BSAct : public Module
{
CommandBSAct commandbsact;
public:
BSAct(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(BotServ, new CommandBSAct());
this->AddCommand(BotServ, &commandbsact);
}
};
+3 -1
View File
@@ -83,13 +83,15 @@ class CommandBSAssign : public Command
class BSAssign : public Module
{
CommandBSAssign commandbsassign;
public:
BSAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(BotServ, new CommandBSAssign);
this->AddCommand(BotServ, &commandbsassign);
}
};
+3 -1
View File
@@ -270,13 +270,15 @@ class CommandBSBadwords : public Command
class BSBadwords : public Module
{
CommandBSBadwords commandbsbadwords;
public:
BSBadwords(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(BotServ, new CommandBSBadwords);
this->AddCommand(BotServ, &commandbsbadwords);
}
};
+3 -1
View File
@@ -396,13 +396,15 @@ class CommandBSBot : public Command
class BSBot : public Module
{
CommandBSBot commandbsbot;
public:
BSBot(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(BotServ, new CommandBSBot());
this->AddCommand(BotServ, &commandbsbot);
}
};
+3 -1
View File
@@ -81,13 +81,15 @@ class CommandBSBotList : public Command
class BSBotList : public Module
{
CommandBSBotList commandbsbotlist;
public:
BSBotList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(BotServ, new CommandBSBotList());
this->AddCommand(BotServ, &commandbsbotlist);
}
};
+3 -1
View File
@@ -41,13 +41,15 @@ class CommandBSHelp : public Command
class BSHelp : public Module
{
CommandBSHelp commandbshelp;
public:
BSHelp(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(BotServ, new CommandBSHelp());
this->AddCommand(BotServ, &commandbshelp);
}
};
+3 -1
View File
@@ -216,13 +216,15 @@ class CommandBSInfo : public Command
class BSInfo : public Module
{
CommandBSInfo commandbsinfo;
public:
BSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(BotServ, new CommandBSInfo());
this->AddCommand(BotServ, &commandbsinfo);
}
};
+3 -1
View File
@@ -376,13 +376,15 @@ class CommandBSKick : public Command
class BSKick : public Module
{
CommandBSKick commandbskick;
public:
BSKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(BotServ, new CommandBSKick());
this->AddCommand(BotServ, &commandbskick);
}
};
+3 -1
View File
@@ -79,13 +79,15 @@ class CommandBSSay : public Command
class BSSay : public Module
{
CommandBSSay commandbssay;
public:
BSSay(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(BotServ, new CommandBSSay());
this->AddCommand(BotServ, &commandbssay);
}
};
+3 -1
View File
@@ -203,13 +203,15 @@ class CommandBSSet : public Command
class BSSet : public Module
{
CommandBSSet commandbsset;
public:
BSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(BotServ, new CommandBSSet());
this->AddCommand(BotServ, &commandbsset);
}
};
+3 -1
View File
@@ -61,13 +61,15 @@ class CommandBSUnassign : public Command
class BSUnassign : public Module
{
CommandBSUnassign commandbsunassign;
public:
BSUnassign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(BotServ, new CommandBSUnassign);
this->AddCommand(BotServ, &commandbsunassign);
}
};
+5 -2
View File
@@ -609,14 +609,17 @@ class CommandCSLevels : public Command
class CSAccess : public Module
{
CommandCSAccess commandcsaccess;
CommandCSLevels commandcslevels;
public:
CSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSAccess());
this->AddCommand(ChanServ, new CommandCSLevels());
this->AddCommand(ChanServ, &commandcsaccess);
this->AddCommand(ChanServ, &commandcslevels);
}
};
+3 -1
View File
@@ -571,13 +571,15 @@ class CommandCSAKick : public Command
class CSAKick : public Module
{
CommandCSAKick commandcsakick;
public:
CSAKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSAKick());
this->AddCommand(ChanServ, &commandcsakick);
}
};
+5 -3
View File
@@ -92,14 +92,16 @@ class CommandCSBan : public Command
class CSBan : public Module
{
CommandCSBan commandcsban, commandcskb;
public:
CSBan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
CSBan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator), commandcsban("BAN"), commandcskb("KB")
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSBan("BAN"));
this->AddCommand(ChanServ, new CommandCSBan("KB"));
this->AddCommand(ChanServ, &commandcsban);
this->AddCommand(ChanServ, &commandcskb);
}
};
+3 -1
View File
@@ -162,13 +162,15 @@ class CommandCSClear : public Command
class CSClear : public Module
{
CommandCSClear commandcsclear;
public:
CSClear(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSClear());
this->AddCommand(ChanServ, &commandcsclear);
}
};
+3 -1
View File
@@ -104,13 +104,15 @@ class CommandCSDrop : public Command
class CSDrop : public Module
{
CommandCSDrop commandcsdrop;
public:
CSDrop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSDrop());
this->AddCommand(ChanServ, &commandcsdrop);
}
};
+3 -1
View File
@@ -116,13 +116,15 @@ class CommandCSForbid : public Command
class CSForbid : public Module
{
CommandCSForbid commandcsforbid;
public:
CSForbid(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSForbid());
this->AddCommand(ChanServ, &commandcsforbid);
}
};
+3 -1
View File
@@ -63,13 +63,15 @@ class CommandCSGetKey : public Command
class CSGetKey : public Module
{
CommandCSGetKey commandcsgetkey;
public:
CSGetKey(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSGetKey());
this->AddCommand(ChanServ, &commandcsgetkey);
}
};
+3 -1
View File
@@ -61,13 +61,15 @@ class CommandCSHelp : public Command
class CSHelp : public Module
{
CommandCSHelp commandcshelp;
public:
CSHelp(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSHelp());
this->AddCommand(ChanServ, &commandcshelp);
}
};
+3 -1
View File
@@ -146,13 +146,15 @@ class CommandCSInfo : public Command
class CSInfo : public Module
{
CommandCSInfo commandcsinfo;
public:
CSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSInfo());
this->AddCommand(ChanServ, &commandcsinfo);
}
};
+4 -1
View File
@@ -82,12 +82,15 @@ class CommandCSInvite : public Command
class CSInvite : public Module
{
CommandCSInvite commandcsinvite;
public:
CSInvite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSInvite());
this->AddCommand(ChanServ, &commandcsinvite);
}
};
+5 -3
View File
@@ -78,14 +78,16 @@ class CommandCSKick : public Command
class CSKick : public Module
{
CommandCSKick commandcskick, commandcsk;
public:
CSKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
CSKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator), commandcskick("KICK"), commandcsk("K")
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSKick("KICK"));
this->AddCommand(ChanServ, new CommandCSKick("K"));
this->AddCommand(ChanServ, &commandcskick);
this->AddCommand(ChanServ, &commandcsk);
}
};
+4 -2
View File
@@ -148,13 +148,15 @@ public:
class CSList : public Module
{
public:
CommandCSList commandcslist;
public:
CSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSList());
this->AddCommand(ChanServ, &commandcslist);
}
};
+27 -16
View File
@@ -399,16 +399,27 @@ class CommandCSDeOwner : public Command
class CSModes : public Module
{
CommandCSOwner commandcsowner;
CommandCSDeOwner commandcsdeowner;
CommandCSProtect commandcsprotect;
CommandCSDeProtect commandcsdeprotect;
CommandCSOp commandcsop;
CommandCSDeOp commandcsdeop;
CommandCSHalfOp commandcshalfop;
CommandCSDeHalfOp commandcsdehalfop;
CommandCSVoice commandcsvoice;
CommandCSDeVoice commandcsdevoice;
public:
CSModes(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSOp());
this->AddCommand(ChanServ, new CommandCSDeOp());
this->AddCommand(ChanServ, new CommandCSVoice());
this->AddCommand(ChanServ, new CommandCSDeVoice());
this->AddCommand(ChanServ, &commandcsop);
this->AddCommand(ChanServ, &commandcsdeop);
this->AddCommand(ChanServ, &commandcsvoice);
this->AddCommand(ChanServ, &commandcsdevoice);
if (Me && Me->IsSynced())
OnUplinkSync(NULL);
@@ -421,31 +432,31 @@ class CSModes : public Module
{
if (ModeManager::FindChannelModeByName(CMODE_OWNER))
{
this->AddCommand(ChanServ, new CommandCSOwner());
this->AddCommand(ChanServ, new CommandCSDeOwner());
this->AddCommand(ChanServ, &commandcsowner);
this->AddCommand(ChanServ, &commandcsdeowner);
}
if (ModeManager::FindChannelModeByName(CMODE_PROTECT))
{
this->AddCommand(ChanServ, new CommandCSProtect());
this->AddCommand(ChanServ, new CommandCSDeProtect());
this->AddCommand(ChanServ, &commandcsprotect);
this->AddCommand(ChanServ, &commandcsdeprotect);
}
if (ModeManager::FindChannelModeByName(CMODE_HALFOP))
{
this->AddCommand(ChanServ, new CommandCSHalfOp());
this->AddCommand(ChanServ, new CommandCSDeHalfOp());
this->AddCommand(ChanServ, &commandcshalfop);
this->AddCommand(ChanServ, &commandcsdehalfop);
}
}
void OnServerDisconnect()
{
this->DelCommand(ChanServ, FindCommand(ChanServ, "OWNER"));
this->DelCommand(ChanServ, FindCommand(ChanServ, "DEOWNER"));
this->DelCommand(ChanServ, FindCommand(ChanServ, "PROTECT"));
this->DelCommand(ChanServ, FindCommand(ChanServ, "DEPROTECT"));
this->DelCommand(ChanServ, FindCommand(ChanServ, "HALFOP"));
this->DelCommand(ChanServ, FindCommand(ChanServ, "DEHALFOP"));
this->DelCommand(ChanServ, &commandcsowner);
this->DelCommand(ChanServ, &commandcsdeowner);
this->DelCommand(ChanServ, &commandcsprotect);
this->DelCommand(ChanServ, &commandcsdeprotect);
this->DelCommand(ChanServ, &commandcshalfop);
this->DelCommand(ChanServ, &commandcsdehalfop);
}
};
+3 -1
View File
@@ -113,13 +113,15 @@ class CommandCSRegister : public Command
class CSRegister : public Module
{
CommandCSRegister commandcsregister;
public:
CSRegister(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSRegister());
this->AddCommand(ChanServ, &commandcsregister);
}
};
+6 -6
View File
@@ -19,14 +19,12 @@ class CommandCSSASet : public Command
subcommand_map subcommands;
public:
CommandCSSASet(const Anope::string &cname) : Command(cname, 2, 3)
CommandCSSASet() : Command("SASET", 2, 3)
{
}
~CommandCSSASet()
{
for (subcommand_map::const_iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
delete it->second;
this->subcommands.clear();
}
@@ -92,9 +90,9 @@ class CommandCSSASet : public Command
return this->subcommands.insert(std::make_pair(c->name, c)).second;
}
bool DelSubcommand(const Anope::string &command)
bool DelSubcommand(Command *c)
{
return this->subcommands.erase(command);
return this->subcommands.erase(c->name);
}
Command *FindCommand(const Anope::string &subcommand)
@@ -110,13 +108,15 @@ class CommandCSSASet : public Command
class CSSASet : public Module
{
CommandCSSASet commandcssaset;
public:
CSSASet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSSASet("SASET"));
this->AddCommand(ChanServ, &commandcssaset);
}
};
+5 -3
View File
@@ -16,7 +16,7 @@
class CommandCSSASetNoexpire : public Command
{
public:
CommandCSSASetNoexpire(const Anope::string &cname) : Command(cname, 2, 2, "chanserv/saset/noexpire")
CommandCSSASetNoexpire() : Command("NOEXPIRE", 2, 2, "chanserv/saset/noexpire")
{
}
@@ -61,6 +61,8 @@ class CommandCSSASetNoexpire : public Command
class CSSetNoexpire : public Module
{
CommandCSSASetNoexpire commandcssasetnoexpire;
public:
CSSetNoexpire(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -69,14 +71,14 @@ class CSSetNoexpire : public Module
Command *c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetNoexpire("NOEXPIRE"));
c->AddSubcommand(&commandcssasetnoexpire);
}
~CSSetNoexpire()
{
Command *c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("NOEXPIRE");
c->DelSubcommand(&commandcssasetnoexpire);
}
};
+6 -6
View File
@@ -19,14 +19,12 @@ class CommandCSSet : public Command
subcommand_map subcommands;
public:
CommandCSSet(const Anope::string &cname) : Command(cname, 2, 3)
CommandCSSet() : Command("SET", 2, 3)
{
}
~CommandCSSet()
{
for (subcommand_map::const_iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
delete it->second;
this->subcommands.clear();
}
@@ -97,9 +95,9 @@ class CommandCSSet : public Command
return this->subcommands.insert(std::make_pair(c->name, c)).second;
}
bool DelSubcommand(const Anope::string &command)
bool DelSubcommand(Command *c)
{
return this->subcommands.erase(command);
return this->subcommands.erase(c->name);
}
Command *FindCommand(const Anope::string &subcommand)
@@ -115,13 +113,15 @@ class CommandCSSet : public Command
class CSSet : public Module
{
CommandCSSet commandcsset;
public:
CSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSSet("SET"));
this->AddCommand(ChanServ, &commandcsset);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetBanType : public Command
{
public:
CommandCSSetBanType(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetBanType(const Anope::string &cpermission = "") : Command("BANTYPE", 2, 2, cpermission)
{
}
@@ -62,7 +62,7 @@ class CommandCSSetBanType : public Command
class CommandCSSASetBanType : public CommandCSSetBanType
{
public:
CommandCSSASetBanType(const Anope::string &cname) : CommandCSSetBanType(cname, "chanserv/saset/bantype")
CommandCSSASetBanType() : CommandCSSetBanType("chanserv/saset/bantype")
{
}
@@ -81,6 +81,9 @@ class CommandCSSASetBanType : public CommandCSSetBanType
class CSSetBanType : public Module
{
CommandCSSetBanType commandcssetbantype;
CommandCSSASetBanType commandcssasetbantype;
public:
CSSetBanType(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -89,22 +92,22 @@ class CSSetBanType : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetBanType("BANTYPE"));
c->AddSubcommand(&commandcssetbantype);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetBanType("BANTYPE"));
c->AddSubcommand(&commandcssasetbantype);
}
~CSSetBanType()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("BANTYPE");
c->DelSubcommand(&commandcssetbantype);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("BANTYPE");
c->DelSubcommand(&commandcssasetbantype);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetDescription : public Command
{
public:
CommandCSSetDescription(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetDescription(const Anope::string &cpermission = "") : Command("DESC", 2, 2, cpermission)
{
}
@@ -54,7 +54,7 @@ class CommandCSSetDescription : public Command
class CommandCSSASetDescription : public CommandCSSetDescription
{
public:
CommandCSSASetDescription(const Anope::string &cname) : CommandCSSetDescription(cname, "chanserv/saset/description")
CommandCSSASetDescription() : CommandCSSetDescription("chanserv/saset/description")
{
}
@@ -73,6 +73,9 @@ class CommandCSSASetDescription : public CommandCSSetDescription
class CSSetDescription : public Module
{
CommandCSSetDescription commandcssetdescription;
CommandCSSASetDescription commandcssasetdescription;
public:
CSSetDescription(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -81,22 +84,22 @@ class CSSetDescription : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetDescription("DESC"));
c->AddSubcommand(&commandcssetdescription);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetDescription("DESC"));
c->AddSubcommand(&commandcssasetdescription);
}
~CSSetDescription()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("DESC");
c->DelSubcommand(&commandcssetdescription);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("DESC");
c->DelSubcommand(&commandcssasetdescription);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetEntryMsg : public Command
{
public:
CommandCSSetEntryMsg(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 1, 2, cpermission)
CommandCSSetEntryMsg(const Anope::string &cpermission = "") : Command("ENTRYMSG", 1, 2, cpermission)
{
}
@@ -61,7 +61,7 @@ class CommandCSSetEntryMsg : public Command
class CommandCSSASetEntryMsg : public CommandCSSetEntryMsg
{
public:
CommandCSSASetEntryMsg(const Anope::string &cname) : CommandCSSetEntryMsg(cname, "chanserv/saset/entrymsg")
CommandCSSASetEntryMsg() : CommandCSSetEntryMsg("chanserv/saset/entrymsg")
{
}
@@ -80,6 +80,9 @@ class CommandCSSASetEntryMsg : public CommandCSSetEntryMsg
class CSSetEntryMsg : public Module
{
CommandCSSetEntryMsg commandcssetentrymsg;
CommandCSSASetEntryMsg commandcssasetentrymsg;
public:
CSSetEntryMsg(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -88,22 +91,22 @@ class CSSetEntryMsg : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetEntryMsg("ENTRYMSG"));
c->AddSubcommand(&commandcssetentrymsg);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetEntryMsg("ENTRYMSG"));
c->AddSubcommand(&commandcssasetentrymsg);
}
~CSSetEntryMsg()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("ENTRYMSG");
c->DelSubcommand(&commandcssetentrymsg);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("ENTRYMSG");
c->DelSubcommand(&commandcssasetentrymsg);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetFounder : public Command
{
public:
CommandCSSetFounder(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetFounder(const Anope::string &cpermission = "") : Command("FOUNDER", 2, 2, cpermission)
{
}
@@ -89,7 +89,7 @@ class CommandCSSetFounder : public Command
class CommandCSSASetFounder : public CommandCSSetFounder
{
public:
CommandCSSASetFounder(const Anope::string &cname) : CommandCSSetFounder(cname, "chanserv/saset/founder")
CommandCSSASetFounder() : CommandCSSetFounder("chanserv/saset/founder")
{
}
@@ -108,6 +108,9 @@ class CommandCSSASetFounder : public CommandCSSetFounder
class CSSetFounder : public Module
{
CommandCSSetFounder commandcssetfounder;
CommandCSSASetFounder commandcssasetfounder;
public:
CSSetFounder(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -116,22 +119,22 @@ class CSSetFounder : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetFounder("FOUNDER"));
c->AddSubcommand(&commandcssetfounder);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetFounder("FOUNDER"));
c->AddSubcommand(&commandcssasetfounder);
}
~CSSetFounder()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("FOUNDER");
c->DelSubcommand(&commandcssetfounder);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("FOUNDER");
c->DelSubcommand(&commandcssasetfounder);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetKeepTopic : public Command
{
public:
CommandCSSetKeepTopic(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetKeepTopic(const Anope::string &cpermission = "") : Command("KEEPTOPIC", 2, 2, cpermission)
{
}
@@ -62,7 +62,7 @@ class CommandCSSetKeepTopic : public Command
class CommandCSSASetKeepTopic : public CommandCSSetKeepTopic
{
public:
CommandCSSASetKeepTopic(const Anope::string &cname) : CommandCSSetKeepTopic(cname, "chanserv/saset/keeptopic")
CommandCSSASetKeepTopic() : CommandCSSetKeepTopic("chanserv/saset/keeptopic")
{
}
@@ -80,6 +80,9 @@ class CommandCSSASetKeepTopic : public CommandCSSetKeepTopic
class CSSetKeepTopic : public Module
{
CommandCSSetKeepTopic commandcssetkeeptopic;
CommandCSSASetKeepTopic commandcssasetkeeptopic;
public:
CSSetKeepTopic(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -88,22 +91,22 @@ class CSSetKeepTopic : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetKeepTopic("KEEPTOPIC"));
c->AddSubcommand(&commandcssetkeeptopic);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetKeepTopic("KEEPTOPIC"));
c->AddSubcommand(&commandcssasetkeeptopic);
}
~CSSetKeepTopic()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("KEEPTOPIC");
c->DelSubcommand(&commandcssetkeeptopic);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("KEEPTOPIC");
c->DelSubcommand(&commandcssasetkeeptopic);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetMLock : public Command
{
public:
CommandCSSetMLock(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 1, 0, cpermission)
CommandCSSetMLock(const Anope::string &cpermission = "") : Command("MLOCK", 1, 0, cpermission)
{
}
@@ -133,7 +133,7 @@ class CommandCSSetMLock : public Command
class CommandCSSASetMLock : public CommandCSSetMLock
{
public:
CommandCSSASetMLock(const Anope::string &cname) : CommandCSSetMLock(cname, "chanserv/saset/mlock")
CommandCSSASetMLock() : CommandCSSetMLock("chanserv/saset/mlock")
{
}
@@ -152,6 +152,9 @@ class CommandCSSASetMLock : public CommandCSSetMLock
class CSSetMLock : public Module
{
CommandCSSetMLock commandcssetmlock;
CommandCSSASetMLock commandcssasetmlock;
public:
CSSetMLock(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -160,22 +163,22 @@ class CSSetMLock : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetMLock("MLOCK"));
c->AddSubcommand(&commandcssetmlock);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetMLock("MLOCK"));
c->AddSubcommand(&commandcssasetmlock);
}
~CSSetMLock()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("MLOCK");
c->DelSubcommand(&commandcssetmlock);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("MLOCK");
c->DelSubcommand(&commandcssasetmlock);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetOpNotice : public Command
{
public:
CommandCSSetOpNotice(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetOpNotice(const Anope::string &cpermission = "") : Command("OPNOTICE", 2, 2, cpermission)
{
}
@@ -62,7 +62,7 @@ class CommandCSSetOpNotice : public Command
class CommandCSSASetOpNotice : public CommandCSSetOpNotice
{
public:
CommandCSSASetOpNotice(const Anope::string &cname) : CommandCSSetOpNotice(cname, "chanserv/saset/opnotice")
CommandCSSASetOpNotice() : CommandCSSetOpNotice("chanserv/saset/opnotice")
{
}
@@ -80,6 +80,9 @@ class CommandCSSASetOpNotice : public CommandCSSetOpNotice
class CSSetOpNotice : public Module
{
CommandCSSetOpNotice commandcssetopnotice;
CommandCSSASetOpNotice commandcssasetopnotice;
public:
CSSetOpNotice(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -88,22 +91,22 @@ class CSSetOpNotice : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetOpNotice("OPNOTICE"));
c->AddSubcommand(&commandcssetopnotice);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetOpNotice("OPNOTICE"));
c->AddSubcommand(&commandcssasetopnotice);
}
~CSSetOpNotice()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("OPNOTICE");
c->DelSubcommand(&commandcssetopnotice);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("OPNOTICE");
c->DelSubcommand(&commandcssasetopnotice);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetPeace : public Command
{
public:
CommandCSSetPeace(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetPeace(const Anope::string &cpermission = "") : Command("PEACE", 2, 2, cpermission)
{
}
@@ -62,7 +62,7 @@ class CommandCSSetPeace : public Command
class CommandCSSASetPeace : public CommandCSSetPeace
{
public:
CommandCSSASetPeace(const Anope::string &cname) : CommandCSSetPeace(cname, "chanserv/saset/peace")
CommandCSSASetPeace() : CommandCSSetPeace("chanserv/saset/peace")
{
}
@@ -80,6 +80,9 @@ class CommandCSSASetPeace : public CommandCSSetPeace
class CSSetPeace : public Module
{
CommandCSSetPeace commandcssetpeace;
CommandCSSASetPeace commandcssasetpeace;
public:
CSSetPeace(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -88,22 +91,22 @@ class CSSetPeace : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetPeace("PEACE"));
c->AddSubcommand(&commandcssetpeace);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetPeace("PEACE"));
c->AddSubcommand(&commandcssasetpeace);
}
~CSSetPeace()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("PEACE");
c->DelSubcommand(&commandcssetpeace);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("PEACE");
c->DelSubcommand(&commandcssasetpeace);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetPersist : public Command
{
public:
CommandCSSetPersist(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetPersist(const Anope::string &cpermission = "") : Command("PERSIST", 2, 2, cpermission)
{
}
@@ -107,7 +107,7 @@ class CommandCSSetPersist : public Command
class CommandCSSASetPersist : public CommandCSSetPersist
{
public:
CommandCSSASetPersist(const Anope::string &cname) : CommandCSSetPersist(cname, "chanserv/saset/persist")
CommandCSSASetPersist() : CommandCSSetPersist("chanserv/saset/persist")
{
}
@@ -125,6 +125,9 @@ class CommandCSSASetPersist : public CommandCSSetPersist
class CSSetPersist : public Module
{
CommandCSSetPersist commandcssetpeace;
CommandCSSASetPersist commandcssasetpeace;
public:
CSSetPersist(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -133,22 +136,22 @@ class CSSetPersist : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetPersist("PERSIST"));
c->AddSubcommand(&commandcssetpeace);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetPersist("PERSIST"));
c->AddSubcommand(&commandcssasetpeace);
}
~CSSetPersist()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("PERSIST");
c->DelSubcommand(&commandcssetpeace);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("PERSIST");
c->DelSubcommand(&commandcssasetpeace);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetPrivate : public Command
{
public:
CommandCSSetPrivate(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetPrivate(const Anope::string &cpermission = "") : Command("PRIVATE", 2, 2, cpermission)
{
}
@@ -62,7 +62,7 @@ class CommandCSSetPrivate : public Command
class CommandCSSASetPrivate : public CommandCSSetPrivate
{
public:
CommandCSSASetPrivate(const Anope::string &cname) : CommandCSSetPrivate(cname, "chanserv/saset/private")
CommandCSSASetPrivate() : CommandCSSetPrivate("chanserv/saset/private")
{
}
@@ -80,6 +80,9 @@ class CommandCSSASetPrivate : public CommandCSSetPrivate
class CSSetPrivate : public Module
{
CommandCSSetPrivate commandcssetprivate;
CommandCSSASetPrivate commandcssasetprivate;
public:
CSSetPrivate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -88,22 +91,22 @@ class CSSetPrivate : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetPrivate("PRIVATE"));
c->AddSubcommand(&commandcssetprivate);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetPrivate("PRIVATE"));
c->AddSubcommand(&commandcssasetprivate);
}
~CSSetPrivate()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("PRIVATE");
c->DelSubcommand(&commandcssetprivate);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("PRIVATE");
c->DelSubcommand(&commandcssasetprivate);
}
};
+9 -6
View File
@@ -15,7 +15,7 @@
class CommandCSSetRestricted : public Command
{
public:
CommandCSSetRestricted(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetRestricted(const Anope::string &cpermission = "") : Command("RESTRICTED", 2, 2, cpermission)
{
}
@@ -65,7 +65,7 @@ class CommandCSSetRestricted : public Command
class CommandCSSASetRestricted : public CommandCSSetRestricted
{
public:
CommandCSSASetRestricted(const Anope::string &cname) : CommandCSSetRestricted(cname, "chanserv/saset/restricted")
CommandCSSASetRestricted() : CommandCSSetRestricted("chanserv/saset/restricted")
{
}
@@ -83,6 +83,9 @@ class CommandCSSASetRestricted : public CommandCSSetRestricted
class CSSetRestricted : public Module
{
CommandCSSetRestricted commandcssetrestricted;
CommandCSSASetRestricted commandcssasetrestricted;
public:
CSSetRestricted(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -91,22 +94,22 @@ class CSSetRestricted : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetRestricted("RESTRICTED"));
c->AddSubcommand(&commandcssetrestricted);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetRestricted("RESTRICTED"));
c->AddSubcommand(&commandcssasetrestricted);
}
~CSSetRestricted()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("RESTRICTED");
c->DelSubcommand(&commandcssetrestricted);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("RESTRICTED");
c->DelSubcommand(&commandcssasetrestricted);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetSecure : public Command
{
public:
CommandCSSetSecure(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetSecure(const Anope::string &cpermission = "") : Command("SECURE", 2, 2, cpermission)
{
}
@@ -62,7 +62,7 @@ class CommandCSSetSecure : public Command
class CommandCSSASetSecure : public CommandCSSetSecure
{
public:
CommandCSSASetSecure(const Anope::string &cname) : CommandCSSetSecure(cname, "chanserv/saset/secure")
CommandCSSASetSecure() : CommandCSSetSecure("chanserv/saset/secure")
{
}
@@ -80,6 +80,9 @@ class CommandCSSASetSecure : public CommandCSSetSecure
class CSSetSecure : public Module
{
CommandCSSetSecure commandcssetsecure;
CommandCSSASetSecure commandcssasetsecure;
public:
CSSetSecure(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -88,22 +91,22 @@ class CSSetSecure : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetSecure("SECURE"));
c->AddSubcommand(&commandcssetsecure);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetSecure("SECURE"));
c->AddSubcommand(&commandcssasetsecure);
}
~CSSetSecure()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("SECURE");
c->DelSubcommand(&commandcssetsecure);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("SECURE");
c->DelSubcommand(&commandcssasetsecure);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetSecureFounder : public Command
{
public:
CommandCSSetSecureFounder(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetSecureFounder(const Anope::string &cpermission = "") : Command("SECUREFOUNDER", 2, 2, cpermission)
{
}
@@ -68,7 +68,7 @@ class CommandCSSetSecureFounder : public Command
class CommandCSSASetSecureFounder : public CommandCSSetSecureFounder
{
public:
CommandCSSASetSecureFounder(const Anope::string &cname) : CommandCSSetSecureFounder(cname, "chanserv/saset/securefounder")
CommandCSSASetSecureFounder() : CommandCSSetSecureFounder("chanserv/saset/securefounder")
{
}
@@ -86,6 +86,9 @@ class CommandCSSASetSecureFounder : public CommandCSSetSecureFounder
class CSSetSecureFounder : public Module
{
CommandCSSetSecureFounder commandcssetsecurefounder;
CommandCSSASetSecureFounder commandcssasetsecurefounder;
public:
CSSetSecureFounder(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -94,22 +97,22 @@ class CSSetSecureFounder : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetSecureFounder("SECUREFOUNDER"));
c->AddSubcommand(&commandcssetsecurefounder);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetSecureFounder("SECUREFOUNDER"));
c->AddSubcommand(&commandcssasetsecurefounder);
}
~CSSetSecureFounder()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("SECUREFOUNDER");
c->DelSubcommand(&commandcssetsecurefounder);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("SECUREFOUNDER");
c->DelSubcommand(&commandcssasetsecurefounder);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetSecureOps : public Command
{
public:
CommandCSSetSecureOps(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetSecureOps(const Anope::string &cpermission = "") : Command("SECUREOPS", 2, 2, cpermission)
{
}
@@ -62,7 +62,7 @@ class CommandCSSetSecureOps : public Command
class CommandCSSASetSecureOps : public CommandCSSetSecureOps
{
public:
CommandCSSASetSecureOps(const Anope::string &cname) : CommandCSSetSecureOps(cname, "chanserv/saset/secureops")
CommandCSSASetSecureOps() : CommandCSSetSecureOps("chanserv/saset/secureops")
{
}
@@ -80,6 +80,9 @@ class CommandCSSASetSecureOps : public CommandCSSetSecureOps
class CSSetSecureOps : public Module
{
CommandCSSetSecureOps commandcssetsecureops;
CommandCSSASetSecureOps commandcssasetsecureops;
public:
CSSetSecureOps(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -88,22 +91,22 @@ class CSSetSecureOps : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetSecureOps("SECUREOPS"));
c->AddSubcommand(&commandcssetsecureops);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetSecureOps("SECUREOPS"));
c->AddSubcommand(&commandcssasetsecureops);
}
~CSSetSecureOps()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("SECUREOPS");
c->DelSubcommand(&commandcssetsecureops);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("SECUREOPS");
c->DelSubcommand(&commandcssasetsecureops);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetSignKick : public Command
{
public:
CommandCSSetSignKick(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetSignKick(const Anope::string &cpermission = "") : Command("SIGNKICK", 2, 2, cpermission)
{
}
@@ -70,7 +70,7 @@ class CommandCSSetSignKick : public Command
class CommandCSSASetSignKick : public CommandCSSetSignKick
{
public:
CommandCSSASetSignKick(const Anope::string &cname) : CommandCSSetSignKick(cname, "chanserv/saset/signkick")
CommandCSSASetSignKick() : CommandCSSetSignKick("chanserv/saset/signkick")
{
}
@@ -88,6 +88,9 @@ class CommandCSSASetSignKick : public CommandCSSetSignKick
class CSSetSignKick : public Module
{
CommandCSSetSignKick commandcssetsignkick;
CommandCSSASetSignKick commandcssasetsignkick;
public:
CSSetSignKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -96,22 +99,22 @@ class CSSetSignKick : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetSignKick("SIGNKICK"));
c->AddSubcommand(&commandcssetsignkick);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetSignKick("SIGNKICK"));
c->AddSubcommand(&commandcssasetsignkick);
}
~CSSetSignKick()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("SIGNKICK");
c->DelSubcommand(&commandcssetsignkick);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("SIGNKICK");
c->DelSubcommand(&commandcssasetsignkick);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetSuccessor : public Command
{
public:
CommandCSSetSuccessor(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 1, 2, cpermission)
CommandCSSetSuccessor(const Anope::string &cpermission = "") : Command("SUCCESSOR", 1, 2, cpermission)
{
}
@@ -91,7 +91,7 @@ class CommandCSSetSuccessor : public Command
class CommandCSSASetSuccessor : public CommandCSSetSuccessor
{
public:
CommandCSSASetSuccessor(const Anope::string &cname) : CommandCSSetSuccessor(cname, "chanserv/saset/successor")
CommandCSSASetSuccessor() : CommandCSSetSuccessor("chanserv/saset/successor")
{
}
@@ -110,6 +110,9 @@ class CommandCSSASetSuccessor : public CommandCSSetSuccessor
class CSSetSuccessor : public Module
{
CommandCSSetSuccessor commandcssetsuccessor;
CommandCSSASetSuccessor commandcssasetsuccessor;
public:
CSSetSuccessor(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -118,22 +121,22 @@ class CSSetSuccessor : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetSuccessor("SUCCESSOR"));
c->AddSubcommand(&commandcssetsuccessor);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSetSuccessor("SUCCESSOR"));
c->AddSubcommand(&commandcssasetsuccessor);
}
~CSSetSuccessor()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("SUCCESSOR");
c->DelSubcommand(&commandcssetsuccessor);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("SUCCESSOR");
c->DelSubcommand(&commandcssasetsuccessor);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandCSSetTopicLock : public Command
{
public:
CommandCSSetTopicLock(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetTopicLock(const Anope::string &cpermission = "") : Command("TOPICLOCK", 2, 2, cpermission)
{
}
@@ -62,7 +62,7 @@ class CommandCSSetTopicLock : public Command
class CommandCSSASetTopicLock : public CommandCSSetTopicLock
{
public:
CommandCSSASetTopicLock(const Anope::string &cname) : CommandCSSetTopicLock(cname, "chanserv/saset/topiclock")
CommandCSSASetTopicLock() : CommandCSSetTopicLock("chanserv/saset/topiclock")
{
}
@@ -80,6 +80,9 @@ class CommandCSSASetTopicLock : public CommandCSSetTopicLock
class CSSetTopicLock : public Module
{
CommandCSSetTopicLock commandcssettopiclock;
CommandCSSASetTopicLock commandcssasettopiclock;
public:
CSSetTopicLock(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -88,22 +91,22 @@ class CSSetTopicLock : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetTopicLock("TOPICLOCK"));
c->AddSubcommand(&commandcssettopiclock);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetTopicLock("TOPICLOCK"));
c->AddSubcommand(&commandcssasettopiclock);
}
~CSSetTopicLock()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("TOPICLOCK");
c->DelSubcommand(&commandcssettopiclock);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("TOPICLOCK");
c->DelSubcommand(&commandcssasettopiclock);
}
};
+9 -6
View File
@@ -17,7 +17,7 @@
class CommandCSSetXOP : public Command
{
public:
CommandCSSetXOP(const Anope::string &cname, const Anope::string &cpermission = "") : Command(cname, 2, 2, cpermission)
CommandCSSetXOP(const Anope::string &cpermission = "") : Command("XOP", 2, 2, cpermission)
{
}
@@ -100,7 +100,7 @@ class CommandCSSetXOP : public Command
class CommandCSSASetXOP : public CommandCSSetXOP
{
public:
CommandCSSASetXOP(const Anope::string &cname) : CommandCSSetXOP(cname, "chanserv/saset/xop")
CommandCSSASetXOP() : CommandCSSetXOP("chanserv/saset/xop")
{
}
@@ -118,6 +118,9 @@ class CommandCSSASetXOP : public CommandCSSetXOP
class CSSetXOP : public Module
{
CommandCSSetXOP commandcssetxop;
CommandCSSASetXOP commandcssasetxop;
public:
CSSetXOP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -126,22 +129,22 @@ class CSSetXOP : public Module
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->AddSubcommand(new CommandCSSetXOP("XOP"));
c->AddSubcommand(&commandcssetxop);
c = FindCommand(ChanServ, "SASET");
if (c)
c->AddSubcommand(new CommandCSSASetXOP("XOP"));
c->AddSubcommand(&commandcssasetxop);
}
~CSSetXOP()
{
Command *c = FindCommand(ChanServ, "SET");
if (c)
c->DelSubcommand("XOP");
c->DelSubcommand(&commandcssetxop);
c = FindCommand(ChanServ, "SASET");
if (c)
c->DelSubcommand("XOP");
c->DelSubcommand(&commandcssasetxop);
}
};
+3 -1
View File
@@ -63,13 +63,15 @@ class CommandCSStatus : public Command
class CSStatus : public Module
{
CommandCSStatus commandcsstatus;
public:
CSStatus(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSStatus());
this->AddCommand(ChanServ, &commandcsstatus);
}
};
+5 -2
View File
@@ -173,14 +173,17 @@ class CommandCSUnSuspend : public Command
class CSSuspend : public Module
{
CommandCSSuspend commandcssuspend;
CommandCSUnSuspend commandcsunsuspend;
public:
CSSuspend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSSuspend());
this->AddCommand(ChanServ, new CommandCSUnSuspend());
this->AddCommand(ChanServ, &commandcssuspend);
this->AddCommand(ChanServ, &commandcsunsuspend);
}
};
+3 -1
View File
@@ -81,13 +81,15 @@ class CommandCSTopic : public Command
class CSTopic : public Module
{
CommandCSTopic commandcstopic;
public:
CSTopic(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSTopic());
this->AddCommand(ChanServ, &commandcstopic);
}
};
+3 -1
View File
@@ -75,13 +75,15 @@ class CommandCSUnban : public Command
class CSUnban : public Module
{
CommandCSUnban commandcsunban;
public:
CSUnban(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSUnban());
this->AddCommand(ChanServ, &commandcsunban);
}
};
+13 -7
View File
@@ -626,15 +626,21 @@ class CommandCSVOP : public XOPBase
class CSXOP : public Module
{
CommandCSQOP commandcsqop;
CommandCSSOP commandcssop;
CommandCSAOP commandcsaop;
CommandCSHOP commandcshop;
CommandCSVOP commandcsvop;
public:
CSXOP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(ChanServ, new CommandCSSOP());
this->AddCommand(ChanServ, new CommandCSAOP());
this->AddCommand(ChanServ, new CommandCSVOP());
this->AddCommand(ChanServ, &commandcssop);
this->AddCommand(ChanServ, &commandcsaop);
this->AddCommand(ChanServ, &commandcsvop);
if (Me && Me->IsSynced())
OnUplinkSync(NULL);
@@ -646,15 +652,15 @@ class CSXOP : public Module
void OnUplinkSync(Server *)
{
if (ModeManager::FindChannelModeByName(CMODE_OWNER))
this->AddCommand(ChanServ, new CommandCSQOP());
this->AddCommand(ChanServ, &commandcsqop);
if (ModeManager::FindChannelModeByName(CMODE_HALFOP))
this->AddCommand(ChanServ, new CommandCSHOP());
this->AddCommand(ChanServ, &commandcshop);
}
void OnServerDisconnect()
{
this->DelCommand(ChanServ, FindCommand(ChanServ, "QOP"));
this->DelCommand(ChanServ, FindCommand(ChanServ, "HOP"));
this->DelCommand(ChanServ, &commandcsqop);
this->DelCommand(ChanServ, &commandcshop);
}
};
+3 -1
View File
@@ -60,13 +60,15 @@ class CommandHSDel : public Command
class HSDel : public Module
{
CommandHSDel commandhsdel;
public:
HSDel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(HostServ, new CommandHSDel());
this->AddCommand(HostServ, &commandhsdel);
}
};
+3 -1
View File
@@ -65,13 +65,15 @@ class CommandHSDelAll : public Command
class HSDelAll : public Module
{
CommandHSDelAll commandhsdelall;
public:
HSDelAll(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(HostServ, new CommandHSDelAll());
this->AddCommand(HostServ, &commandhsdelall);
}
};
+3 -1
View File
@@ -51,13 +51,15 @@ class CommandHSGroup : public Command
class HSGroup : public Module
{
CommandHSGroup commandhsgroup;
public:
HSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(HostServ, new CommandHSGroup());
this->AddCommand(HostServ, &commandhsgroup);
}
};
+3 -1
View File
@@ -38,13 +38,15 @@ class CommandHSHelp : public Command
class HSHelp : public Module
{
CommandHSHelp commandhshelp;
public:
HSHelp(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(HostServ, new CommandHSHelp());
this->AddCommand(HostServ, &commandhshelp);
}
};
+3 -1
View File
@@ -119,13 +119,15 @@ class CommandHSList : public Command
class HSList : public Module
{
CommandHSList commandhslist;
public:
HSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(HostServ, new CommandHSList());
this->AddCommand(HostServ, &commandhslist);
}
};
+3 -1
View File
@@ -49,13 +49,15 @@ class CommandHSOff : public Command
class HSOff : public Module
{
CommandHSOff commandhsoff;
public:
HSOff(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(HostServ, new CommandHSOff());
this->AddCommand(HostServ, &commandhsoff);
}
};
+3 -1
View File
@@ -59,13 +59,15 @@ class CommandHSOn : public Command
class HSOn : public Module
{
CommandHSOn commandhson;
public:
HSOn(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(HostServ, new CommandHSOn());
this->AddCommand(HostServ, &commandhson);
}
};
+3 -1
View File
@@ -114,13 +114,15 @@ class CommandHSSet : public Command
class HSSet : public Module
{
CommandHSSet commandhsset;
public:
HSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(HostServ, new CommandHSSet());
this->AddCommand(HostServ, &commandhsset);
}
};
+3 -1
View File
@@ -117,13 +117,15 @@ class CommandHSSetAll : public Command
class HSSetAll : public Module
{
CommandHSSetAll commandhssetall;
public:
HSSetAll(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(HostServ, new CommandHSSetAll());
this->AddCommand(HostServ, &commandhssetall);
}
};
+3 -1
View File
@@ -75,13 +75,15 @@ class CommandMSCancel : public Command
class MSCancel : public Module
{
CommandMSCancel commandmscancel;
public:
MSCancel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSCancel());
this->AddCommand(MemoServ, &commandmscancel);
}
};
+3 -1
View File
@@ -93,13 +93,15 @@ class CommandMSCheck : public Command
class MSCheck : public Module
{
CommandMSCheck commandmscheck;
public:
MSCheck(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSCheck());
this->AddCommand(MemoServ, &commandmscheck);
}
};
+3 -1
View File
@@ -146,13 +146,15 @@ class CommandMSDel : public Command
class MSDel : public Module
{
CommandMSDel commandmsdel;
public:
MSDel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSDel());
this->AddCommand(MemoServ, &commandmsdel);
}
};
+3 -1
View File
@@ -39,13 +39,15 @@ class CommandMSHelp : public Command
class MSHelp : public Module
{
CommandMSHelp commandmshelp;
public:
MSHelp(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSHelp());
this->AddCommand(MemoServ, &commandmshelp);
}
};
+3 -1
View File
@@ -202,13 +202,15 @@ class CommandMSInfo : public Command
class MSInfo : public Module
{
CommandMSInfo commandmsinfo;
public:
MSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSInfo());
this->AddCommand(MemoServ, &commandmsinfo);
}
};
+3 -1
View File
@@ -163,13 +163,15 @@ class CommandMSList : public Command
class MSList : public Module
{
CommandMSList commandmslist;
public:
MSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSList());
this->AddCommand(MemoServ, &commandmslist);
}
};
+3 -1
View File
@@ -146,13 +146,15 @@ class CommandMSRead : public Command
class MSRead : public Module
{
CommandMSRead commandmsread;
public:
MSRead(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSRead());
this->AddCommand(MemoServ, &commandmsread);
}
};
+3 -1
View File
@@ -73,6 +73,8 @@ class CommandMSRSend : public Command
class MSRSend : public Module
{
CommandMSRSend commandmsrsend;
public:
MSRSend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -82,7 +84,7 @@ class MSRSend : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSRSend());
this->AddCommand(MemoServ, &commandmsrsend);
}
};
+3 -1
View File
@@ -47,13 +47,15 @@ class CommandMSSend : public Command
class MSSend : public Module
{
CommandMSSend commandmssend;
public:
MSSend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSSend());
this->AddCommand(MemoServ, &commandmssend);
}
};
+3 -1
View File
@@ -63,13 +63,15 @@ class CommandMSSendAll : public Command
class MSSendAll : public Module
{
CommandMSSendAll commandmssendall;
public:
MSSendAll(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSSendAll());
this->AddCommand(MemoServ, &commandmssendall);
}
};
+3 -1
View File
@@ -260,13 +260,15 @@ class CommandMSSet : public Command
class MSSet : public Module
{
CommandMSSet commandmsset;
public:
MSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSSet());
this->AddCommand(MemoServ, &commandmsset);
}
};
+3 -1
View File
@@ -60,13 +60,15 @@ class CommandMSStaff : public Command
class MSStaff : public Module
{
CommandMSStaff commandmsstaff;
public:
MSStaff(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(MemoServ, new CommandMSStaff());
this->AddCommand(MemoServ, &commandmsstaff);
}
};
+3 -1
View File
@@ -167,13 +167,15 @@ class CommandNSAccess : public Command
class NSAccess : public Module
{
CommandNSAccess commandnsaccess;
public:
NSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSAccess());
this->AddCommand(NickServ, &commandnsaccess);
}
};
+3 -1
View File
@@ -137,13 +137,15 @@ class CommandNSAList : public Command
class NSAList : public Module
{
CommandNSAList commandnsalist;
public:
NSAList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSAList());
this->AddCommand(NickServ, &commandnsalist);
}
};
+3 -1
View File
@@ -114,13 +114,15 @@ class CommandNSDrop : public Command
class NSDrop : public Module
{
CommandNSDrop commandnsdrop;
public:
NSDrop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSDrop());
this->AddCommand(NickServ, &commandnsdrop);
}
};
+3 -1
View File
@@ -108,13 +108,15 @@ class CommandNSForbid : public Command
class NSForbid : public Module
{
CommandNSForbid commandnsforbid;
public:
NSForbid(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSForbid());
this->AddCommand(NickServ, &commandnsforbid);
}
};
+2 -1
View File
@@ -70,13 +70,14 @@ class CommandNSGetEMail : public Command
class NSGetEMail : public Module
{
CommandNSGetEMail commandnsgetemail;
public:
NSGetEMail(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSGetEMail());
this->AddCommand(NickServ, &commandnsgetemail);
}
};
+3 -1
View File
@@ -77,6 +77,8 @@ class CommandNSGetPass : public Command
class NSGetPass : public Module
{
CommandNSGetPass commandnsgetpass;
public:
NSGetPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -87,7 +89,7 @@ class NSGetPass : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSGetPass());
this->AddCommand(NickServ, &commandnsgetpass);
}
};
+3 -1
View File
@@ -90,13 +90,15 @@ class CommandNSGhost : public Command
class NSGhost : public Module
{
CommandNSGhost commandnsghost;
public:
NSGhost(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSGhost());
this->AddCommand(NickServ, &commandnsghost);
}
};
+7 -3
View File
@@ -276,15 +276,19 @@ class CommandNSGList : public Command
class NSGroup : public Module
{
CommandNSGroup commandnsgroup;
CommandNSUngroup commandnsungroup;
CommandNSGList commandnsglist;
public:
NSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSGroup());
this->AddCommand(NickServ, new CommandNSUngroup());
this->AddCommand(NickServ, new CommandNSGList());
this->AddCommand(NickServ, &commandnsgroup);
this->AddCommand(NickServ, &commandnsungroup);
this->AddCommand(NickServ, &commandnsglist);
}
};
+3 -1
View File
@@ -54,13 +54,15 @@ class CommandNSHelp : public Command
class NSHelp : public Module
{
CommandNSHelp commandnshelp;
public:
NSHelp(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSHelp());
this->AddCommand(NickServ, &commandnshelp);
}
};
+5 -3
View File
@@ -113,14 +113,16 @@ class CommandNSIdentify : public Command
class NSIdentify : public Module
{
CommandNSIdentify commandnsidentify, commandnsid;
public:
NSIdentify(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
NSIdentify(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator), commandnsidentify("IDENTIFY"), commandnsid("ID")
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSIdentify("IDENTIFY"));
this->AddCommand(NickServ, new CommandNSIdentify("ID"));
this->AddCommand(NickServ, &commandnsidentify);
this->AddCommand(NickServ, &commandnsid);
}
};
+3 -1
View File
@@ -178,13 +178,15 @@ class CommandNSInfo : public Command
class NSInfo : public Module
{
CommandNSInfo commandnsinfo;
public:
NSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSInfo());
this->AddCommand(NickServ, &commandnsinfo);
}
};
+3 -1
View File
@@ -195,13 +195,15 @@ class CommandNSList : public Command
class NSList : public Module
{
CommandNSList commandnslist;
public:
NSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSList());
this->AddCommand(NickServ, &commandnslist);
}
};
+3 -1
View File
@@ -81,13 +81,15 @@ class CommandNSLogout : public Command
class NSLogout : public Module
{
CommandNSLogout commandnslogout;
public:
NSLogout(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSLogout());
this->AddCommand(NickServ, &commandnslogout);
}
};
+3 -2
View File
@@ -87,7 +87,6 @@ class CommandNSRecover : public Command
Anope::string relstr = duration(u->Account(), Config.NSReleaseTimeout);
notice_help(Config.s_NickServ, u, NICK_HELP_RECOVER, relstr.c_str());
//do_help_limited(Config.s_NickServ, u, this);
return true;
}
@@ -105,13 +104,15 @@ class CommandNSRecover : public Command
class NSRecover : public Module
{
CommandNSRecover commandnsrecover;
public:
NSRecover(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSRecover());
this->AddCommand(NickServ, &commandnsrecover);
}
};
+8 -4
View File
@@ -368,15 +368,19 @@ class CommandNSResend : public Command
class NSRegister : public Module
{
CommandNSRegister commandnsregister;
CommandNSConfirm commandnsconfirm;
CommandNSResend commandnsrsend;
public:
NSRegister(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
NSRegister(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator), commandnsconfirm("CONFIRM", 1, 1)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSRegister());
this->AddCommand(NickServ, new CommandNSConfirm("CONFIRM", 1, 1));
this->AddCommand(NickServ, new CommandNSResend());
this->AddCommand(NickServ, &commandnsregister);
this->AddCommand(NickServ, &commandnsconfirm);
this->AddCommand(NickServ, &commandnsrsend);
}
};
+3 -1
View File
@@ -91,13 +91,15 @@ class CommandNSRelease : public Command
class NSRelease : public Module
{
CommandNSRelease commandnsrelease;
public:
NSRelease(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSRelease());
this->AddCommand(NickServ, &commandnsrelease);
}
};
+3 -1
View File
@@ -63,6 +63,8 @@ class CommandNSResetPass : public Command
class NSResetPass : public Module
{
CommandNSResetPass commandnsresetpass;
public:
NSResetPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -72,7 +74,7 @@ class NSResetPass : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSResetPass());
this->AddCommand(NickServ, &commandnsresetpass);
ModuleManager::Attach(I_OnPreCommand, this);
}
+14 -12
View File
@@ -19,14 +19,12 @@ class CommandNSSASet : public Command
subcommand_map subcommands;
public:
CommandNSSASet(const Anope::string &cname) : Command(cname, 2, 4)
CommandNSSASet() : Command("SASET", 2, 4)
{
}
~CommandNSSASet()
{
for (subcommand_map::const_iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
delete it->second;
this->subcommands.clear();
}
@@ -102,9 +100,9 @@ class CommandNSSASet : public Command
return this->subcommands.insert(std::make_pair(c->name, c)).second;
}
bool DelSubcommand(const Anope::string &command)
bool DelSubcommand(Command *c)
{
return this->subcommands.erase(command);
return this->subcommands.erase(c->name);
}
Command *FindCommand(const Anope::string &subcommand)
@@ -121,7 +119,7 @@ class CommandNSSASet : public Command
class CommandNSSASetDisplay : public Command
{
public:
CommandNSSASetDisplay(const Anope::string &cname) : Command(cname, 2, 2, "nickserv/saset/display")
CommandNSSASetDisplay() : Command("DISPLAY", 2, 2, "nickserv/saset/display")
{
}
@@ -164,7 +162,7 @@ class CommandNSSASetDisplay : public Command
class CommandNSSASetPassword : public Command
{
public:
CommandNSSASetPassword(const Anope::string &cname) : Command(cname, 2, 2, "nickserv/saset/password")
CommandNSSASetPassword() : Command("PASSWORD", 2, 2, "nickserv/saset/password")
{
}
@@ -232,16 +230,20 @@ class CommandNSSASetPassword : public Command
class NSSASet : public Module
{
public:
CommandNSSASet commandnssaset;
CommandNSSASetDisplay commandnssasetdisplay;
CommandNSSASetPassword commandnssasetpassword;
public:
NSSASet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
Command *c = new CommandNSSASet("SASET");
this->AddCommand(NickServ, c);
c->AddSubcommand(new CommandNSSASetDisplay("DISPLAY"));
c->AddSubcommand(new CommandNSSASetPassword("PASSWORD"));
this->AddCommand(NickServ, &commandnssaset);
commandnssaset.AddSubcommand(&commandnssasetdisplay);
commandnssaset.AddSubcommand(&commandnssasetpassword);
}
};
+5 -3
View File
@@ -16,7 +16,7 @@
class CommandNSSASetNoexpire : public Command
{
public:
CommandNSSASetNoexpire(const Anope::string &cname) : Command(cname, 1, 2, "nickserv/saset/noexpire")
CommandNSSASetNoexpire() : Command("NOEXPIRE", 1, 2, "nickserv/saset/noexpire")
{
}
@@ -63,6 +63,8 @@ class CommandNSSASetNoexpire : public Command
class NSSASetNoexpire : public Module
{
CommandNSSASetNoexpire commandnssasetnoexpire;
public:
NSSASetNoexpire(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -71,14 +73,14 @@ class NSSASetNoexpire : public Module
Command *c = FindCommand(NickServ, "SASET");
if (c)
c->AddSubcommand(new CommandNSSASetNoexpire("NOEXPIRE"));
c->AddSubcommand(&commandnssasetnoexpire);
}
~NSSASetNoexpire()
{
Command *c = FindCommand(NickServ, "SASET");
if (c)
c->DelSubcommand("NOEXPIRE");
c->DelSubcommand(&commandnssasetnoexpire);
}
};
+3 -1
View File
@@ -70,6 +70,8 @@ class CommandNSSendPass : public Command
class NSSendPass : public Module
{
CommandNSSendPass commandnssendpass;
public:
NSSendPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -83,7 +85,7 @@ class NSSendPass : public Module
this->SetAuthor("Anope");
this->SetType(CORE);
this->AddCommand(NickServ, new CommandNSSendPass());
this->AddCommand(NickServ, &commandnssendpass);
}
};
+11 -9
View File
@@ -19,14 +19,12 @@ class CommandNSSet : public Command
subcommand_map subcommands;
public:
CommandNSSet(const Anope::string &cname) : Command(cname, 1, 3)
CommandNSSet() : Command("SET", 1, 3)
{
}
~CommandNSSet()
{
for (subcommand_map::const_iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
delete it->second;
this->subcommands.clear();
}
@@ -116,7 +114,7 @@ class CommandNSSet : public Command
class CommandNSSetDisplay : public Command
{
public:
CommandNSSetDisplay(const Anope::string &cname) : Command(cname, 1)
CommandNSSetDisplay() : Command("DISPLAY", 1)
{
}
@@ -156,7 +154,7 @@ class CommandNSSetDisplay : public Command
class CommandNSSetPassword : public Command
{
public:
CommandNSSetPassword(const Anope::string &cname) : Command(cname, 1)
CommandNSSetPassword() : Command("PASSWORD", 1)
{
}
@@ -214,16 +212,20 @@ class CommandNSSetPassword : public Command
class NSSet : public Module
{
CommandNSSet commandnsset;
CommandNSSetDisplay commandnssetdisplay;
CommandNSSetPassword commandnssetpassword;
public:
NSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
this->SetAuthor("Anope");
this->SetType(CORE);
Command *set = new CommandNSSet("SET");
this->AddCommand(NickServ, set);
set->AddSubcommand(new CommandNSSetDisplay("DISPLAY"));
set->AddSubcommand(new CommandNSSetPassword("PASSWORD"));
this->AddCommand(NickServ, &commandnsset);
commandnsset.AddSubcommand(&commandnssetdisplay);
commandnsset.AddSubcommand(&commandnssetpassword);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandNSSetAutoOp : public Command
{
public:
CommandNSSetAutoOp(const Anope::string &cname) : Command(cname, 2)
CommandNSSetAutoOp() : Command("AUTOOP", 2)
{
}
@@ -58,7 +58,7 @@ class CommandNSSetAutoOp : public Command
class CommandNSSASetAutoOp : public Command
{
public:
CommandNSSASetAutoOp(const Anope::string &cname) : Command(cname, 2, 2, "nickserv/saset/autoop")
CommandNSSASetAutoOp() : Command("AUTOOP", 2, 2, "nickserv/saset/autoop")
{
}
@@ -105,6 +105,9 @@ class CommandNSSASetAutoOp : public Command
class NSSetAutoOp : public Module
{
CommandNSSetAutoOp commandnssetautoop;
CommandNSSASetAutoOp commandnssasetautoop;
public:
NSSetAutoOp(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -113,22 +116,22 @@ class NSSetAutoOp : public Module
Command *c = FindCommand(NickServ, "SET");
if (c)
c->AddSubcommand(new CommandNSSetAutoOp("AUTOOP"));
c->AddSubcommand(&commandnssetautoop);
c = FindCommand(NickServ, "SASET");
if (c)
c->AddSubcommand(new CommandNSSASetAutoOp("AUTOOP"));
c->AddSubcommand(&commandnssasetautoop);
}
~NSSetAutoOp()
{
Command *c = FindCommand(NickServ, "SET");
if (c)
c->DelSubcommand("AUTOOP");
c->DelSubcommand(&commandnssetautoop);
c = FindCommand(NickServ, "SASET");
if (c)
c->DelSubcommand("AUTOOP");
c->DelSubcommand(&commandnssasetautoop);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandNSSetEmail : public Command
{
public:
CommandNSSetEmail(const Anope::string &cname) : Command(cname, 0)
CommandNSSetEmail() : Command("EMAIL", 0)
{
}
@@ -64,7 +64,7 @@ class CommandNSSetEmail : public Command
class CommandNSSASetEmail : public Command
{
public:
CommandNSSASetEmail(const Anope::string &cname) : Command(cname, 1, 2, "nickserv/saset/email")
CommandNSSASetEmail() : Command("EMAIL", 1, 2, "nickserv/saset/email")
{
}
@@ -122,6 +122,9 @@ class CommandNSSASetEmail : public Command
class NSSetEmail : public Module
{
CommandNSSetEmail commandnssetemail;
CommandNSSASetEmail commandnssasetemail;
public:
NSSetEmail(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -130,22 +133,22 @@ class NSSetEmail : public Module
Command *c = FindCommand(NickServ, "SET");
if (c)
c->AddSubcommand(new CommandNSSetEmail("EMAIL"));
c->AddSubcommand(&commandnssetemail);
c = FindCommand(NickServ, "SASET");
if (c)
c->AddSubcommand(new CommandNSSASetEmail("EMAIL"));
c->AddSubcommand(&commandnssasetemail);
}
~NSSetEmail()
{
Command *c = FindCommand(NickServ, "SET");
if (c)
c->DelSubcommand("EMAIL");
c->DelSubcommand(&commandnssetemail);
c = FindCommand(NickServ, "SASET");
if (c)
c->DelSubcommand("EMAIL");
c->DelSubcommand(&commandnssasetemail);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandNSSetGreet : public Command
{
public:
CommandNSSetGreet(const Anope::string &cname) : Command(cname, 0)
CommandNSSetGreet() : Command("GREET", 0)
{
}
@@ -51,7 +51,7 @@ class CommandNSSetGreet : public Command
class CommandNSSASetGreet : public Command
{
public:
CommandNSSASetGreet(const Anope::string &cname) : Command(cname, 1, 2, "nickserv/saset/greet")
CommandNSSASetGreet() : Command("GREET", 1, 2, "nickserv/saset/greet")
{
}
@@ -91,6 +91,9 @@ class CommandNSSASetGreet : public Command
class NSSetGreet : public Module
{
CommandNSSetGreet commandnssetgreet;
CommandNSSASetGreet commandnssasetgreet;
public:
NSSetGreet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -99,22 +102,22 @@ class NSSetGreet : public Module
Command *c = FindCommand(NickServ, "SET");
if (c)
c->AddSubcommand(new CommandNSSetGreet("GREET"));
c->AddSubcommand(&commandnssetgreet);
c = FindCommand(NickServ, "SASET");
if (c)
c->AddSubcommand(new CommandNSSASetGreet("GREET"));
c->AddSubcommand(&commandnssasetgreet);
}
~NSSetGreet()
{
Command *c = FindCommand(NickServ, "SET");
if (c)
c->DelSubcommand("GREET");
c->DelSubcommand(&commandnssetgreet);
c = FindCommand(NickServ, "SASET");
if (c)
c->DelSubcommand("GREET");
c->DelSubcommand(&commandnssasetgreet);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandNSSetHide : public Command
{
public:
CommandNSSetHide(const Anope::string &cname) : Command(cname, 2)
CommandNSSetHide() : Command("HIDE", 2)
{
}
@@ -91,7 +91,7 @@ class CommandNSSetHide : public Command
class CommandNSSASetHide : public Command
{
public:
CommandNSSASetHide(const Anope::string &cname) : Command(cname, 3, 3, "nickserv/saset/command")
CommandNSSASetHide() : Command("HIDE", 3, 3, "nickserv/saset/command")
{
}
@@ -174,6 +174,9 @@ class CommandNSSASetHide : public Command
class NSSetHide : public Module
{
CommandNSSetHide commandnssethide;
CommandNSSASetHide commandnssasethide;
public:
NSSetHide(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -182,22 +185,22 @@ class NSSetHide : public Module
Command *c = FindCommand(NickServ, "SET");
if (c)
c->AddSubcommand(new CommandNSSetHide("HIDE"));
c->AddSubcommand(&commandnssethide);
c = FindCommand(NickServ, "SASET");
if (c)
c->AddSubcommand(new CommandNSSASetHide("HIDE"));
c->AddSubcommand(&commandnssasethide);
}
~NSSetHide()
{
Command *c = FindCommand(NickServ, "SET");
if (c)
c->DelSubcommand("HIDE");
c->DelSubcommand(&commandnssethide);
c = FindCommand(NickServ, "SASET");
if (c)
c->DelSubcommand("HIDE");
c->DelSubcommand(&commandnssasethide);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandNSSetKill : public Command
{
public:
CommandNSSetKill(const Anope::string &cname) : Command(cname, 1)
CommandNSSetKill() : Command("KILL", 1)
{
}
@@ -81,7 +81,7 @@ class CommandNSSetKill : public Command
class CommandNSSASetKill : public Command
{
public:
CommandNSSASetKill(const Anope::string &cname) : Command(cname, 2, 2, "nickserv/saset/kill")
CommandNSSASetKill() : Command("KILL", 2, 2, "nickserv/saset/kill")
{
}
@@ -151,6 +151,9 @@ class CommandNSSASetKill : public Command
class NSSetKill : public Module
{
CommandNSSetKill commandnssetkill;
CommandNSSASetKill commandnssasetkill;
public:
NSSetKill(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -159,22 +162,22 @@ class NSSetKill : public Module
Command *c = FindCommand(NickServ, "SET");
if (c)
c->AddSubcommand(new CommandNSSetKill("KILL"));
c->AddSubcommand(&commandnssetkill);
c = FindCommand(NickServ, "SASET");
if (c)
c->AddSubcommand(new CommandNSSASetKill("KILL"));
c->AddSubcommand(&commandnssasetkill);
}
~NSSetKill()
{
Command *c = FindCommand(NickServ, "SET");
if (c)
c->DelSubcommand("KILL");
c->DelSubcommand(&commandnssetkill);
c = FindCommand(NickServ, "SASET");
if (c)
c->DelSubcommand("KILL");
c->DelSubcommand(&commandnssasetkill);
}
};
+9 -6
View File
@@ -16,7 +16,7 @@
class CommandNSSetLanguage : public Command
{
public:
CommandNSSetLanguage(const Anope::string &cname) : Command(cname, 1)
CommandNSSetLanguage() : Command("LANGUAGE", 1)
{
}
@@ -63,7 +63,7 @@ class CommandNSSetLanguage : public Command
class CommandNSSASetLanguage : public Command
{
public:
CommandNSSASetLanguage(const Anope::string &cname) : Command(cname, 2, 2, "nickserv/saset/language")
CommandNSSASetLanguage() : Command("LANGUAGE", 2, 2, "nickserv/saset/language")
{
}
@@ -111,6 +111,9 @@ class CommandNSSASetLanguage : public Command
class NSSetLanguage : public Module
{
CommandNSSetLanguage commandnssetlanguage;
CommandNSSASetLanguage commandnssasetlanguage;
public:
NSSetLanguage(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator)
{
@@ -119,22 +122,22 @@ class NSSetLanguage : public Module
Command *c = FindCommand(NickServ, "SET");
if (c)
c->AddSubcommand(new CommandNSSetLanguage("LANGUAGE"));
c->AddSubcommand(&commandnssetlanguage);
c = FindCommand(NickServ, "SASET");
if (c)
c->AddSubcommand(new CommandNSSASetLanguage("LANGUAGE"));
c->AddSubcommand(&commandnssasetlanguage);
}
~NSSetLanguage()
{
Command *c = FindCommand(NickServ, "SET");
if (c)
c->DelSubcommand("LANGUAGE");
c->DelSubcommand(&commandnssetlanguage);
c = FindCommand(NickServ, "SASET");
if (c)
c->DelSubcommand("LANGUAGE");
c->DelSubcommand(&commandnssasetlanguage);
}
};

Some files were not shown because too many files have changed in this diff Show More