diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-09 13:46:42 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-09 13:46:42 +0000 |
commit | 237766c84573c4a5439382fe6ba2afc026a18e09 (patch) | |
tree | d79f214bfe5bee2a9576b912c228bae18bf5aa80 | |
parent | 4754d3371f209ce31ca417a8c557e29805d3cc49 (diff) |
Added support for /NAMES with no parameters (just gives a hardcoded response anyway, who thinks up this shit)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1023 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/commands.cpp | 6 | ||||
-rw-r--r-- | src/inspircd.cpp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index edbff1272..e42bc2ade 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -570,6 +570,12 @@ void handle_names(char **parameters, int pcnt, userrec *user) { chanrec* c; + if (!pcnt) + { + WriteServ(user->fd,"366 %s * :End of /NAMES list.",user->nick); + return; + } + if (loop_call(handle_names,parameters,pcnt,user,0,pcnt-1,0)) return; c = FindChan(parameters[0]); diff --git a/src/inspircd.cpp b/src/inspircd.cpp index e001406b9..eb014f611 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -3080,7 +3080,7 @@ void SetupCommandTable(void) createcommand("WALLOPS",handle_wallops,'o',1,"<core>"); createcommand("NOTICE",handle_notice,0,2,"<core>"); createcommand("JOIN",handle_join,0,1,"<core>"); - createcommand("NAMES",handle_names,0,1,"<core>"); + createcommand("NAMES",handle_names,0,0,"<core>"); createcommand("PART",handle_part,0,1,"<core>"); createcommand("KICK",handle_kick,0,2,"<core>"); createcommand("MODE",handle_mode,0,1,"<core>"); |