#include "inspircd.h"
+#include "modules/account.h"
class ModulePassForward : public Module
{
if (!user->MyClass->config->getString("password").empty())
return;
+ AccountExtItem* actext = GetAccountExtItem();
+ if (actext && actext->get(user))
+ {
+ // User is logged in already (probably via SASL) don't forward the password
+ return;
+ }
+
if (!nickrequired.empty())
{
/* Check if nick exists and its server is ulined */
}
std::string tmp;
- FormatStr(tmp,forwardmsg, user);
- user->WriteServ(tmp);
+ FormatStr(tmp, forwardmsg, user);
+ ServerInstance->Parser.ProcessBuffer(user, tmp);
tmp.clear();
FormatStr(tmp,forwardcmd, user);
- ServerInstance->Parser->ProcessBuffer(tmp,user);
+ ServerInstance->Parser.ProcessBuffer(user, tmp);
}
};