*/
#include "inspircd.h"
+#include "account.h"
/* $ModDesc: Povides support for ircu-style services accounts, including chmode +R, etc. */
public:
AChannel_R(InspIRCd* Instance) : ModeHandler(Instance, 'R', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool)
{
if (adding)
{
public:
AUser_R(InspIRCd* Instance) : ModeHandler(Instance, 'R', 0, 0, false, MODETYPE_USER, false) { }
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool)
{
if (adding)
{
public:
AChannel_M(InspIRCd* Instance) : ModeHandler(Instance, 'M', 0, 0, false, MODETYPE_CHANNEL, false) { }
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool)
{
if (adding)
{
// remove any accidental leading/trailing spaces
trim(*text);
dest->Extend("accountname", text);
+
+ if (IS_LOCAL(dest))
+ dest->WriteServ("900 %s %s %s :You are now logged in as %s", dest->nick, dest->GetFullHost(), text->c_str(), text->c_str());
+
+ AccountData ac;
+ ac.user = dest;
+ ac.account = *text;
+ Event n((char*)&ac, this, "account_login");
+ n.Send(ServerInstance);
}
}
}