diff options
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) |