From 46159caeed2d2636a7de8da38fe76165d4776fba Mon Sep 17 00:00:00 2001 From: om Date: Thu, 10 Aug 2006 16:08:50 +0000 Subject: Updates to new API git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4842 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_sqloper.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/modules') diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp index 2d26bd8fa..17188ed68 100644 --- a/src/modules/extra/m_sqloper.cpp +++ b/src/modules/extra/m_sqloper.cpp @@ -32,6 +32,7 @@ extern int MODCOUNT; extern std::vector modules; extern std::vector factory; +extern InspIRCd* ServerInstance; class ModuleSQLOper : public Module { @@ -179,7 +180,7 @@ public: */ user->WriteServ( "491 %s :Invalid oper credentials", user->nick); - WriteOpers("*** WARNING! Failed oper attempt by %s!%s@%s!", user->nick, user->ident, user->host); + ServerInstance->WriteOpers("*** WARNING! Failed oper attempt by %s!%s@%s!", user->nick, user->ident, user->host); log(DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: user, host or password did not match.", user->nick, user->ident, user->host); } } @@ -192,7 +193,7 @@ public: log(DEBUG, "Query failed: %s", res->error.Str()); user->WriteServ( "491 %s :Invalid oper credentials", user->nick); - WriteOpers("*** WARNING! Failed oper attempt by %s!%s@%s! (SQL query failed: %s)", user->nick, user->ident, user->host, res->error.Str()); + ServerInstance->WriteOpers("*** WARNING! Failed oper attempt by %s!%s@%s! (SQL query failed: %s)", user->nick, user->ident, user->host, res->error.Str()); log(DEFAULT,"OPER: Failed oper attempt by %s!%s@%s: user, host or password did not match.", user->nick, user->ident, user->host); } } @@ -232,7 +233,7 @@ public: if (operhost.size()) user->ChangeDisplayedHost(operhost.c_str()); - WriteOpers("*** %s (%s@%s) is now an IRC operator of type %s", user->nick, user->ident, user->host, type.c_str()); + ServerInstance->WriteOpers("*** %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]) -- cgit v1.2.3