X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sqloper.cpp;h=ae581cc4b61e3b36a98962291c41243545ff77f9;hb=2550d001423d25b50c7bfdc89f6efe81dbb64612;hp=bded0ea04e9f74785281158f9ab674f7e1b7fbf6;hpb=63732f37cba3d493954154c0f2440ddc88d7f207;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index bded0ea04..ae581cc4b 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -1,16 +1,22 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2010 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2009-2010 Daniel De Graaf * - * This program is free but copyrighted software; see - * the file COPYING for details. + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. * - * --------------------------------------------------- + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + #include "inspircd.h" #include "sql.h" #include "hash.h" @@ -113,7 +119,7 @@ class OpMeQuery : public SQLQuery hostname.append("@").append(user->host); - if (OneOfMatches(hostname.c_str(), user->GetIPString(), pattern.c_str())) + if (OneOfMatches(hostname.c_str(), user->GetIPString(), pattern)) { /* Opertype and host match, looks like this is it. */ @@ -139,7 +145,7 @@ public: OnRehash(NULL); Implementation eventlist[] = { I_OnRehash, I_OnPreCommand }; - ServerInstance->Modules->Attach(eventlist, this, 2); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user)