summaryrefslogtreecommitdiff
path: root/modules/m_motd.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_motd.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_motd.c')
-rw-r--r--modules/m_motd.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/modules/m_motd.c b/modules/m_motd.c
index f84eeb4..42d788a 100644
--- a/modules/m_motd.c
+++ b/modules/m_motd.c
@@ -1,8 +1,7 @@
/*
- * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
- * m_motd.c: Shows the current message of the day.
+ * 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_motd.c
+ * \brief Includes required functions for processing the MOTD command.
+ * \version $Id$
*/
#include "stdinc.h"
@@ -35,7 +37,7 @@
#include "conf.h"
-static void
+static int
do_motd(struct Client *source_p)
{
sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE,
@@ -43,6 +45,7 @@ do_motd(struct Client *source_p)
source_p->name, source_p->username,
source_p->host, source_p->servptr->name);
motd_send(source_p);
+ return 0;
}
/*
@@ -50,7 +53,7 @@ do_motd(struct Client *source_p)
** parv[0] = sender prefix
** parv[1] = servername
*/
-static void
+static int
m_motd(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
@@ -61,7 +64,7 @@ m_motd(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;
@@ -70,9 +73,9 @@ m_motd(struct Client *client_p, struct Client *source_p,
if (!ConfigServerHide.disable_remote_commands && !ConfigServerHide.hide_servers)
if (hunt_server(client_p, source_p, ":%s MOTD :%s", 1,
parc, parv) != HUNTED_ISME)
- return;
+ return 0;
- do_motd(source_p);
+ return do_motd(source_p);
}
/*
@@ -88,18 +91,19 @@ m_motd(struct Client *client_p, struct Client *source_p,
** parv[0] = sender prefix
** parv[1] = servername
*/
-static void
+static int
mo_motd(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
if (hunt_server(client_p, source_p, ":%s MOTD :%s", 1,
parc, parv) != HUNTED_ISME)
- return;
+ return 0;
- do_motd(source_p);
+ return do_motd(source_p);
}
-static struct Message motd_msgtab = {
+static struct Message motd_msgtab =
+{
"MOTD", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
{ m_unregistered, m_motd, mo_motd, m_ignore, mo_motd, m_ignore }
};
@@ -116,7 +120,8 @@ module_exit(void)
mod_del_cmd(&motd_msgtab);
}
-struct module module_entry = {
+struct module module_entry =
+{
.node = { NULL, NULL, NULL },
.name = NULL,
.version = "$Revision$",