diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-12-16 23:50:19 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-12-16 23:50:19 +0000 |
commit | aad1a4ca8d8613042684ad5498dde2b87f44444b (patch) | |
tree | a51f574fb93d59301dd356da7b3f25e0e9667e07 /src | |
parent | c6e3324b302aa9ef4cf6bdf002719d8bf2908a0b (diff) |
Hopefully this fixes detecting if Unreal sends a TS at the end of the mode string and removing it, which keeps it from being passed to mode handler
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2708 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/protocol/unreal32.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c index a859582b2..fb52d3129 100644 --- a/src/protocol/unreal32.c +++ b/src/protocol/unreal32.c @@ -586,11 +586,6 @@ int anope_event_mode(const char *source, int ac, const char **av) if (ac < 2) return MOD_CONT; - /* When a server sends a mode string it is appended with a timestamp - * we don't need it - */ - if (findserver(servlist, source)) - --ac; if (*av[0] == '#' || *av[0] == '&') { do_cmode(source, ac, av); } else { @@ -599,6 +594,14 @@ int anope_event_mode(const char *source, int ac, const char **av) return MOD_CONT; } +/* This is used to strip the TS from the end of the mode stirng */ +int anope_event_gmode(const char *source, int ac, const char **av) +{ + if (findserver(servlist, source)) + --ac; + return anope_event_mode(source, ac, av); +} + /* Unreal sends USER modes with this */ /* umode2 @@ -983,7 +986,7 @@ void moduleAddIRCDMsgs() { m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m); m = createMessage(".", anope_event_kill); addCoreMessage(IRCD,m); m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m); - m = createMessage("G", anope_event_mode); addCoreMessage(IRCD,m); + m = createMessage("G", anope_event_gmode); addCoreMessage(IRCD,m); m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m); m = createMessage("F", anope_event_motd); addCoreMessage(IRCD,m); m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m); |