From 0605ba6ecbaa34b185674047e976773de8bf116a Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 28 Jan 2006 21:43:53 +0000 Subject: A few tweaks here and there git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2954 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_sqloper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp index 79a5aa74d..9a3800685 100644 --- a/src/modules/extra/m_sqloper.cpp +++ b/src/modules/extra/m_sqloper.cpp @@ -154,14 +154,16 @@ class ModuleSQLOper : public Module for (int j =0; j < Conf->Enumerate("type"); j++) { std::string TypeName = Conf->ReadValue("type","name",j); + Srv->Log(DEBUG,"Scanning opertype: "+TypeName); std::string pattern = std::string(user->ident) + "@" + std::string(user->host); if ((TypeName == rowresult->GetField("type")) && (Srv->MatchText(pattern,rowresult->GetField("hostname")))); { + Srv->Log(DEBUG,"Host and type match: "+TypeName+" "+rowresult->GetField("type")); /* found this oper's opertype */ std::string HostName = Conf->ReadValue("type","host",j); if (HostName != "") Srv->ChangeHost(user,HostName); - strlcpy(user->oper,TypeName.c_str(),NICKMAX); + strlcpy(user->oper,rowresult->GetField("type").c_str(),NICKMAX); WriteOpers("*** %s (%s@%s) is now an IRC operator of type %s",user->nick,user->ident,user->host,rowresult->GetField("type").c_str()); WriteServ(user->fd,"381 %s :You are now an IRC operator of type %s",user->nick,rowresult->GetField("type").c_str()); if (!strchr(user->modes,'o')) -- cgit v1.2.3