diff options
author | jantje_85 <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-10-03 13:47:15 +0000 |
---|---|---|
committer | jantje_85 <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-10-03 13:47:15 +0000 |
commit | b22091e8fa3e2eeb67a14f7ce56b8b91fb4b0059 (patch) | |
tree | d800712460112c172d74db259aa0c71e7dd02871 /src | |
parent | 651aacd3e9f625871981924556639f1cecdc85af (diff) |
Fixed TIME on InspIRCd 1.2.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2528 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/protocol/inspircd12.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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<long>(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); |