summaryrefslogtreecommitdiff
path: root/modules/m_globops.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/m_globops.c')
-rw-r--r--modules/m_globops.c37
1 files changed, 22 insertions, 15 deletions
diff --git a/modules/m_globops.c b/modules/m_globops.c
index 3e59501..ac00f2e 100644
--- a/modules/m_globops.c
+++ b/modules/m_globops.c
@@ -1,7 +1,7 @@
/*
- * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
*
- * Copyright (C) 2002 by the past and present ircd coders, and others.
+ * Copyright (c) 2011-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
@@ -17,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_globops.c
+ * \brief Includes required functions for processing the GLOBOPS command.
+ * \version $Id$
*/
#include "stdinc.h"
@@ -38,7 +41,7 @@
* parv[0] = sender prefix
* parv[1] = message text
*/
-static void
+static int
mo_globops(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
@@ -48,31 +51,32 @@ mo_globops(struct Client *client_p, struct Client *source_p,
{
sendto_one(source_p, form_str(ERR_NOPRIVS),
me.name, source_p->name, "globops");
- return;
+ return 0;
}
if (EmptyString(message))
{
sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
me.name, source_p->name, "GLOBOPS");
- return;
+ return 0;
}
- sendto_server(NULL, CAP_TS6, NOCAPS,
- ":%s GLOBOPS :%s", ID(source_p), message);
- sendto_server(NULL, NOCAPS, CAP_TS6,
- ":%s GLOBOPS :%s", source_p->name, message);
+ sendto_server(NULL, CAP_TS6, NOCAPS, ":%s GLOBOPS :%s",
+ ID(source_p), message);
+ sendto_server(NULL, NOCAPS, CAP_TS6, ":%s GLOBOPS :%s",
+ source_p->name, message);
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_GLOBAL, "from: %s: %s",
source_p->name, message);
+ return 0;
}
-static void
+static int
ms_globops(struct Client *client_p, struct Client *source_p,
int parc, char *parv[])
{
if (EmptyString(parv[1]))
- return;
+ return 0;
sendto_server(client_p, CAP_TS6, NOCAPS, ":%s GLOBOPS :%s",
ID(source_p), parv[1]);
@@ -81,9 +85,11 @@ ms_globops(struct Client *client_p, struct Client *source_p,
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_GLOBAL, "from: %s: %s",
source_p->name, parv[1]);
+ return 0;
}
-static struct Message globops_msgtab = {
+static struct Message globops_msgtab =
+{
"GLOBOPS", 0, 0, 2, MAXPARA, MFLG_SLOW, 0,
{ m_unregistered, m_not_oper, ms_globops, m_ignore, mo_globops, m_ignore }
};
@@ -100,7 +106,8 @@ module_exit(void)
mod_del_cmd(&globops_msgtab);
}
-struct module module_entry = {
+struct module module_entry =
+{
.node = { NULL, NULL, NULL },
.name = NULL,
.version = "$Revision$",