diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 00:21:47 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-15 00:21:47 +0000 |
| commit | 2d07704bb6a0d2b474ed2471c0cb3ce497f40646 (patch) | |
| tree | 5028776612b72f7271c5782f6d5acc3a824badef /src | |
| parent | 83a7ad74808fef3dd606b94e9dd43a4f9c08c44a (diff) | |
Fix usermode parsing for InspIRCd 1.2
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1686 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
| -rw-r--r-- | src/protocol/inspircd12.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index d10da6392..aa446b65f 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -715,18 +715,21 @@ int anope_event_ftopic(const char *source, int ac, const char **av) int anope_event_mode(const char *source, int ac, const char **av) { - if (*av[0] == '#' || *av[0] == '&') { + if (*av[0] == '#' || *av[0] == '&') + { do_cmode(source, ac, av); - } else { + } + else + { /* InspIRCd lets opers change another users modes, we have to kludge this as it slightly breaks RFC1459 */ - if (!strcasecmp(source, av[0])) { - do_umode(source, ac, av); - } else { - do_umode(av[0], ac, av); - } + User *u = find_byuid(source); + User *u2 = find_byuid(av[0]); + + av[0] = u2->nick; + do_umode(u->nick, ac, av); } return MOD_CONT; } |
