ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
{
// only a u-lined server may add or remove the +r mode.
- if (IS_REMOTE(source) || ServerInstance->ULine(source->nick.c_str()) || ServerInstance->ULine(source->server))
+ if (!IS_LOCAL(source) || ServerInstance->ULine(source->nick.c_str()) || ServerInstance->ULine(source->server))
{
// Only change the mode if it's not redundant
if ((adding && !channel->IsModeSet('r')) || (!adding && channel->IsModeSet('r')))
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
{
- if (IS_REMOTE(source) || ServerInstance->ULine(source->nick.c_str()) || ServerInstance->ULine(source->server))
+ if (!IS_LOCAL(source) || ServerInstance->ULine(source->nick.c_str()) || ServerInstance->ULine(source->server))
{
if ((adding && !dest->IsModeSet('r')) || (!adding && dest->IsModeSet('r')))
{
AUser_R m3;
Channel_r m4;
User_r m5;
- StringExtItem accountname;
+ AccountExtItem accountname;
public:
ModuleServicesAccount() : m1(this), m2(this), m3(this), m4(this), m5(this),
accountname("accountname", this)
!ServerInstance->Modes->AddMode(&m5))
throw ModuleException("Some other module has claimed our modes!");
- Extensible::Register(&accountname);
+ ServerInstance->Extensions.Register(&accountname);
Implementation eventlist[] = { I_OnWhois, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreJoin, I_OnCheckBan,
- I_OnSyncUser, I_OnUserQuit, I_OnDecodeMetaData, I_On005Numeric, I_OnUserPostNick };
+ I_OnDecodeMetaData, I_On005Numeric, I_OnUserPostNick };
- ServerInstance->Modules->Attach(eventlist, this, 10);
+ ServerInstance->Modules->Attach(eventlist, this, 8);
}
void On005Numeric(std::string &t)
Version GetVersion()
{
- return Version("Povides support for ircu-style services accounts, including chmode +R, etc.",VF_COMMON|VF_VENDOR,API_VERSION);
+ return Version("Povides support for ircu-style services accounts, including chmode +R, etc.",VF_COMMON|VF_VENDOR);
}
};