mirror of
https://github.com/anope/anope.git
synced 2026-07-01 08:56:37 +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:
@@ -43,7 +43,6 @@ IRCDVar myIrcd[] = {
|
||||
1, /* UMODE */
|
||||
0, /* VHOST ON NICK */
|
||||
0, /* Change RealName */
|
||||
1,
|
||||
1, /* No Knock requires +i */
|
||||
0, /* We support TOKENS */
|
||||
0, /* TIME STAMPS are BASE64 */
|
||||
@@ -828,8 +827,14 @@ class ProtoBahamut : public Module
|
||||
moduleAddModes();
|
||||
|
||||
pmodule_ircd_proto(&ircd_proto);
|
||||
|
||||
ModuleManager::Attach(I_OnUserNickChange, this);
|
||||
}
|
||||
|
||||
void OnUserNickChange(User *u, const std::string &)
|
||||
{
|
||||
u->RemoveModeInternal(ModeManager::FindUserModeByName(UMODE_REGISTERED));
|
||||
}
|
||||
};
|
||||
|
||||
MODULE_INIT(ProtoBahamut)
|
||||
|
||||
@@ -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 */
|
||||
@@ -325,6 +324,8 @@ class InspIRCdProto : public IRCDProto
|
||||
|
||||
u->Account()->Shrink("authenticationtoken");
|
||||
u->Account()->Extend("authenticationtoken", new ExtensibleItemPointerArray<char>(sstrdup(svidbuf)));
|
||||
|
||||
u->SetMode(findbot(Config.s_NickServ), UMODE_REGISTERED);
|
||||
}
|
||||
|
||||
} ircd_proto;
|
||||
@@ -1182,6 +1183,13 @@ class ProtoInspIRCd : public Module
|
||||
|
||||
pmodule_ircd_proto(&ircd_proto);
|
||||
moduleAddIRCDMsgs();
|
||||
|
||||
ModuleManager::Attach(I_OnUserNickChange, this);
|
||||
}
|
||||
|
||||
void OnUserNickChange(User *u, const std::string &)
|
||||
{
|
||||
u->RemoveModeInternal(ModeManager::FindUserModeByName(UMODE_REGISTERED));
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,6 @@ IRCDVar myIrcd[] = {
|
||||
0, /* O:LINE */
|
||||
0, /* VHOST ON NICK */
|
||||
0, /* Change RealName */
|
||||
1, /* On nick change check if they could be identified */
|
||||
0, /* No Knock requires +i */
|
||||
0, /* We support TOKENS */
|
||||
0, /* TIME STAMPS are BASE64 */
|
||||
@@ -849,7 +848,6 @@ void moduleAddModes()
|
||||
ModeManager::AddUserMode(new UserMode(UMODE_ADMIN, 'a'));
|
||||
ModeManager::AddUserMode(new UserMode(UMODE_INVIS, 'i'));
|
||||
ModeManager::AddUserMode(new UserMode(UMODE_OPER, 'o'));
|
||||
ModeManager::AddUserMode(new UserMode(UMODE_REGISTERED, 'r'));
|
||||
ModeManager::AddUserMode(new UserMode(UMODE_SNOMASK, 's'));
|
||||
ModeManager::AddUserMode(new UserMode(UMODE_WALLOPS, 'w'));
|
||||
|
||||
@@ -904,7 +902,6 @@ class ProtoRatbox : public Module
|
||||
{
|
||||
delete [] TS6SID;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
MODULE_INIT(ProtoRatbox)
|
||||
|
||||
@@ -43,7 +43,6 @@ IRCDVar myIrcd[] = {
|
||||
1, /* UMODE */
|
||||
1, /* VHOST ON NICK */
|
||||
1, /* Change RealName */
|
||||
1, /* On nick change check if they could be identified */
|
||||
1, /* No Knock requires +i */
|
||||
1, /* We support Unreal TOKENS */
|
||||
1, /* TIME STAMPS are BASE64 */
|
||||
@@ -1384,8 +1383,14 @@ class ProtoUnreal : public Module
|
||||
|
||||
pmodule_ircd_proto(&ircd_proto);
|
||||
moduleAddIRCDMsgs();
|
||||
}
|
||||
|
||||
ModuleManager::Attach(I_OnUserNickChange, this);
|
||||
}
|
||||
|
||||
void OnUserNickChange(User *u, const std::string &)
|
||||
{
|
||||
u->RemoveModeInternal(ModeManager::FindUserModeByName(UMODE_REGISTERED));
|
||||
}
|
||||
};
|
||||
|
||||
MODULE_INIT(ProtoUnreal)
|
||||
|
||||
Reference in New Issue
Block a user