summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-20 00:03:30 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-20 00:03:30 +0000
commit9e81044ffde2b1fc62456aca512d0cd7f1e52ad8 (patch)
tree189ab43567f2a49f6178a3de51bf9164e1daa723 /src
parent8516fe8689952df3eb2e4b7a01ef4f640940fd03 (diff)
Added COMMANDS command (yes, really)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1456 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/commands.cpp9
-rw-r--r--src/helperfuncs.cpp1
2 files changed, 10 insertions, 0 deletions
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,"<core>");
createcommand("UNLOADMODULE",handle_unloadmodule,'o',1,"<core>");
createcommand("SERVER",handle_server,0,0,"<core>");
+ createcommand("COMMANDS",handle_commands,0,0,"<core>");
}
bool DirValid(char* dirandfile)