class ModuleSQLOper : public Module
{
- InspIRCd* Srv;
Module* SQLutils;
Module* HashModule;
std::string databaseid;
public:
ModuleSQLOper(InspIRCd* Me)
- : Module::Module(Me), Srv(Me)
+ : Module::Module(Me)
{
ServerInstance->UseInterface("SQLutils");
ServerInstance->UseInterface("SQL");
virtual void OnRehash(userrec* user, const std::string ¶meter)
{
- ConfigReader Conf(Srv);
+ ConfigReader Conf(ServerInstance);
databaseid = Conf.ReadValue("sqloper", "dbid", 0); /* Database ID of a database configured for the service provider module */
}
{
Module* target;
- target = Srv->FindFeature("SQL");
+ target = ServerInstance->FindFeature("SQL");
if (target)
{
bool OperUser(userrec* user, const std::string &username, const std::string &password, const std::string &pattern, const std::string &type)
{
- ConfigReader Conf(Srv);
+ ConfigReader Conf(ServerInstance);
for (int j = 0; j < Conf.Enumerate("type"); j++)
{
if (operhost.size())
user->ChangeDisplayedHost(operhost.c_str());
- Srv->SNO->WriteToSnoMask('o',"%s (%s@%s) is now an IRC operator of type %s", user->nick, user->ident, user->host, type.c_str());
+ ServerInstance->SNO->WriteToSnoMask('o',"%s (%s@%s) is now an IRC operator of type %s", user->nick, user->ident, user->host, type.c_str());
user->WriteServ("381 %s :You are now an IRC operator of type %s", user->nick, type.c_str());
if (!user->modes[UM_OPERATOR])