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