summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands.cpp6
-rw-r--r--src/inspircd.cpp2
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>");