X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/428ca87b01ad6c0487b424ce478f775cb7d94519..9b24cbdecc72337e825764f39cdf59ca23f41788:/modules/m_whowas.c diff --git a/modules/m_whowas.c b/modules/m_whowas.c index d2e15ca6..a5038cce 100644 --- a/modules/m_whowas.c +++ b/modules/m_whowas.c @@ -20,14 +20,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: m_whowas.c 1717 2006-07-04 14:41:11Z jilles $ */ #include "stdinc.h" #include "whowas.h" #include "client.h" -#include "common.h" #include "hash.h" #include "match.h" #include "ircd.h" @@ -41,21 +38,25 @@ #include "parse.h" #include "modules.h" -static int m_whowas(struct MsgBuf *, struct Client *, struct Client *, int, const char **); +static const char whowas_desc[] = + "Provides the WHOWAS command to display information on a disconnected user"; + +static void m_whowas(struct MsgBuf *, struct Client *, struct Client *, int, const char **); struct Message whowas_msgtab = { - "WHOWAS", 0, 0, 0, MFLG_SLOW, + "WHOWAS", 0, 0, 0, 0, {mg_unreg, {m_whowas, 2}, {m_whowas, 4}, mg_ignore, mg_ignore, {m_whowas, 2}} }; mapi_clist_av1 whowas_clist[] = { &whowas_msgtab, NULL }; -DECLARE_MODULE_AV1(whowas, NULL, NULL, whowas_clist, NULL, NULL, "$Revision: 1717 $"); + +DECLARE_MODULE_AV2(whowas, NULL, NULL, whowas_clist, NULL, NULL, NULL, NULL, whowas_desc); /* ** m_whowas ** parv[1] = nickname queried */ -static int +static void m_whowas(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { rb_dlink_list *whowas_list; @@ -79,7 +80,7 @@ m_whowas(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source me.name, source_p->name, "WHOWAS"); sendto_one_numeric(source_p, RPL_ENDOFWHOWAS, form_str(RPL_ENDOFWHOWAS), parv[1]); - return 0; + return; } else last_used = rb_current_time(); @@ -91,7 +92,7 @@ m_whowas(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source if(parc > 3) if(hunt_server(client_p, source_p, ":%s WHOWAS %s %s :%s", 3, parc, parv)) - return 0; + return; if(!MyClient(source_p) && (max <= 0 || max > 20)) max = 20; @@ -108,7 +109,7 @@ m_whowas(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source { sendto_one_numeric(source_p, ERR_WASNOSUCHNICK, form_str(ERR_WASNOSUCHNICK), nick); sendto_one_numeric(source_p, RPL_ENDOFWHOWAS, form_str(RPL_ENDOFWHOWAS), parv[1]); - return 0; + return; } RB_DLINK_FOREACH(ptr, whowas_list->head) @@ -147,5 +148,4 @@ m_whowas(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source } sendto_one_numeric(source_p, RPL_ENDOFWHOWAS, form_str(RPL_ENDOFWHOWAS), parv[1]); - return 0; }