diff options
Diffstat (limited to 'include')
55 files changed, 63 insertions, 56 deletions
diff --git a/include/command_parse.h b/include/command_parse.h index a0d27be17..635db619c 100644 --- a/include/command_parse.h +++ b/include/command_parse.h @@ -189,7 +189,7 @@ class cmd_reload : public command_t cmd_reload (InspIRCd* Instance) : command_t(Instance,"RELOAD",'o',1) { syntax = "<core-command>"; } /** Handle RELOAD */ - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; diff --git a/include/commands/cmd_admin.h b/include/commands/cmd_admin.h index 310819d1b..f2c08f14c 100644 --- a/include/commands/cmd_admin.h +++ b/include/commands/cmd_admin.h @@ -25,7 +25,7 @@ class cmd_admin : public command_t { public: cmd_admin (InspIRCd* Instance) : command_t(Instance,"ADMIN",0,0) { syntax = "[<servername>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_away.h b/include/commands/cmd_away.h index 3f9eddb87..9fc56081a 100644 --- a/include/commands/cmd_away.h +++ b/include/commands/cmd_away.h @@ -26,7 +26,7 @@ class cmd_away : public command_t { public: cmd_away (InspIRCd* Instance) : command_t(Instance,"AWAY",0,0) { syntax = "[<message>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_commands.h b/include/commands/cmd_commands.h index 2f9c5f4cb..70adc4f41 100644 --- a/include/commands/cmd_commands.h +++ b/include/commands/cmd_commands.h @@ -26,7 +26,7 @@ class cmd_commands : public command_t { public: cmd_commands (InspIRCd* Instance) : command_t(Instance,"COMMANDS",0,0) { } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_connect.h b/include/commands/cmd_connect.h index 203fbe9c0..642c30030 100644 --- a/include/commands/cmd_connect.h +++ b/include/commands/cmd_connect.h @@ -26,7 +26,7 @@ class cmd_connect : public command_t { public: cmd_connect (InspIRCd* Instance) : command_t(Instance,"CONNECT",'o',1) { syntax = "<servername> [<remote-server>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_die.h b/include/commands/cmd_die.h index e2b8099a2..d16196eff 100644 --- a/include/commands/cmd_die.h +++ b/include/commands/cmd_die.h @@ -26,7 +26,7 @@ class cmd_die : public command_t { public: cmd_die (InspIRCd* Instance) : command_t(Instance,"DIE",'o',1) { syntax = "<password>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_eline.h b/include/commands/cmd_eline.h index 03a1a7df8..8293d11bc 100644 --- a/include/commands/cmd_eline.h +++ b/include/commands/cmd_eline.h @@ -26,7 +26,7 @@ class cmd_eline : public command_t { public: cmd_eline (InspIRCd* Instance) : command_t(Instance,"ELINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_gline.h b/include/commands/cmd_gline.h index 726933576..c0e745077 100644 --- a/include/commands/cmd_gline.h +++ b/include/commands/cmd_gline.h @@ -26,7 +26,7 @@ class cmd_gline : public command_t { public: cmd_gline (InspIRCd* Instance) : command_t(Instance,"GLINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_info.h b/include/commands/cmd_info.h index 368f1efbd..e2630c7e7 100644 --- a/include/commands/cmd_info.h +++ b/include/commands/cmd_info.h @@ -26,7 +26,7 @@ class cmd_info : public command_t { public: cmd_info (InspIRCd* Instance) : command_t(Instance,"INFO",0,0) { syntax = "[<servermask>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_invite.h b/include/commands/cmd_invite.h index 9b68d2239..1d4b0f6b2 100644 --- a/include/commands/cmd_invite.h +++ b/include/commands/cmd_invite.h @@ -26,7 +26,7 @@ class cmd_invite : public command_t { public: cmd_invite (InspIRCd* Instance) : command_t(Instance,"INVITE",0,0) { syntax = "[<nick> <channel>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_ison.h b/include/commands/cmd_ison.h index 567f8e608..cb94bc16e 100644 --- a/include/commands/cmd_ison.h +++ b/include/commands/cmd_ison.h @@ -26,7 +26,7 @@ class cmd_ison : public command_t { public: cmd_ison (InspIRCd* Instance) : command_t(Instance,"ISON",0,0) { syntax = "<nick> {nick}"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_join.h b/include/commands/cmd_join.h index c57268cd6..fd3e948a9 100644 --- a/include/commands/cmd_join.h +++ b/include/commands/cmd_join.h @@ -26,7 +26,7 @@ class cmd_join : public command_t { public: cmd_join (InspIRCd* Instance) : command_t(Instance,"JOIN",0,1) { syntax = "<channel>{,<channel>} {<key>{,<key>}}"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_kick.h b/include/commands/cmd_kick.h index 356338b24..56f2b5bbf 100644 --- a/include/commands/cmd_kick.h +++ b/include/commands/cmd_kick.h @@ -26,7 +26,7 @@ class cmd_kick : public command_t { public: cmd_kick (InspIRCd* Instance) : command_t(Instance,"KICK",0,2) { syntax = "<channel> <nick>{,<nick>} [<reason>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_kill.h b/include/commands/cmd_kill.h index a2f361a95..8362d67e4 100644 --- a/include/commands/cmd_kill.h +++ b/include/commands/cmd_kill.h @@ -26,7 +26,7 @@ class cmd_kill : public command_t { public: cmd_kill (InspIRCd* Instance) : command_t(Instance,"KILL",'o',2) { syntax = "<nickname> <reason>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_kline.h b/include/commands/cmd_kline.h index 7e79f1021..81650bbd9 100644 --- a/include/commands/cmd_kline.h +++ b/include/commands/cmd_kline.h @@ -26,7 +26,7 @@ class cmd_kline : public command_t { public: cmd_kline (InspIRCd* Instance) : command_t(Instance,"KLINE",'o',1) { syntax = "<ident@host> [<duration> :<reason>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_links.h b/include/commands/cmd_links.h index 89ee7e15c..fb3b7aaf4 100644 --- a/include/commands/cmd_links.h +++ b/include/commands/cmd_links.h @@ -26,7 +26,7 @@ class cmd_links : public command_t { public: cmd_links (InspIRCd* Instance) : command_t(Instance,"LINKS",0,0) { } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_list.h b/include/commands/cmd_list.h index be24b87c7..279849a69 100644 --- a/include/commands/cmd_list.h +++ b/include/commands/cmd_list.h @@ -26,7 +26,7 @@ class cmd_list : public command_t { public: cmd_list (InspIRCd* Instance) : command_t(Instance,"LIST",0,0) { } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_loadmodule.h b/include/commands/cmd_loadmodule.h index c82560653..f74e8dd04 100644 --- a/include/commands/cmd_loadmodule.h +++ b/include/commands/cmd_loadmodule.h @@ -26,7 +26,7 @@ class cmd_loadmodule : public command_t { public: cmd_loadmodule (InspIRCd* Instance) : command_t(Instance,"LOADMODULE",'o',1) { syntax = "<modulename>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_lusers.h b/include/commands/cmd_lusers.h index ab3c2f601..b833bad50 100644 --- a/include/commands/cmd_lusers.h +++ b/include/commands/cmd_lusers.h @@ -26,7 +26,7 @@ class cmd_lusers : public command_t { public: cmd_lusers (InspIRCd* Instance) : command_t(Instance,"LUSERS",0,0) { } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_map.h b/include/commands/cmd_map.h index 4a06b3069..aa097bbf2 100644 --- a/include/commands/cmd_map.h +++ b/include/commands/cmd_map.h @@ -26,7 +26,7 @@ class cmd_map : public command_t { public: cmd_map (InspIRCd* Instance) : command_t(Instance,"MAP",0,0) { } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_mode.h b/include/commands/cmd_mode.h index e52042f6a..c9e82f572 100644 --- a/include/commands/cmd_mode.h +++ b/include/commands/cmd_mode.h @@ -25,7 +25,7 @@ class cmd_mode : public command_t { public: cmd_mode (InspIRCd* Instance) : command_t(Instance,"MODE",0,1) { syntax = "<target> <modes> {<mode-parameters>}"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_modules.h b/include/commands/cmd_modules.h index 537f510f5..05e4c92e2 100644 --- a/include/commands/cmd_modules.h +++ b/include/commands/cmd_modules.h @@ -26,7 +26,7 @@ class cmd_modules : public command_t { public: cmd_modules (InspIRCd* Instance) : command_t(Instance,"MODULES",0,0) { syntax = "[debug]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_motd.h b/include/commands/cmd_motd.h index 310627ab1..884422257 100644 --- a/include/commands/cmd_motd.h +++ b/include/commands/cmd_motd.h @@ -29,7 +29,7 @@ class cmd_motd : public command_t { public: cmd_motd (InspIRCd* Instance) : command_t(Instance,"MOTD",0,0) { syntax = "[<servername>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_names.h b/include/commands/cmd_names.h index c3e87e324..ad939e94b 100644 --- a/include/commands/cmd_names.h +++ b/include/commands/cmd_names.h @@ -26,7 +26,7 @@ class cmd_names : public command_t { public: cmd_names (InspIRCd* Instance) : command_t(Instance,"NAMES",0,0) { syntax = "{<channel>{,<channel>}}"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_nick.h b/include/commands/cmd_nick.h index f63a6195c..058aa1981 100644 --- a/include/commands/cmd_nick.h +++ b/include/commands/cmd_nick.h @@ -26,7 +26,7 @@ class cmd_nick : public command_t { public: cmd_nick (InspIRCd* Instance) : command_t(Instance,"NICK",0,1,true) { syntax = "<newnick>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_notice.h b/include/commands/cmd_notice.h index 24aa773c1..b50589dfe 100644 --- a/include/commands/cmd_notice.h +++ b/include/commands/cmd_notice.h @@ -26,7 +26,7 @@ class cmd_notice : public command_t { public: cmd_notice (InspIRCd* Instance) : command_t(Instance,"NOTICE",0,2) { syntax = "<target>{,<target>} <message>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_oper.h b/include/commands/cmd_oper.h index cfbdb8815..07756f76c 100644 --- a/include/commands/cmd_oper.h +++ b/include/commands/cmd_oper.h @@ -28,7 +28,7 @@ class cmd_oper : public command_t { public: cmd_oper (InspIRCd* Instance) : command_t(Instance,"OPER",0,2) { syntax = "<username> <password>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_part.h b/include/commands/cmd_part.h index 60e7911d1..6532762e0 100644 --- a/include/commands/cmd_part.h +++ b/include/commands/cmd_part.h @@ -26,7 +26,7 @@ class cmd_part : public command_t { public: cmd_part (InspIRCd* Instance) : command_t(Instance,"PART",0,1) { syntax = "<channel>{,<channel>} [<reason>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_pass.h b/include/commands/cmd_pass.h index 922f12c02..24c0e6b82 100644 --- a/include/commands/cmd_pass.h +++ b/include/commands/cmd_pass.h @@ -29,7 +29,7 @@ class cmd_pass : public command_t { public: cmd_pass (InspIRCd* Instance) : command_t(Instance,"PASS",0,1,true) { syntax = "<password>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_ping.h b/include/commands/cmd_ping.h index 2ad2aca68..c2da1d5ce 100644 --- a/include/commands/cmd_ping.h +++ b/include/commands/cmd_ping.h @@ -26,7 +26,7 @@ class cmd_ping : public command_t { public: cmd_ping (InspIRCd* Instance) : command_t(Instance,"PING",0,1) { syntax = "<servername> [:<servername>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_pong.h b/include/commands/cmd_pong.h index d89b3b877..db2b76f25 100644 --- a/include/commands/cmd_pong.h +++ b/include/commands/cmd_pong.h @@ -27,7 +27,7 @@ class cmd_pong : public command_t { public: cmd_pong (InspIRCd* Instance) : command_t(Instance,"PONG",0,1) { syntax = "<ping-text>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_privmsg.h b/include/commands/cmd_privmsg.h index c50d826d2..3f224c11e 100644 --- a/include/commands/cmd_privmsg.h +++ b/include/commands/cmd_privmsg.h @@ -26,7 +26,7 @@ class cmd_privmsg : public command_t { public: cmd_privmsg (InspIRCd* Instance) : command_t(Instance,"PRIVMSG",0,2) { syntax = "<target>{,<target>} <message>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_qline.h b/include/commands/cmd_qline.h index e6468b4eb..04fd9ce92 100644 --- a/include/commands/cmd_qline.h +++ b/include/commands/cmd_qline.h @@ -26,7 +26,7 @@ class cmd_qline : public command_t { public: cmd_qline (InspIRCd* Instance) : command_t(Instance,"QLINE",'o',1) { syntax = "<nick> [<duration> :<reason>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_quit.h b/include/commands/cmd_quit.h index 9d11538df..85e0b3d9d 100644 --- a/include/commands/cmd_quit.h +++ b/include/commands/cmd_quit.h @@ -26,7 +26,7 @@ class cmd_quit : public command_t { public: cmd_quit (InspIRCd* Instance) : command_t(Instance,"QUIT",0,0) { syntax = "[<message>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_rehash.h b/include/commands/cmd_rehash.h index f410f37b1..78abf4648 100644 --- a/include/commands/cmd_rehash.h +++ b/include/commands/cmd_rehash.h @@ -26,7 +26,7 @@ class cmd_rehash : public command_t { public: cmd_rehash (InspIRCd* Instance) : command_t(Instance,"REHASH",'o',0) { syntax = "[<servermask>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_restart.h b/include/commands/cmd_restart.h index 6d7e82f23..9ced78607 100644 --- a/include/commands/cmd_restart.h +++ b/include/commands/cmd_restart.h @@ -32,7 +32,7 @@ class cmd_restart : public command_t { public: cmd_restart (InspIRCd* Instance) : command_t(Instance,"RESTART",'o',1) { syntax = "<password>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_rules.h b/include/commands/cmd_rules.h index 496f4a0f0..ed7e56ca4 100644 --- a/include/commands/cmd_rules.h +++ b/include/commands/cmd_rules.h @@ -29,7 +29,7 @@ class cmd_rules : public command_t { public: cmd_rules (InspIRCd* Instance) : command_t(Instance,"RULES",0,0) { syntax = "[<servername>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_server.h b/include/commands/cmd_server.h index 181e53af2..0b0f5e3d1 100644 --- a/include/commands/cmd_server.h +++ b/include/commands/cmd_server.h @@ -26,7 +26,7 @@ class cmd_server : public command_t { public: cmd_server (InspIRCd* Instance) : command_t(Instance,"SERVER",0,0) { } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_squit.h b/include/commands/cmd_squit.h index 0c6f06f1a..3aaeea339 100644 --- a/include/commands/cmd_squit.h +++ b/include/commands/cmd_squit.h @@ -29,7 +29,7 @@ class cmd_squit : public command_t { public: cmd_squit (InspIRCd* Instance) : command_t(Instance,"SQUIT",'o',1) { syntax = "<servername> [<reason>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_stats.h b/include/commands/cmd_stats.h index 591b3e755..6beca59aa 100644 --- a/include/commands/cmd_stats.h +++ b/include/commands/cmd_stats.h @@ -29,7 +29,7 @@ class cmd_stats : public command_t { public: cmd_stats (InspIRCd* Instance) : command_t(Instance,"STATS",0,1) { syntax = "[<servername>] <stats-symbol>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_summon.h b/include/commands/cmd_summon.h index eaf4735d1..db25ab7d5 100644 --- a/include/commands/cmd_summon.h +++ b/include/commands/cmd_summon.h @@ -29,7 +29,7 @@ class cmd_summon : public command_t { public: cmd_summon (InspIRCd* Instance) : command_t(Instance,"SUMMON",0,0) { } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_time.h b/include/commands/cmd_time.h index a75747a6e..847cc343b 100644 --- a/include/commands/cmd_time.h +++ b/include/commands/cmd_time.h @@ -26,7 +26,7 @@ class cmd_time : public command_t { public: cmd_time (InspIRCd* Instance) : command_t(Instance,"TIME",0,0) { syntax = "[<servername>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_topic.h b/include/commands/cmd_topic.h index 3b3f7090c..052759e12 100644 --- a/include/commands/cmd_topic.h +++ b/include/commands/cmd_topic.h @@ -26,7 +26,7 @@ class cmd_topic : public command_t { public: cmd_topic (InspIRCd* Instance) : command_t(Instance,"TOPIC",0,1) { syntax = "<channel> [<topic>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_trace.h b/include/commands/cmd_trace.h index 8fe3b166a..8276a1e92 100644 --- a/include/commands/cmd_trace.h +++ b/include/commands/cmd_trace.h @@ -26,7 +26,7 @@ class cmd_trace : public command_t { public: cmd_trace (InspIRCd* Instance) : command_t(Instance,"TRACE",'o',0) { syntax = "[<object>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_unloadmodule.h b/include/commands/cmd_unloadmodule.h index 0104d04b1..ba19bc5e1 100644 --- a/include/commands/cmd_unloadmodule.h +++ b/include/commands/cmd_unloadmodule.h @@ -26,7 +26,7 @@ class cmd_unloadmodule : public command_t { public: cmd_unloadmodule (InspIRCd* Instance) : command_t(Instance,"UNLOADMODULE",'o',1) { syntax = "<modulename>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_user.h b/include/commands/cmd_user.h index ac8a1a6c4..f5d7cb242 100644 --- a/include/commands/cmd_user.h +++ b/include/commands/cmd_user.h @@ -26,7 +26,7 @@ class cmd_user : public command_t { public: cmd_user (InspIRCd* Instance) : command_t(Instance,"USER",0,4,true) { syntax = "<username> <localhost> <remotehost> <GECOS>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_userhost.h b/include/commands/cmd_userhost.h index 83ae27678..d15c6b623 100644 --- a/include/commands/cmd_userhost.h +++ b/include/commands/cmd_userhost.h @@ -26,7 +26,7 @@ class cmd_userhost : public command_t { public: cmd_userhost (InspIRCd* Instance) : command_t(Instance,"USERHOST",0,1) { syntax = "<nick>{,<nick>}"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_users.h b/include/commands/cmd_users.h index bd1607607..479bb1a7b 100644 --- a/include/commands/cmd_users.h +++ b/include/commands/cmd_users.h @@ -29,7 +29,7 @@ class cmd_users : public command_t { public: cmd_users (InspIRCd* Instance) : command_t(Instance,"USERS",0,0) { } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_version.h b/include/commands/cmd_version.h index 6a77725c1..accbd7452 100644 --- a/include/commands/cmd_version.h +++ b/include/commands/cmd_version.h @@ -26,7 +26,7 @@ class cmd_version : public command_t { public: cmd_version (InspIRCd* Instance) : command_t(Instance,"VERSION",0,0) { syntax = "[<servername>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_wallops.h b/include/commands/cmd_wallops.h index 819fa121e..da8b95fe4 100644 --- a/include/commands/cmd_wallops.h +++ b/include/commands/cmd_wallops.h @@ -26,7 +26,7 @@ class cmd_wallops : public command_t { public: cmd_wallops (InspIRCd* Instance) : command_t(Instance,"WALLOPS",'o',1) { syntax = "<any-text>"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_who.h b/include/commands/cmd_who.h index fff9737ad..a52836cbf 100644 --- a/include/commands/cmd_who.h +++ b/include/commands/cmd_who.h @@ -26,7 +26,7 @@ class cmd_who : public command_t { public: 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); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_whois.h b/include/commands/cmd_whois.h index 26e2e52c3..76d445cf5 100644 --- a/include/commands/cmd_whois.h +++ b/include/commands/cmd_whois.h @@ -28,7 +28,7 @@ class cmd_whois : public command_t { public: cmd_whois (InspIRCd* Instance) : command_t(Instance,"WHOIS",0,1) { syntax = "<nick>{,<nick>}"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_whowas.h b/include/commands/cmd_whowas.h index 1664a847d..12e59863d 100644 --- a/include/commands/cmd_whowas.h +++ b/include/commands/cmd_whowas.h @@ -26,7 +26,7 @@ class cmd_whowas : public command_t { public: cmd_whowas (InspIRCd* Instance) : command_t(Instance,"WHOWAS",0,1) { syntax = "<nick>{,<nick>}"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/commands/cmd_zline.h b/include/commands/cmd_zline.h index eefd3c642..8dd2c2988 100644 --- a/include/commands/cmd_zline.h +++ b/include/commands/cmd_zline.h @@ -26,7 +26,7 @@ class cmd_zline : public command_t { public: cmd_zline (InspIRCd* Instance) : command_t(Instance,"ZLINE",'o',1) { syntax = "<ipmask> [<duration> :<reason>]"; } - void Handle(const char** parameters, int pcnt, userrec *user); + CmdResult Handle(const char** parameters, int pcnt, userrec *user); }; #endif diff --git a/include/ctables.h b/include/ctables.h index 870efadac..9adf6c37c 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -25,7 +25,14 @@ class userrec; class InspIRCd; -/*typedef void (handlerfunc) (char**, int, userrec*);*/ +/** Used to indicate command success codes + */ +enum CmdResult +{ + CMD_FAILURE = 0, /* Command exists, but failed */ + CMD_SUCCESS = 1, /* Command exists, and succeeded */ + CMD_INVALID = 2, /* Command doesnt exist at all! */ +}; /** A structure that defines a command */ @@ -70,7 +77,7 @@ class command_t : public Extensible syntax = ""; } - virtual void Handle(const char** parameters, int pcnt, userrec* user) = 0; + virtual CmdResult Handle(const char** parameters, int pcnt, userrec* user) = 0; void Disable(bool setting) { |