summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 14:47:24 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-04 14:47:24 +0000
commitb28baa00151ea60d3739bba9eba2fc8213fca3a3 (patch)
tree96682007ddba7049299d6ae52c1bfbf8fff936d5
parente03a68a837a02354a5a253ec5f2a60229d62143c (diff)
Fixed LUSERS and MAP to display 'dummy' data
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2141 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/commands.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index e47680702..c8aae6dfa 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -1093,11 +1093,13 @@ void handle_rehash(char **parameters, int pcnt, userrec *user)
void handle_lusers(char **parameters, int pcnt, userrec *user)
{
- WriteServ(user->fd,"251 %s :There are %d users and %d invisible on %d servers",user->nick,usercnt()-usercount_invisible(),usercount_invisible(),servercount());
+ // this lusers command shows one server at all times because
+ // a protocol module must override it to show those stats.
+ WriteServ(user->fd,"251 %s :There are %d users and %d invisible on 1 server",user->nick,usercnt()-usercount_invisible(),usercount_invisible());
WriteServ(user->fd,"252 %s %d :operator(s) online",user->nick,usercount_opers());
WriteServ(user->fd,"253 %s %d :unknown connections",user->nick,usercount_unknown());
WriteServ(user->fd,"254 %s %d :channels formed",user->nick,chancount());
- WriteServ(user->fd,"254 %s :I have %d clients and %d servers",user->nick,local_count(),count_servs());
+ WriteServ(user->fd,"254 %s :I have %d clients and 0 servers",user->nick,local_count());
}
void handle_admin(char **parameters, int pcnt, userrec *user)
@@ -1520,8 +1522,10 @@ void handle_links(char **parameters, int pcnt, userrec *user)
void handle_map(char **parameters, int pcnt, userrec *user)
{
- char line[MAXBUF];
- snprintf(line,MAXBUF,"006 %s :%s",user->nick,ServerName);
+ // as with /LUSERS this does nothing without a linking
+ // module to override its behaviour and display something
+ // better.
+ WriteServ(user->fd,"006 %s :%s",user->nick,ServerName);
WriteServ(user->fd,"007 %s :End of /MAP",user->nick);
}