summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp6
1 files changed, 6 insertions, 0 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]);