#include "parse.h"
#include "modules.h"
#include "packet.h"
-#include "sprintf_irc.h"
-static int m_time(struct Client *, struct Client *, int, const char **);
+static int m_time(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static char *date(void);
struct Message time_msgtab = {
- "TIME", 0, 0, 0, MFLG_SLOW,
+ "TIME", 0, 0, 0, 0,
{mg_unreg, {m_time, 0}, {m_time, 2}, mg_ignore, mg_ignore, {m_time, 0}}
};
/*
* m_time
- * parv[0] = sender prefix
* parv[1] = servername
*/
static int
-m_time(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+m_time(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
/* this is not rate limited, so end the grace period */
if(MyClient(source_p) && !IsFloodDone(source_p))
time_t lclock;
int minswest;
- lclock = CurrentTime;
+ lclock = rb_current_time();
gm = gmtime(&lclock);
memcpy((void *) &gmbuf, (void *) gm, sizeof(gmbuf));
gm = &gmbuf;
if(minswest < 0)
minswest = -minswest;
- rb_sprintf(buf, "%s %s %d %d -- %02u:%02u:%02u %c%02u:%02u",
+ sprintf(buf, "%s %s %d %d -- %02u:%02u:%02u %c%02u:%02u",
weekdays[lt->tm_wday], months[lt->tm_mon], lt->tm_mday,
lt->tm_year + 1900, lt->tm_hour, lt->tm_min, lt->tm_sec,
plus, minswest / 60, minswest % 60);