From 237766c84573c4a5439382fe6ba2afc026a18e09 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 9 Apr 2005 13:46:42 +0000 Subject: 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 --- src/commands.cpp | 6 ++++++ src/inspircd.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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,""); createcommand("NOTICE",handle_notice,0,2,""); createcommand("JOIN",handle_join,0,1,""); - createcommand("NAMES",handle_names,0,1,""); + createcommand("NAMES",handle_names,0,0,""); createcommand("PART",handle_part,0,1,""); createcommand("KICK",handle_kick,0,2,""); createcommand("MODE",handle_mode,0,1,""); -- cgit v1.2.3