From b22091e8fa3e2eeb67a14f7ce56b8b91fb4b0059 Mon Sep 17 00:00:00 2001 From: jantje_85 Date: Sat, 3 Oct 2009 13:47:15 +0000 Subject: [PATCH] Fixed TIME on InspIRCd 1.2. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2528 5417fbe8-f217-4b02-8779-1006273d7864 --- src/protocol/inspircd12.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index 5066d77dd..72a64770f 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -955,6 +955,18 @@ int anope_event_ping(const char *source, int ac, const char **av) return MOD_CONT; } +int anope_event_time(const char *source, int ac, const char **av) +{ + if (ac !=2) + return MOD_CONT; + + send_cmd(TS6SID, "TIME %s %s %ld", source, av[1], static_cast(time(NULL))); + + /* We handled it, don't pass it on to the core.. + * The core doesn't understand our syntax anyways.. ~ Viper */ + return MOD_STOP; +} + int anope_event_436(const char *source, int ac, const char **av) { m_nickcoll(av[0]); @@ -1449,6 +1461,7 @@ void moduleAddIRCDMsgs() { m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m); m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m); m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m); + m = createMessage("TIME", anope_event_time); addCoreMessage(IRCD,m); m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m); m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m); m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);