X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/5203cba5cea34030f9775b6fac1263aacfa37b82..f3439650c08a82af4271c364ac79b5b091799e5b:/modules/m_ison.c diff --git a/modules/m_ison.c b/modules/m_ison.c index 5533545c..9f4dd577 100644 --- a/modules/m_ison.c +++ b/modules/m_ison.c @@ -20,8 +20,6 @@ * 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_ison.c 254 2005-09-21 23:35:12Z nenolod $ */ #include "stdinc.h" @@ -39,15 +37,18 @@ #include -static int m_ison(struct Client *, struct Client *, int, const char **); +static const char ison_desc[] = "Provides the ISON command to check if a set of users is online"; + +static void m_ison(struct MsgBuf *, struct Client *, struct Client *, int, const char **); struct Message ison_msgtab = { - "ISON", 0, 0, 0, MFLG_SLOW, + "ISON", 0, 0, 0, 0, {mg_unreg, {m_ison, 2}, mg_ignore, mg_ignore, mg_ignore, {m_ison, 2}} }; mapi_clist_av1 ison_clist[] = { &ison_msgtab, NULL }; -DECLARE_MODULE_AV1(ison, NULL, NULL, ison_clist, NULL, NULL, "$Revision: 254 $"); + +DECLARE_MODULE_AV2(ison, NULL, NULL, ison_clist, NULL, NULL, NULL, NULL, ison_desc); static char buf[BUFSIZE]; static char buf2[BUFSIZE]; @@ -62,8 +63,8 @@ static char buf2[BUFSIZE]; * format: * ISON :nicklist */ -static int -m_ison(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) +static void +m_ison(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { struct Client *target_p; char *nick; @@ -80,7 +81,7 @@ m_ison(struct Client *client_p, struct Client *source_p, int parc, const char *p len = strlen(buf); current_insert_point = buf + len; - /* rfc1489 is ambigious about how to handle ISON + /* rfc1459 is ambigious about how to handle ISON * this should handle both interpretations. */ for (i = 1; i < parc; i++) @@ -88,7 +89,7 @@ m_ison(struct Client *client_p, struct Client *source_p, int parc, const char *p char *cs = LOCAL_COPY(parv[i]); for (nick = rb_strtok_r(cs, " ", &p); nick; nick = rb_strtok_r(NULL, " ", &p)) { - target_p = find_named_client(nick); + target_p = find_named_person(nick); if(target_p != NULL) { @@ -119,6 +120,4 @@ m_ison(struct Client *client_p, struct Client *source_p, int parc, const char *p *current_insert_point2 = '\0'; sendto_one(source_p, "%s", buf); - - return 0; }