From 9e81044ffde2b1fc62456aca512d0cd7f1e52ad8 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 20 May 2005 00:03:30 +0000 Subject: Added COMMANDS command (yes, really) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1456 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 9 +++++++++ src/helperfuncs.cpp | 1 + 2 files changed, 10 insertions(+) (limited to 'src') diff --git a/src/commands.cpp b/src/commands.cpp index 5011b7d61..2b96b0a8f 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -187,6 +187,15 @@ void handle_part(char **parameters, int pcnt, userrec *user) } } +void handle_commands(char **parameters, int pcnt, userrec *user) +{ + for (int i = 0; i < command_table.size(); i++) + { + WriteServ(user->fd,"902 %s :%s %s",user->nick,command_table[i].command,command_table[i].source); + } + WriteServ(user->fd,"903 %s :End of COMMANDS list"); +} + void handle_kick(char **parameters, int pcnt, userrec *user) { chanrec* Ptr = FindChan(parameters[0]); diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 703705f23..b4f4b77a0 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -1490,6 +1490,7 @@ void SetupCommandTable(void) createcommand("LOADMODULE",handle_loadmodule,'o',1,""); createcommand("UNLOADMODULE",handle_unloadmodule,'o',1,""); createcommand("SERVER",handle_server,0,0,""); + createcommand("COMMANDS",handle_commands,0,0,""); } bool DirValid(char* dirandfile) -- cgit v1.2.3