diff options
Diffstat (limited to 'modules/m_time.c')
-rw-r--r-- | modules/m_time.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/modules/m_time.c b/modules/m_time.c index 3e9a0df..ba6bcba 100644 --- a/modules/m_time.c +++ b/modules/m_time.c @@ -1,8 +1,7 @@ /* - * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). - * m_time.c: Sends the current time on the server. + * 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_time.c + * \brief Includes required functions for processing the TIME command. + * \version $Id$ */ #include "stdinc.h" @@ -40,7 +42,7 @@ * parv[0] = sender prefix * parv[1] = servername */ -static void +static int m_time(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { @@ -51,10 +53,11 @@ m_time(struct Client *client_p, struct Client *source_p, /* This is safe enough to use during non hidden server mode */ if (!ConfigServerHide.disable_remote_commands) if (hunt_server(client_p, source_p, ":%s TIME :%s", 1, parc, parv) != HUNTED_ISME) - return; + return 0; sendto_one(source_p, form_str(RPL_TIME), me.name, source_p->name, me.name, date(0)); + return 0; } /* @@ -62,16 +65,18 @@ m_time(struct Client *client_p, struct Client *source_p, * parv[0] = sender prefix * parv[1] = servername */ -static void +static int mo_time(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { if (hunt_server(client_p, source_p, ":%s TIME :%s", 1, parc, parv) == HUNTED_ISME) sendto_one(source_p, form_str(RPL_TIME), me.name, source_p->name, me.name, date(0)); + return 0; } -static struct Message time_msgtab = { +static struct Message time_msgtab = +{ "TIME", 0, 0, 0, MAXPARA, MFLG_SLOW, 0, { m_unregistered, m_time, mo_time, m_ignore, mo_time, m_ignore } }; @@ -88,7 +93,8 @@ module_exit(void) mod_del_cmd(&time_msgtab); } -struct module module_entry = { +struct module module_entry = +{ .node = { NULL, NULL, NULL }, .name = NULL, .version = "$Revision$", |