* 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"
#include "client.h"
-#include "irc_string.h"
-#include "sprintf_irc.h"
+#include "match.h"
#include "ircd.h"
#include "numeric.h"
#include "send.h"
#include <string.h>
-static int m_ison(struct Client *, struct Client *, int, const char **);
+static int 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, NULL);
static char buf[BUFSIZE];
static char buf2[BUFSIZE];
* ISON :nicklist
*/
static int
-m_ison(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+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;
current_insert_point2 = buf2;
*buf2 = '\0';
- rb_sprintf(buf, form_str(RPL_ISON), me.name, source_p->name);
+ sprintf(buf, form_str(RPL_ISON), me.name, source_p->name);
len = strlen(buf);
current_insert_point = buf + len;
for (i = 1; i < parc; i++)
{
char *cs = LOCAL_COPY(parv[i]);
- for (nick = strtoken(&p, cs, " "); nick; nick = strtoken(&p, NULL, " "))
+ for (nick = rb_strtok_r(cs, " ", &p); nick; nick = rb_strtok_r(NULL, " ", &p))
{
target_p = find_named_client(nick);