diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-06-03 19:01:28 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-06-03 19:01:28 +0000 |
commit | 9abdb4e2e96b7b7699ce3ec66633bcc8f14e025d (patch) | |
tree | bb1f508aad9455d89f332c96ed606a770debee77 /src/protocol/inspircd12.cpp | |
parent | f43f6c386431dfc2e7668916b4582a98c18ca6c3 (diff) |
Added inspircd2.0 protocol module, moved usermode +r unsetting on nick change to the protocol modules to fix inspircd1.2s weird usermode +r behavior
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2997 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/inspircd12.cpp')
-rw-r--r-- | src/protocol/inspircd12.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index d76da332d..7f3f4f10c 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -34,7 +34,7 @@ int inet_aton(const char *name, struct in_addr *addr) #endif IRCDVar myIrcd[] = { - {"InspIRCd 1.2 & 2.0", /* ircd name */ + {"InspIRCd 1.2", /* ircd name */ "+I", /* Modes used by pseudoclients */ 5, /* Chan Max Symbols */ "+ao", /* Channel Umode used by Botserv bots */ @@ -60,7 +60,6 @@ IRCDVar myIrcd[] = { 1, /* UMODE */ 1, /* VHOST ON NICK */ 0, /* Change RealName */ - 0, 1, /* No Knock requires +i */ 0, /* We support inspircd TOKENS */ 0, /* TIME STAMPS are BASE64 */ @@ -1386,7 +1385,7 @@ class ProtoInspIRCd : public Module if (Config.Numeric) TS6SID = sstrdup(Config.Numeric); - pmodule_ircd_version("InspIRCd 1.2 & 2.0"); + pmodule_ircd_version("InspIRCd 1.2"); pmodule_ircd_var(myIrcd); pmodule_ircd_useTSMode(0); @@ -1396,12 +1395,22 @@ class ProtoInspIRCd : public Module pmodule_ircd_proto(&ircd_proto); moduleAddIRCDMsgs(); + + ModuleManager::Attach(I_OnUserNickChange, this); } ~ProtoInspIRCd() { delete [] TS6SID; } + + void OnUserNickChange(User *u, const std::string &) + { + /* InspIRCd 1.2 doesn't set -r on nick change, remove -r here. Note that if we have to set +r later + * this will cancel out this -r, resulting in no mode changes. + */ + u->RemoveMode(findbot(Config.s_NickServ), UMODE_REGISTERED); + } }; MODULE_INIT(ProtoInspIRCd) |