// only a u-lined server may add or remove the +r mode.
if ((ServerInstance->ULine(source->nick.c_str())) || (ServerInstance->ULine(source->server)) || (!*source->server || (source->nick.find('.') != std::string::npos)))
{
- channel->SetMode('r',adding);
- return MODEACTION_ALLOW;
+ // Only change the mode if it's not redundant
+ if ((adding && !channel->IsModeSet('r')) || (!adding && channel->IsModeSet('r')))
+ {
+ channel->SetMode('r',adding);
+ return MODEACTION_ALLOW;
+ }
+
+ return MODEACTION_DENY;
}
else
{
if (!ServerInstance->Modes->AddMode(m1) || !ServerInstance->Modes->AddMode(m2) || !ServerInstance->Modes->AddMode(m3)
|| !ServerInstance->Modes->AddMode(m4) || !ServerInstance->Modes->AddMode(m5))
{
- throw ModuleException("Could not add user and channel modes!");
+ throw ModuleException("You cannot load m_services.so and m_services_account.so at the same time (or some other module has claimed our modes)!");
}
kludgeme = false;
virtual Version GetVersion()
{
- return Version(1,2,0,0,VF_COMMON|VF_VENDOR,API_VERSION);
+ return Version("$Id$",VF_COMMON|VF_VENDOR,API_VERSION);
}
};