mirror of
https://github.com/anope/anope.git
synced 2026-07-01 08:36:39 +02:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user