summaryrefslogtreecommitdiff
path: root/modules/m_lusers.c
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-15 23:12:35 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-15 23:12:35 +0000
commit6050eda92352c426897d0f4ffefff1e14d82a131 (patch)
tree805c366d597006c8397a09f60a395fab60547d60 /modules/m_lusers.c
parentb7561a82c59655512bc85214ae434eb245d5d936 (diff)
- Clean up all files in modules/ (fixed indentation, removed whitespaces/tabs)
- Fixed copyright years - Made module handlers int type for later use git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2821 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'modules/m_lusers.c')
-rw-r--r--modules/m_lusers.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/modules/m_lusers.c b/modules/m_lusers.c
index 3fd23ce..77adc69 100644
--- a/modules/m_lusers.c
+++ b/modules/m_lusers.c
@@ -1,8 +1,7 @@
/*
- * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- * m_lusers.c: Sends user statistics.
+ * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
*
- * Copyright (C) 2002 by the past and present ircd coders, and others.
+ * Copyright (c) 1997-2014 ircd-hybrid development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -18,16 +17,19 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
- *
- * $Id$
+ */
+
+/*! \file m_lusers.c
+ * \brief Includes required functions for processing the LUSERS command.
+ * \version $Id$
*/
#include "stdinc.h"
#include "client.h"
#include "ircd.h"
#include "numeric.h"
-#include "s_serv.h" /* hunt_server */
-#include "s_user.h" /* show_lusers */
+#include "s_serv.h"
+#include "s_user.h"
#include "send.h"
#include "conf.h"
#include "parse.h"
@@ -44,7 +46,7 @@
*
* 2003 hacked parv[1] back in, by request of efnet admins/opers -Dianora
*/
-static void
+static int
m_lusers(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
@@ -54,7 +56,7 @@ m_lusers(struct Client *client_p, struct Client *source_p,
{
/* safe enough to give this on a local connect only */
sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name);
- return;
+ return 0;
}
last_used = CurrentTime;
@@ -62,9 +64,10 @@ m_lusers(struct Client *client_p, struct Client *source_p,
if (parc > 2 && !ConfigServerHide.disable_remote_commands)
if (hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2,
parc, parv) != HUNTED_ISME)
- return;
+ return 0;
show_lusers(source_p);
+ return 0;
}
/* ms_lusers - LUSERS message handler for servers and opers
@@ -72,21 +75,23 @@ m_lusers(struct Client *client_p, struct Client *source_p,
* parv[1] = host/server mask.
* parv[2] = server to query
*/
-static void
+static int
ms_lusers(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
if (parc > 2)
if (hunt_server(client_p, source_p, ":%s LUSERS %s :%s", 2,
parc, parv) != HUNTED_ISME)
- return;
+ return 0;
show_lusers(source_p);
+ return 0;
}
-static struct Message lusers_msgtab = {
+static struct Message lusers_msgtab =
+{
"LUSERS", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
- {m_unregistered, m_lusers, ms_lusers, m_ignore, ms_lusers, m_ignore}
+ { m_unregistered, m_lusers, ms_lusers, m_ignore, ms_lusers, m_ignore }
};
static void
@@ -101,7 +106,8 @@ module_exit(void)
mod_del_cmd(&lusers_msgtab);
}
-struct module module_entry = {
+struct module module_entry =
+{
.node = { NULL, NULL, NULL },
.name = NULL,
.version = "$Revision$",