mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
(Bigger than it looks, i did this with perl inplace edit) -- commands now take an InspIRCd* param to their constructor, so that you can do stuff within them without an extern
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4862 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
d0b4bb3811
commit
66098d307c
@ -24,7 +24,7 @@
|
||||
class cmd_admin : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_admin () : command_t("ADMIN",0,0) { syntax = "[<servername>]"; }
|
||||
cmd_admin (InspIRCd* Instance) : command_t(Instance,"ADMIN",0,0) { syntax = "[<servername>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_away : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_away () : command_t("AWAY",0,0) { syntax = "[<message>]"; }
|
||||
cmd_away (InspIRCd* Instance) : command_t(Instance,"AWAY",0,0) { syntax = "[<message>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_commands : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_commands () : command_t("COMMANDS",0,0) { }
|
||||
cmd_commands (InspIRCd* Instance) : command_t(Instance,"COMMANDS",0,0) { }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
class cmd_connect : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_connect () : command_t("CONNECT",'o',1) { syntax = "<servername> [<remote-server>]"; }
|
||||
cmd_connect (InspIRCd* Instance) : command_t(Instance,"CONNECT",'o',1) { syntax = "<servername> [<remote-server>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_die : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_die () : command_t("DIE",'o',1) { syntax = "<password>"; }
|
||||
cmd_die (InspIRCd* Instance) : command_t(Instance,"DIE",'o',1) { syntax = "<password>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_eline : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_eline () : command_t("ELINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
|
||||
cmd_eline (InspIRCd* Instance) : command_t(Instance,"ELINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_gline : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_gline () : command_t("GLINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
|
||||
cmd_gline (InspIRCd* Instance) : command_t(Instance,"GLINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_info : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_info () : command_t("INFO",0,0) { syntax = "[<servermask>]"; }
|
||||
cmd_info (InspIRCd* Instance) : command_t(Instance,"INFO",0,0) { syntax = "[<servermask>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_invite : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_invite () : command_t("INVITE",0,0) { syntax = "[<nick> <channel>]"; }
|
||||
cmd_invite (InspIRCd* Instance) : command_t(Instance,"INVITE",0,0) { syntax = "[<nick> <channel>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_ison : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_ison () : command_t("ISON",0,0) { syntax = "<nick> {nick}"; }
|
||||
cmd_ison (InspIRCd* Instance) : command_t(Instance,"ISON",0,0) { syntax = "<nick> {nick}"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_join : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_join () : command_t("JOIN",0,1) { syntax = "<channel>{,<channel>} {<key>{,<key>}}"; }
|
||||
cmd_join (InspIRCd* Instance) : command_t(Instance,"JOIN",0,1) { syntax = "<channel>{,<channel>} {<key>{,<key>}}"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_kick : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_kick () : command_t("KICK",0,2) { syntax = "<channel> <nick>{,<nick>} [<reason>]"; }
|
||||
cmd_kick (InspIRCd* Instance) : command_t(Instance,"KICK",0,2) { syntax = "<channel> <nick>{,<nick>} [<reason>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_kill : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_kill () : command_t("KILL",'o',2) { syntax = "<nickname> <reason>"; }
|
||||
cmd_kill (InspIRCd* Instance) : command_t(Instance,"KILL",'o',2) { syntax = "<nickname> <reason>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_kline : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_kline () : command_t("KLINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
|
||||
cmd_kline (InspIRCd* Instance) : command_t(Instance,"KLINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_links : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_links () : command_t("LINKS",0,0) { }
|
||||
cmd_links (InspIRCd* Instance) : command_t(Instance,"LINKS",0,0) { }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_list : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_list () : command_t("LIST",0,0) { }
|
||||
cmd_list (InspIRCd* Instance) : command_t(Instance,"LIST",0,0) { }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_loadmodule : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_loadmodule () : command_t("LOADMODULE",'o',1) { syntax = "<modulename>"; }
|
||||
cmd_loadmodule (InspIRCd* Instance) : command_t(Instance,"LOADMODULE",'o',1) { syntax = "<modulename>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_lusers : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_lusers () : command_t("LUSERS",0,0) { }
|
||||
cmd_lusers (InspIRCd* Instance) : command_t(Instance,"LUSERS",0,0) { }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_map : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_map () : command_t("MAP",0,0) { }
|
||||
cmd_map (InspIRCd* Instance) : command_t(Instance,"MAP",0,0) { }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_modules : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_modules () : command_t("MODULES",0,0) { syntax = "[debug]"; }
|
||||
cmd_modules (InspIRCd* Instance) : command_t(Instance,"MODULES",0,0) { syntax = "[debug]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_motd : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_motd () : command_t("MOTD",0,0) { syntax = "[<servername>]"; }
|
||||
cmd_motd (InspIRCd* Instance) : command_t(Instance,"MOTD",0,0) { syntax = "[<servername>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_names : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_names () : command_t("NAMES",0,0) { syntax = "{<channel>{,<channel>}}"; }
|
||||
cmd_names (InspIRCd* Instance) : command_t(Instance,"NAMES",0,0) { syntax = "{<channel>{,<channel>}}"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_nick : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_nick () : command_t("NICK",0,1) { syntax = "<newnick>"; }
|
||||
cmd_nick (InspIRCd* Instance) : command_t(Instance,"NICK",0,1) { syntax = "<newnick>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_notice : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_notice () : command_t("NOTICE",0,2) { syntax = "<target>{,<target>} <message>"; }
|
||||
cmd_notice (InspIRCd* Instance) : command_t(Instance,"NOTICE",0,2) { syntax = "<target>{,<target>} <message>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -33,7 +33,7 @@ bool OneOfMatches(const char* host, const char* ip, const char* hostlist);
|
||||
class cmd_oper : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_oper () : command_t("OPER",0,2) { syntax = "<username> <password>"; }
|
||||
cmd_oper (InspIRCd* Instance) : command_t(Instance,"OPER",0,2) { syntax = "<username> <password>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_part : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_part () : command_t("PART",0,1) { syntax = "<channel>{,<channel>} [<reason>]"; }
|
||||
cmd_part (InspIRCd* Instance) : command_t(Instance,"PART",0,1) { syntax = "<channel>{,<channel>} [<reason>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_pass : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_pass () : command_t("PASS",0,1) { syntax = "<password>"; }
|
||||
cmd_pass (InspIRCd* Instance) : command_t(Instance,"PASS",0,1) { syntax = "<password>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_ping : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_ping () : command_t("PING",0,1) { syntax = "<servername> [:<servername>]"; }
|
||||
cmd_ping (InspIRCd* Instance) : command_t(Instance,"PING",0,1) { syntax = "<servername> [:<servername>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_pong : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_pong () : command_t("PONG",0,1) { syntax = "<ping-text>"; }
|
||||
cmd_pong (InspIRCd* Instance) : command_t(Instance,"PONG",0,1) { syntax = "<ping-text>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_privmsg : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_privmsg () : command_t("PRIVMSG",0,2) { syntax = "<target>{,<target>} <message>"; }
|
||||
cmd_privmsg (InspIRCd* Instance) : command_t(Instance,"PRIVMSG",0,2) { syntax = "<target>{,<target>} <message>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_qline : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_qline () : command_t("QLINE",'o',1) { syntax = "<nick> [<duration> :<reason>]"; }
|
||||
cmd_qline (InspIRCd* Instance) : command_t(Instance,"QLINE",'o',1) { syntax = "<nick> [<duration> :<reason>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_quit : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_quit () : command_t("QUIT",0,0) { syntax = "[<message>]"; }
|
||||
cmd_quit (InspIRCd* Instance) : command_t(Instance,"QUIT",0,0) { syntax = "[<message>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_rehash : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_rehash () : command_t("REHASH",'o',0) { syntax = "[<servermask>]"; }
|
||||
cmd_rehash (InspIRCd* Instance) : command_t(Instance,"REHASH",'o',0) { syntax = "[<servermask>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_restart : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_restart () : command_t("RESTART",'o',1) { syntax = "<password>"; }
|
||||
cmd_restart (InspIRCd* Instance) : command_t(Instance,"RESTART",'o',1) { syntax = "<password>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_rules : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_rules () : command_t("RULES",0,0) { syntax = "[<servername>]"; }
|
||||
cmd_rules (InspIRCd* Instance) : command_t(Instance,"RULES",0,0) { syntax = "[<servername>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_server : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_server () : command_t("SERVER",0,0) { }
|
||||
cmd_server (InspIRCd* Instance) : command_t(Instance,"SERVER",0,0) { }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_squit : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_squit () : command_t("SQUIT",'o',1) { syntax = "<servername> [<reason>]"; }
|
||||
cmd_squit (InspIRCd* Instance) : command_t(Instance,"SQUIT",'o',1) { syntax = "<servername> [<reason>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -33,7 +33,7 @@ void DoStats(char statschar, userrec* user, string_list &results);
|
||||
class cmd_stats : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_stats () : command_t("STATS",0,1) { syntax = "[<servername>] <stats-symbol>"; }
|
||||
cmd_stats (InspIRCd* Instance) : command_t(Instance,"STATS",0,1) { syntax = "[<servername>] <stats-symbol>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_summon : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_summon () : command_t("SUMMON",0,0) { }
|
||||
cmd_summon (InspIRCd* Instance) : command_t(Instance,"SUMMON",0,0) { }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_time : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_time () : command_t("TIME",0,0) { syntax = "[<servername>]"; }
|
||||
cmd_time (InspIRCd* Instance) : command_t(Instance,"TIME",0,0) { syntax = "[<servername>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_topic : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_topic () : command_t("TOPIC",0,1) { syntax = "<channel> [<topic>]"; }
|
||||
cmd_topic (InspIRCd* Instance) : command_t(Instance,"TOPIC",0,1) { syntax = "<channel> [<topic>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_trace : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_trace () : command_t("TRACE",'o',0) { syntax = "[<object>]"; }
|
||||
cmd_trace (InspIRCd* Instance) : command_t(Instance,"TRACE",'o',0) { syntax = "[<object>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_unloadmodule : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_unloadmodule () : command_t("UNLOADMODULE",'o',1) { syntax = "<modulename>"; }
|
||||
cmd_unloadmodule (InspIRCd* Instance) : command_t(Instance,"UNLOADMODULE",'o',1) { syntax = "<modulename>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_user : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_user () : command_t("USER",0,4) { syntax = "<username> <localhost> <remotehost> <GECOS>"; }
|
||||
cmd_user (InspIRCd* Instance) : command_t(Instance,"USER",0,4) { syntax = "<username> <localhost> <remotehost> <GECOS>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_userhost : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_userhost () : command_t("USERHOST",0,1) { syntax = "<nick>{,<nick>}"; }
|
||||
cmd_userhost (InspIRCd* Instance) : command_t(Instance,"USERHOST",0,1) { syntax = "<nick>{,<nick>}"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_users : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_users () : command_t("USERS",0,0) { }
|
||||
cmd_users (InspIRCd* Instance) : command_t(Instance,"USERS",0,0) { }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_version : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_version () : command_t("VERSION",0,0) { syntax = "[<servername>]"; }
|
||||
cmd_version (InspIRCd* Instance) : command_t(Instance,"VERSION",0,0) { syntax = "[<servername>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_wallops : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_wallops () : command_t("WALLOPS",'o',1) { syntax = "<any-text>"; }
|
||||
cmd_wallops (InspIRCd* Instance) : command_t(Instance,"WALLOPS",'o',1) { syntax = "<any-text>"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_who : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_who () : command_t("WHO",0,1) { syntax = "<server>|<nickname>|<channel>|<realname>|<host>|0 [ohur]"; }
|
||||
cmd_who (InspIRCd* Instance) : command_t(Instance,"WHO",0,1) { syntax = "<server>|<nickname>|<channel>|<realname>|<host>|0 [ohur]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -33,7 +33,7 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i
|
||||
class cmd_whois : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_whois () : command_t("WHOIS",0,1) { syntax = "<nick>{,<nick>}"; }
|
||||
cmd_whois (InspIRCd* Instance) : command_t(Instance,"WHOIS",0,1) { syntax = "<nick>{,<nick>}"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_whowas : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_whowas () : command_t("WHOWAS",0,1) { syntax = "<nick>{,<nick>}"; }
|
||||
cmd_whowas (InspIRCd* Instance) : command_t(Instance,"WHOWAS",0,1) { syntax = "<nick>{,<nick>}"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
class cmd_zline : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_zline () : command_t("ZLINE",'o',1) { syntax = "<ipmask> [<duration> :<reason>]"; }
|
||||
cmd_zline (InspIRCd* Instance) : command_t(Instance,"ZLINE",'o',1) { syntax = "<ipmask> [<duration> :<reason>]"; }
|
||||
void Handle(const char** parameters, int pcnt, userrec *user);
|
||||
};
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "base.h"
|
||||
|
||||
class userrec;
|
||||
class InspIRCd;
|
||||
|
||||
/*typedef void (handlerfunc) (char**, int, userrec*);*/
|
||||
|
||||
@ -30,6 +31,8 @@ class userrec;
|
||||
*/
|
||||
class command_t : public Extensible
|
||||
{
|
||||
protected:
|
||||
InspIRCd* ServerInstance;
|
||||
public:
|
||||
/** Command name
|
||||
*/
|
||||
@ -57,7 +60,7 @@ class command_t : public Extensible
|
||||
*/
|
||||
std::string syntax;
|
||||
|
||||
command_t(const std::string &cmd, char flags, int minpara) : command(cmd), flags_needed(flags), min_params(minpara), disabled(false)
|
||||
command_t(InspIRCd* Instance, const std::string &cmd, char flags, int minpara) : ServerInstance(Instance), command(cmd), flags_needed(flags), min_params(minpara), disabled(false)
|
||||
{
|
||||
use_count = total_bytes = 0;
|
||||
source = "<core>";
|
||||
|
@ -400,7 +400,7 @@ class cmd_mode : public command_t
|
||||
/**
|
||||
* Standard constructor
|
||||
*/
|
||||
cmd_mode () : command_t("MODE",0,1) { syntax = "<target> <modes> {<mode-parameters>}"; }
|
||||
cmd_mode (InspIRCd* Instance) : command_t(Instance,"MODE",0,1) { syntax = "<target> <modes> {<mode-parameters>}"; }
|
||||
/**
|
||||
* Handle MODE
|
||||
*/
|
||||
|
@ -330,63 +330,64 @@ void CommandParser::SetupCommandTable()
|
||||
* full user registration) and so are saved
|
||||
* for later use.
|
||||
*/
|
||||
command_user = new cmd_user;
|
||||
command_nick = new cmd_nick;
|
||||
command_pass = new cmd_pass;
|
||||
command_user = new cmd_user(ServerInstance);
|
||||
command_nick = new cmd_nick(ServerInstance);
|
||||
command_pass = new cmd_pass(ServerInstance);
|
||||
this->CreateCommand(command_user);
|
||||
this->CreateCommand(command_nick);
|
||||
this->CreateCommand(command_pass);
|
||||
|
||||
/* The rest of these arent special. boo hoo.
|
||||
*/
|
||||
this->CreateCommand(new cmd_quit);
|
||||
this->CreateCommand(new cmd_version);
|
||||
this->CreateCommand(new cmd_ping);
|
||||
this->CreateCommand(new cmd_pong);
|
||||
this->CreateCommand(new cmd_admin);
|
||||
this->CreateCommand(new cmd_privmsg);
|
||||
this->CreateCommand(new cmd_info);
|
||||
this->CreateCommand(new cmd_time);
|
||||
this->CreateCommand(new cmd_whois);
|
||||
this->CreateCommand(new cmd_wallops);
|
||||
this->CreateCommand(new cmd_notice);
|
||||
this->CreateCommand(new cmd_join);
|
||||
this->CreateCommand(new cmd_names);
|
||||
this->CreateCommand(new cmd_part);
|
||||
this->CreateCommand(new cmd_kick);
|
||||
this->CreateCommand(new cmd_mode);
|
||||
this->CreateCommand(new cmd_topic);
|
||||
this->CreateCommand(new cmd_who);
|
||||
this->CreateCommand(new cmd_motd);
|
||||
this->CreateCommand(new cmd_rules);
|
||||
this->CreateCommand(new cmd_oper);
|
||||
this->CreateCommand(new cmd_list);
|
||||
this->CreateCommand(new cmd_die);
|
||||
this->CreateCommand(new cmd_restart);
|
||||
this->CreateCommand(new cmd_kill);
|
||||
this->CreateCommand(new cmd_rehash);
|
||||
this->CreateCommand(new cmd_lusers);
|
||||
this->CreateCommand(new cmd_stats);
|
||||
this->CreateCommand(new cmd_userhost);
|
||||
this->CreateCommand(new cmd_away);
|
||||
this->CreateCommand(new cmd_ison);
|
||||
this->CreateCommand(new cmd_summon);
|
||||
this->CreateCommand(new cmd_users);
|
||||
this->CreateCommand(new cmd_invite);
|
||||
this->CreateCommand(new cmd_trace);
|
||||
this->CreateCommand(new cmd_whowas);
|
||||
this->CreateCommand(new cmd_connect);
|
||||
this->CreateCommand(new cmd_squit);
|
||||
this->CreateCommand(new cmd_modules);
|
||||
this->CreateCommand(new cmd_links);
|
||||
this->CreateCommand(new cmd_map);
|
||||
this->CreateCommand(new cmd_kline);
|
||||
this->CreateCommand(new cmd_gline);
|
||||
this->CreateCommand(new cmd_zline);
|
||||
this->CreateCommand(new cmd_qline);
|
||||
this->CreateCommand(new cmd_eline);
|
||||
this->CreateCommand(new cmd_loadmodule);
|
||||
this->CreateCommand(new cmd_unloadmodule);
|
||||
this->CreateCommand(new cmd_server);
|
||||
this->CreateCommand(new cmd_commands);
|
||||
this->CreateCommand(new cmd_quit(ServerInstance));
|
||||
this->CreateCommand(new cmd_version(ServerInstance));
|
||||
this->CreateCommand(new cmd_ping(ServerInstance));
|
||||
this->CreateCommand(new cmd_pong(ServerInstance));
|
||||
this->CreateCommand(new cmd_admin(ServerInstance));
|
||||
this->CreateCommand(new cmd_privmsg(ServerInstance));
|
||||
this->CreateCommand(new cmd_info(ServerInstance));
|
||||
this->CreateCommand(new cmd_time(ServerInstance));
|
||||
this->CreateCommand(new cmd_whois(ServerInstance));
|
||||
this->CreateCommand(new cmd_wallops(ServerInstance));
|
||||
this->CreateCommand(new cmd_notice(ServerInstance));
|
||||
this->CreateCommand(new cmd_join(ServerInstance));
|
||||
this->CreateCommand(new cmd_names(ServerInstance));
|
||||
this->CreateCommand(new cmd_part(ServerInstance));
|
||||
this->CreateCommand(new cmd_kick(ServerInstance));
|
||||
this->CreateCommand(new cmd_mode(ServerInstance));
|
||||
this->CreateCommand(new cmd_topic(ServerInstance));
|
||||
this->CreateCommand(new cmd_who(ServerInstance));
|
||||
this->CreateCommand(new cmd_motd(ServerInstance));
|
||||
this->CreateCommand(new cmd_rules(ServerInstance));
|
||||
this->CreateCommand(new cmd_oper(ServerInstance));
|
||||
this->CreateCommand(new cmd_list(ServerInstance));
|
||||
this->CreateCommand(new cmd_die(ServerInstance));
|
||||
this->CreateCommand(new cmd_restart(ServerInstance));
|
||||
this->CreateCommand(new cmd_kill(ServerInstance));
|
||||
this->CreateCommand(new cmd_rehash(ServerInstance));
|
||||
this->CreateCommand(new cmd_lusers(ServerInstance));
|
||||
this->CreateCommand(new cmd_stats(ServerInstance));
|
||||
this->CreateCommand(new cmd_userhost(ServerInstance));
|
||||
this->CreateCommand(new cmd_away(ServerInstance));
|
||||
this->CreateCommand(new cmd_ison(ServerInstance));
|
||||
this->CreateCommand(new cmd_summon(ServerInstance));
|
||||
this->CreateCommand(new cmd_users(ServerInstance));
|
||||
this->CreateCommand(new cmd_invite(ServerInstance));
|
||||
this->CreateCommand(new cmd_trace(ServerInstance));
|
||||
this->CreateCommand(new cmd_whowas(ServerInstance));
|
||||
this->CreateCommand(new cmd_connect(ServerInstance));
|
||||
this->CreateCommand(new cmd_squit(ServerInstance));
|
||||
this->CreateCommand(new cmd_modules(ServerInstance));
|
||||
this->CreateCommand(new cmd_links(ServerInstance));
|
||||
this->CreateCommand(new cmd_map(ServerInstance));
|
||||
this->CreateCommand(new cmd_kline(ServerInstance));
|
||||
this->CreateCommand(new cmd_gline(ServerInstance));
|
||||
this->CreateCommand(new cmd_zline(ServerInstance));
|
||||
this->CreateCommand(new cmd_qline(ServerInstance));
|
||||
this->CreateCommand(new cmd_eline(ServerInstance));
|
||||
this->CreateCommand(new cmd_loadmodule(ServerInstance));
|
||||
this->CreateCommand(new cmd_unloadmodule(ServerInstance));
|
||||
this->CreateCommand(new cmd_server(ServerInstance));
|
||||
this->CreateCommand(new cmd_commands(ServerInstance));
|
||||
}
|
||||
|
||||
|
@ -63,11 +63,8 @@ cbanlist cbans;
|
||||
|
||||
class cmd_cban : public command_t
|
||||
{
|
||||
private:
|
||||
InspIRCd* ServerInstance;
|
||||
|
||||
public:
|
||||
cmd_cban(InspIRCd* Me) : command_t("CBAN", 'o', 1), ServerInstance(Me)
|
||||
cmd_cban(InspIRCd* Me) : command_t(Me, "CBAN", 'o', 1)
|
||||
{
|
||||
this->source = "m_cban.so";
|
||||
this->
|
||||
|
@ -31,7 +31,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_check : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_check() : command_t("CHECK", 'o', 1)
|
||||
cmd_check (InspIRCd* Instance) : command_t(Instance,"CHECK", 'o', 1)
|
||||
{
|
||||
this->source = "m_check.so";
|
||||
syntax = "<nickname>|<ip>|<hostmask>|<channel>";
|
||||
@ -189,7 +189,7 @@ class ModuleCheck : public Module
|
||||
ModuleCheck(InspIRCd* Me) : Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_check();
|
||||
mycommand = new cmd_check(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_chghost : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_chghost () : command_t("CHGHOST",'o',2)
|
||||
cmd_chghost (InspIRCd* Instance) : command_t(Instance,"CHGHOST",'o',2)
|
||||
{
|
||||
this->source = "m_chghost.so";
|
||||
syntax = "<nick> <newhost>";
|
||||
@ -78,7 +78,7 @@ class ModuleChgHost : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_chghost();
|
||||
mycommand = new cmd_chghost(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_chgident : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_chgident() : command_t("CHGIDENT", 'o', 2)
|
||||
cmd_chgident (InspIRCd* Instance) : command_t(Instance,"CHGIDENT", 'o', 2)
|
||||
{
|
||||
this->source = "m_chgident.so";
|
||||
syntax = "<nick> <newident>";
|
||||
@ -48,7 +48,7 @@ class ModuleChgIdent : public Module
|
||||
public:
|
||||
ModuleChgIdent(InspIRCd* Me) : Module::Module(Me)
|
||||
{
|
||||
mycommand = new cmd_chgident();
|
||||
mycommand = new cmd_chgident(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_devoice : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_devoice () : command_t("DEVOICE", 0, 1)
|
||||
cmd_devoice (InspIRCd* Instance) : command_t(Instance,"DEVOICE", 0, 1)
|
||||
{
|
||||
this->source = "m_devoice.so";
|
||||
syntax = "<channel>";
|
||||
@ -64,7 +64,7 @@ class ModuleDeVoice : public Module
|
||||
ModuleDeVoice(InspIRCd* Me) : Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_devoice();
|
||||
mycommand = new cmd_devoice(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ extern InspIRCd *ServerInstance;
|
||||
class cmd_gloadmodule : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_gloadmodule () : command_t("GLOADMODULE", 'o', 1)
|
||||
cmd_gloadmodule (InspIRCd* Instance) : command_t(Instance,"GLOADMODULE", 'o', 1)
|
||||
{
|
||||
this->source = "m_globalload.so";
|
||||
syntax = "<modulename>";
|
||||
@ -53,7 +53,7 @@ class cmd_gloadmodule : public command_t
|
||||
class cmd_gunloadmodule : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_gunloadmodule () : command_t("GUNLOADMODULE", 'o', 1)
|
||||
cmd_gunloadmodule (InspIRCd* Instance) : command_t(Instance,"GUNLOADMODULE", 'o', 1)
|
||||
{
|
||||
this->source = "m_globalload.so";
|
||||
syntax = "<modulename>";
|
||||
@ -82,8 +82,8 @@ class ModuleGlobalLoad : public Module
|
||||
ModuleGlobalLoad(InspIRCd* Me) : Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_gloadmodule();
|
||||
mycommand2 = new cmd_gunloadmodule();
|
||||
mycommand = new cmd_gloadmodule(ServerInstance);
|
||||
mycommand2 = new cmd_gunloadmodule(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
ServerInstance->AddCommand(mycommand2);
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_globops : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_globops () : command_t("GLOBOPS",'o',1)
|
||||
cmd_globops (InspIRCd* Instance) : command_t(Instance,"GLOBOPS",'o',1)
|
||||
{
|
||||
this->source = "m_globops.so";
|
||||
syntax = "<any-text>";
|
||||
@ -89,7 +89,7 @@ class ModuleGlobops : public Module
|
||||
|
||||
mg = new ModeGlobops(ServerInstance);
|
||||
ServerInstance->AddMode(mg, 'g');
|
||||
mycommand = new cmd_globops();
|
||||
mycommand = new cmd_globops(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ class Helpop : public ModeHandler
|
||||
class cmd_helpop : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_helpop () : command_t("HELPOP",0,1)
|
||||
cmd_helpop (InspIRCd* Instance) : command_t(Instance, "HELPOP", 0, 1)
|
||||
{
|
||||
this->source = "m_helpop.so";
|
||||
syntax = "[?|!]<any-text>";
|
||||
@ -206,7 +206,7 @@ class ModuleHelpop : public Module
|
||||
ReadConfig();
|
||||
ho = new Helpop(ServerInstance);
|
||||
ServerInstance->AddMode(ho, 'h');
|
||||
mycommand = new cmd_helpop();
|
||||
mycommand = new cmd_helpop(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_knock : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_knock () : command_t("KNOCK", 0, 2)
|
||||
cmd_knock (InspIRCd* Instance) : command_t(Instance,"KNOCK", 0, 2)
|
||||
{
|
||||
this->source = "m_knock.so";
|
||||
syntax = "<channel> <reason>";
|
||||
@ -114,7 +114,7 @@ class ModuleKnock : public Module
|
||||
|
||||
kn = new Knock(ServerInstance);
|
||||
ServerInstance->AddMode(kn, 'K');
|
||||
mycommand = new cmd_knock();
|
||||
mycommand = new cmd_knock(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ class cmd_nicklock : public command_t
|
||||
{
|
||||
char* dummy;
|
||||
public:
|
||||
cmd_nicklock () : command_t("NICKLOCK", 'o', 2)
|
||||
cmd_nicklock (InspIRCd* Instance) : command_t(Instance,"NICKLOCK", 'o', 2)
|
||||
{
|
||||
this->source = "m_nicklock.so";
|
||||
syntax = "<oldnick> <newnick>";
|
||||
@ -70,7 +70,7 @@ class cmd_nicklock : public command_t
|
||||
class cmd_nickunlock : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_nickunlock () : command_t("NICKUNLOCK", 'o', 1)
|
||||
cmd_nickunlock (InspIRCd* Instance) : command_t(Instance,"NICKUNLOCK", 'o', 1)
|
||||
{
|
||||
this->source = "m_nickunlock.so";
|
||||
syntax = "<locked-nick>";
|
||||
@ -99,8 +99,8 @@ class ModuleNickLock : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
cmd1 = new cmd_nicklock();
|
||||
cmd2 = new cmd_nickunlock();
|
||||
cmd1 = new cmd_nicklock(ServerInstance);
|
||||
cmd2 = new cmd_nickunlock(ServerInstance);
|
||||
ServerInstance->AddCommand(cmd1);
|
||||
ServerInstance->AddCommand(cmd2);
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ void GenHash(const char* src, char* dest)
|
||||
class cmd_mkpasswd : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_mkpasswd () : command_t("MKPASSWD", 'o', 1)
|
||||
cmd_mkpasswd (InspIRCd* Instance) : command_t(Instance,"MKPASSWD", 'o', 1)
|
||||
{
|
||||
this->source = "m_opermd5.so";
|
||||
syntax = "<any-text>";
|
||||
@ -296,7 +296,7 @@ class ModuleOperMD5 : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_mkpasswd();
|
||||
mycommand = new cmd_mkpasswd(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ void ShowOperMOTD(userrec* user)
|
||||
class cmd_opermotd : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_opermotd () : command_t("OPERMOTD", 'o', 0)
|
||||
cmd_opermotd (InspIRCd* Instance) : command_t(Instance,"OPERMOTD", 'o', 0)
|
||||
{
|
||||
this->source = "m_opermotd.so";
|
||||
syntax = "[<servername>]";
|
||||
@ -67,7 +67,7 @@ class ModuleOpermotd : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_opermotd();
|
||||
mycommand = new cmd_opermotd(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
opermotd = new FileReader();
|
||||
LoadOperMOTD();
|
||||
|
@ -228,7 +228,7 @@ void SHA256(const char *src, char *dest, int len)
|
||||
class cmd_mksha256 : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_mksha256() : command_t("MKSHA256", 'o', 1)
|
||||
cmd_mksha256 (InspIRCd* Instance) : command_t(Instance,"MKSHA256", 'o', 1)
|
||||
{
|
||||
this->source = "m_opersha256.so";
|
||||
syntax = "<any-text>";
|
||||
@ -250,7 +250,7 @@ public:
|
||||
ModuleOperSHA256(InspIRCd* Me) : Module::Module(Me)
|
||||
{
|
||||
|
||||
mksha256cmd = new cmd_mksha256();
|
||||
mksha256cmd = new cmd_mksha256(ServerInstance);
|
||||
ServerInstance->AddCommand(mksha256cmd);
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ parkedinfo pi;
|
||||
class cmd_park : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_park () : command_t("PARK", 0, 0)
|
||||
cmd_park (InspIRCd* Instance) : command_t(Instance,"PARK", 0, 0)
|
||||
{
|
||||
this->source = "m_park.so";
|
||||
}
|
||||
@ -106,7 +106,7 @@ class cmd_park : public command_t
|
||||
class cmd_parkstats : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_parkstats () : command_t("PARKSTATS", 'o', 0)
|
||||
cmd_parkstats (InspIRCd* Instance) : command_t(Instance,"PARKSTATS", 'o', 0)
|
||||
{
|
||||
this->source = "m_park.so";
|
||||
}
|
||||
@ -122,7 +122,7 @@ class cmd_parkstats : public command_t
|
||||
class cmd_unpark : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_unpark () : command_t("UNPARK", 0, 2)
|
||||
cmd_unpark (InspIRCd* Instance) : command_t(Instance,"UNPARK", 0, 2)
|
||||
{
|
||||
this->source = "m_park.so";
|
||||
syntax = "<nick> <key>";
|
||||
@ -232,9 +232,9 @@ class ModulePark : public Module
|
||||
|
||||
pinfo.clear();
|
||||
this->ReadSettings();
|
||||
cmd1 = new cmd_park();
|
||||
cmd2 = new cmd_unpark();
|
||||
cmd3 = new cmd_parkstats();
|
||||
cmd1 = new cmd_park(ServerInstance);
|
||||
cmd2 = new cmd_unpark(ServerInstance);
|
||||
cmd3 = new cmd_parkstats(ServerInstance);
|
||||
ServerInstance->AddCommand(cmd1);
|
||||
ServerInstance->AddCommand(cmd2);
|
||||
ServerInstance->AddCommand(cmd3);
|
||||
|
@ -34,7 +34,7 @@ std::string suffix = "";
|
||||
class cmd_randquote : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_randquote () : command_t("RANDQUOTE", 0, 0)
|
||||
cmd_randquote (InspIRCd* Instance) : command_t(Instance,"RANDQUOTE", 0, 0)
|
||||
{
|
||||
this->source = "m_randquote.so";
|
||||
}
|
||||
@ -108,7 +108,7 @@ class ModuleRandQuote : public Module
|
||||
else
|
||||
{
|
||||
/* Hidden Command -- Mode clients assume /quote sends raw data to an IRCd >:D */
|
||||
mycommand = new cmd_randquote();
|
||||
mycommand = new cmd_randquote(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ class RemoveBase
|
||||
class cmd_remove : public command_t, public RemoveBase
|
||||
{
|
||||
public:
|
||||
cmd_remove(bool& snk) : command_t("REMOVE", 0, 2), RemoveBase(snk)
|
||||
cmd_remove(InspIRCd* Instance, bool& snk) : command_t(Instance, "REMOVE", 0, 2), RemoveBase(snk)
|
||||
{
|
||||
this->source = "m_remove.so";
|
||||
syntax = "<nick> <channel> [<reason>]";
|
||||
@ -222,7 +222,7 @@ class cmd_remove : public command_t, public RemoveBase
|
||||
class cmd_fpart : public command_t, public RemoveBase
|
||||
{
|
||||
public:
|
||||
cmd_fpart(bool& snk) : command_t("FPART", 0, 2), RemoveBase(snk)
|
||||
cmd_fpart(InspIRCd* Instance, bool& snk) : command_t(Instance, "FPART", 0, 2), RemoveBase(snk)
|
||||
{
|
||||
this->source = "m_remove.so";
|
||||
syntax = "<channel> <nick> [<reason>]";
|
||||
@ -245,8 +245,8 @@ class ModuleRemove : public Module
|
||||
ModuleRemove(InspIRCd* Me)
|
||||
: Module::Module(Me)
|
||||
{
|
||||
mycommand = new cmd_remove(supportnokicks);
|
||||
mycommand2 = new cmd_fpart(supportnokicks);
|
||||
mycommand = new cmd_remove(ServerInstance, supportnokicks);
|
||||
mycommand2 = new cmd_fpart(ServerInstance, supportnokicks);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
ServerInstance->AddCommand(mycommand2);
|
||||
OnRehash("");
|
||||
|
@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_sajoin : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_sajoin() : command_t("SAJOIN", 'o', 2)
|
||||
cmd_sajoin (InspIRCd* Instance) : command_t(Instance,"SAJOIN", 'o', 2)
|
||||
{
|
||||
this->source = "m_sajoin.so";
|
||||
syntax = "<nick> <channel>";
|
||||
@ -69,7 +69,7 @@ class ModuleSajoin : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_sajoin();
|
||||
mycommand = new cmd_sajoin(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_samode : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_samode () : command_t("SAMODE", 'o', 2)
|
||||
cmd_samode (InspIRCd* Instance) : command_t(Instance,"SAMODE", 'o', 2)
|
||||
{
|
||||
this->source = "m_samode.so";
|
||||
syntax = "<target> <modes> {<mode-parameters>}";
|
||||
@ -80,7 +80,7 @@ class ModuleSaMode : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_samode();
|
||||
mycommand = new cmd_samode(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_sanick : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_sanick () : command_t("SANICK", 'o', 2)
|
||||
cmd_sanick (InspIRCd* Instance) : command_t(Instance,"SANICK", 'o', 2)
|
||||
{
|
||||
this->source = "m_sanick.so";
|
||||
syntax = "<nick> <new-nick>";
|
||||
@ -72,7 +72,7 @@ class ModuleSanick : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_sanick();
|
||||
mycommand = new cmd_sanick(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_sapart : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_sapart () : command_t("SAPART", 'o', 2)
|
||||
cmd_sapart (InspIRCd* Instance) : command_t(Instance,"SAPART", 'o', 2)
|
||||
{
|
||||
this->source = "m_sapart.so";
|
||||
syntax = "<nick> <channel>";
|
||||
@ -65,7 +65,7 @@ class ModuleSapart : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_sapart();
|
||||
mycommand = new cmd_sapart(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_saquit : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_saquit () : command_t("SAQUIT",'o',2)
|
||||
cmd_saquit (InspIRCd* Instance) : command_t(Instance,"SAQUIT",'o',2)
|
||||
{
|
||||
this->source = "m_saquit.so";
|
||||
syntax = "<nick> <reason>";
|
||||
@ -78,7 +78,7 @@ class ModuleSaquit : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_saquit();
|
||||
mycommand = new cmd_saquit(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_sethost : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_sethost() : command_t("SETHOST",'o',1)
|
||||
cmd_sethost (InspIRCd* Instance) : command_t(Instance,"SETHOST",'o',1)
|
||||
{
|
||||
this->source = "m_sethost.so";
|
||||
syntax = "<new-hostname>";
|
||||
@ -70,7 +70,7 @@ class ModuleSetHost : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_sethost();
|
||||
mycommand = new cmd_sethost(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_setident : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_setident() : command_t("SETIDENT", 'o', 1)
|
||||
cmd_setident (InspIRCd* Instance) : command_t(Instance,"SETIDENT", 'o', 1)
|
||||
{
|
||||
this->source = "m_setident.so";
|
||||
syntax = "<new-ident>";
|
||||
@ -42,7 +42,7 @@ class ModuleSetIdent : public Module
|
||||
ModuleSetIdent(InspIRCd* Me) : Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_setident();
|
||||
mycommand = new cmd_setident(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_setidle : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_setidle () : command_t("SETIDLE", 'o', 1)
|
||||
cmd_setidle (InspIRCd* Instance) : command_t(Instance,"SETIDLE", 'o', 1)
|
||||
{
|
||||
this->source = "m_setidle.so";
|
||||
syntax = "<idle-seconds>";
|
||||
@ -62,7 +62,7 @@ class ModuleSetIdle : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_setidle();
|
||||
mycommand = new cmd_setidle(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_setname : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_setname () : command_t("SETNAME", 0, 1)
|
||||
cmd_setname (InspIRCd* Instance) : command_t(Instance,"SETNAME", 0, 1)
|
||||
{
|
||||
this->source = "m_setname.so";
|
||||
syntax = "<new-gecos>";
|
||||
@ -58,7 +58,7 @@ class ModuleSetName : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_setname();
|
||||
mycommand = new cmd_setname(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ typedef std::vector<std::string> silencelist;
|
||||
class cmd_silence : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_silence() : command_t("SILENCE", 0, 0)
|
||||
cmd_silence (InspIRCd* Instance) : command_t(Instance,"SILENCE", 0, 0)
|
||||
{
|
||||
this->source = "m_silence.so";
|
||||
syntax = "{[+|-]<nick>}";
|
||||
@ -142,7 +142,7 @@ class ModuleSilence : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_silence();
|
||||
mycommand = new cmd_silence(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -599,7 +599,7 @@ class cmd_rconnect : public command_t
|
||||
{
|
||||
Module* Creator;
|
||||
public:
|
||||
cmd_rconnect (Module* Callback) : command_t("RCONNECT", 'o', 2), Creator(Callback)
|
||||
cmd_rconnect (InspIRCd* Instance, Module* Callback) : command_t(Instance, "RCONNECT", 'o', 2), Creator(Callback)
|
||||
{
|
||||
this->source = "m_spanningtree.so";
|
||||
syntax = "<remote-server-mask> <servermask>";
|
||||
@ -3431,7 +3431,7 @@ class ModuleSpanningTree : public Module
|
||||
|
||||
ReadConfiguration(true);
|
||||
|
||||
command_rconnect = new cmd_rconnect(this);
|
||||
command_rconnect = new cmd_rconnect(ServerInstance, this);
|
||||
ServerInstance->AddCommand(command_rconnect);
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ void spy_userlist(userrec *user,chanrec *c)
|
||||
class cmd_spylist : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_spylist () : command_t("SPYLIST", 'o', 0)
|
||||
cmd_spylist (InspIRCd* Instance) : command_t(Instance,"SPYLIST", 'o', 0)
|
||||
{
|
||||
this->source = "m_spy.so";
|
||||
syntax = "";
|
||||
@ -106,7 +106,7 @@ class cmd_spylist : public command_t
|
||||
class cmd_spynames : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_spynames () : command_t("SPYNAMES", 'o', 0)
|
||||
cmd_spynames (InspIRCd* Instance) : command_t(Instance,"SPYNAMES", 'o', 0)
|
||||
{
|
||||
this->source = "m_spy.so";
|
||||
syntax = "{<channel>{,<channel>}}";
|
||||
@ -148,8 +148,8 @@ class ModuleSpy : public Module
|
||||
ModuleSpy(InspIRCd* Me) : Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_spylist();
|
||||
mycommand2 = new cmd_spynames();
|
||||
mycommand = new cmd_spylist(ServerInstance);
|
||||
mycommand2 = new cmd_spynames(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
ServerInstance->AddCommand(mycommand2);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class cmd_swhois : public command_t
|
||||
{
|
||||
|
||||
public:
|
||||
cmd_swhois() : command_t("SWHOIS",'o',2)
|
||||
cmd_swhois (InspIRCd* Instance) : command_t(Instance,"SWHOIS",'o',2)
|
||||
{
|
||||
this->source = "m_swhois.so";
|
||||
syntax = "<nick> <swhois>";
|
||||
@ -85,7 +85,7 @@ class ModuleSWhois : public Module
|
||||
{
|
||||
|
||||
Conf = new ConfigReader();
|
||||
mycommand = new cmd_swhois();
|
||||
mycommand = new cmd_swhois(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ class MyV6Resolver : public Resolver
|
||||
class cmd_woot : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_woot () : command_t("WOOT", 0, 0)
|
||||
cmd_woot (InspIRCd* Instance) : command_t(Instance,"WOOT", 0, 0)
|
||||
{
|
||||
this->source = "m_testcommand.so";
|
||||
}
|
||||
@ -91,7 +91,7 @@ class ModuleTestCommand : public Module
|
||||
// 0 in the modes parameter signifies that
|
||||
// anyone can issue the command, and the
|
||||
// command takes only one parameter.
|
||||
newcommand = new cmd_woot();
|
||||
newcommand = new cmd_woot(ServerInstance);
|
||||
ServerInstance->AddCommand(newcommand);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ timedbans TimedBanList;
|
||||
class cmd_tban : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_tban () : command_t("TBAN", 0, 3)
|
||||
cmd_tban (InspIRCd* Instance) : command_t(Instance,"TBAN", 0, 3)
|
||||
{
|
||||
this->source = "m_timedbans.so";
|
||||
syntax = "<channel> <duration> <banmask>";
|
||||
@ -120,7 +120,7 @@ class ModuleTimedBans : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_tban();
|
||||
mycommand = new cmd_tban(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
TimedBanList.clear();
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_tline : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_tline () : command_t("TLINE", 'o', 1)
|
||||
cmd_tline (InspIRCd* Instance) : command_t(Instance,"TLINE", 'o', 1)
|
||||
{
|
||||
this->source = "m_tline.so";
|
||||
this->syntax = "<mask>";
|
||||
@ -81,7 +81,7 @@ class ModuleTLine : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
newcommand = new cmd_tline();
|
||||
newcommand = new cmd_tline(ServerInstance);
|
||||
ServerInstance->AddCommand(newcommand);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_uninvite : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_uninvite () : command_t("UNINVITE", 0, 2)
|
||||
cmd_uninvite (InspIRCd* Instance) : command_t(Instance,"UNINVITE", 0, 2)
|
||||
{
|
||||
this->source = "m_uninvite.so";
|
||||
syntax = "<nick> <channel>";
|
||||
@ -95,7 +95,7 @@ class ModuleUninvite : public Module
|
||||
ModuleUninvite(InspIRCd* Me) : Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_uninvite();
|
||||
mycommand = new cmd_uninvite(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ extern InspIRCd* ServerInstance;
|
||||
class cmd_userip : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_userip () : command_t("USERIP", 'o', 1)
|
||||
cmd_userip (InspIRCd* Instance) : command_t(Instance,"USERIP", 'o', 1)
|
||||
{
|
||||
this->source = "m_userip.so";
|
||||
syntax = "<nick>{,<nick>}";
|
||||
@ -63,7 +63,7 @@ class ModuleUserIP : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_userip();
|
||||
mycommand = new cmd_userip(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ static ConfigReader *Conf;
|
||||
class cmd_vhost : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_vhost() : command_t("VHOST", 0, 2)
|
||||
cmd_vhost (InspIRCd* Instance) : command_t(Instance,"VHOST", 0, 2)
|
||||
{
|
||||
this->source = "m_vhost.so";
|
||||
syntax = "<username> <password>";
|
||||
@ -68,7 +68,7 @@ class ModuleVHost : public Module
|
||||
{
|
||||
|
||||
Conf = new ConfigReader;
|
||||
mycommand = new cmd_vhost();
|
||||
mycommand = new cmd_vhost(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ watchlist watches;
|
||||
class cmd_watch : public command_t
|
||||
{
|
||||
public:
|
||||
cmd_watch() : command_t("WATCH",0,0)
|
||||
cmd_watch (InspIRCd* Instance) : command_t(Instance,"WATCH",0,0)
|
||||
{
|
||||
this->source = "m_watch.so";
|
||||
syntax = "[C|L|S]|[+|-<nick>]";
|
||||
@ -206,7 +206,7 @@ class Modulewatch : public Module
|
||||
: Module::Module(Me)
|
||||
{
|
||||
|
||||
mycommand = new cmd_watch();
|
||||
mycommand = new cmd_watch(ServerInstance);
|
||||
ServerInstance->AddCommand(mycommand);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user