summaryrefslogtreecommitdiff
path: root/modules/m_rehash.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/m_rehash.c')
-rw-r--r--modules/m_rehash.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/modules/m_rehash.c b/modules/m_rehash.c
index d039def..42861e6 100644
--- a/modules/m_rehash.c
+++ b/modules/m_rehash.c
@@ -1,8 +1,7 @@
/*
- * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- * m_rehash.c: Re-reads the configuration file.
+ * 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,8 +17,11 @@
* 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_rehash.c
+ * \brief Includes required functions for processing the REHASH command.
+ * \version $Id$
*/
#include "stdinc.h"
@@ -41,7 +43,7 @@
* mo_rehash - REHASH message handler
*
*/
-static void
+static int
mo_rehash(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
@@ -51,7 +53,7 @@ mo_rehash(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p, form_str(ERR_NOPRIVS),
me.name, source_p->name, "rehash");
- return;
+ return 0;
}
if (!EmptyString(parv[1]))
@@ -76,18 +78,12 @@ mo_rehash(struct Client *client_p, struct Client *source_p,
}
if (found)
- {
ilog(LOG_TYPE_IRCD, "REHASH %s From %s",
parv[1], get_oper_name(source_p));
- return;
- }
else
- {
sendto_one(source_p, ":%s NOTICE %s :%s is not a valid option. "
"Choose from DNS, MOTD",
me.name, source_p->name, parv[1]);
- return;
- }
}
else
{
@@ -100,11 +96,14 @@ mo_rehash(struct Client *client_p, struct Client *source_p,
get_oper_name(source_p));
rehash(0);
}
+
+ return 0;
}
-static struct Message rehash_msgtab = {
+static struct Message rehash_msgtab =
+{
"REHASH", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
- {m_unregistered, m_not_oper, m_ignore, m_ignore, mo_rehash, m_ignore}
+ { m_unregistered, m_not_oper, m_ignore, m_ignore, mo_rehash, m_ignore }
};
static void
@@ -119,7 +118,8 @@ module_exit(void)
mod_del_cmd(&rehash_msgtab);
}
-struct module module_entry = {
+struct module module_entry =
+{
.node = { NULL, NULL, NULL },
.name = NULL,
.version = "$Revision$",