X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_tline.cpp;h=bf1476bb541a2810b1d82fecf5001af6fa4da5e6;hb=67de413cad88194972d55a8ff88464370890c5a9;hp=e39064ca7e2c7db9894fe6648ed6eb59870a8067;hpb=6d03943426dcce76ba66567a9b18425a5ebb4c0c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_tline.cpp b/src/modules/m_tline.cpp index e39064ca7..bf1476bb5 100644 --- a/src/modules/m_tline.cpp +++ b/src/modules/m_tline.cpp @@ -1,19 +1,24 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2007 Dennis Friis + * Copyright (C) 2006-2007 Craig Edwards * - * 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" -/* $ModDesc: Provides /tline command used to test who a mask matches */ +#include "inspircd.h" /** Handle /TLINE */ @@ -42,7 +47,7 @@ class CommandTline : public Command } else { - std::string host = std::string(u->second->ident) + "@" + u->second->GetIPString(); + std::string host = u->second->ident + "@" + u->second->GetIPString(); if (InspIRCd::MatchCIDR(host, parameters[0])) { n_matched++; @@ -66,19 +71,17 @@ class ModuleTLine : public Module ModuleTLine() : cmd(this) { - ServerInstance->AddCommand(&cmd); } - - virtual ~ModuleTLine() + void init() CXX11_OVERRIDE { + ServerInstance->Modules->AddService(cmd); } - virtual Version GetVersion() + Version GetVersion() CXX11_OVERRIDE { - return Version("Provides /tline command used to test who a mask matches", VF_VENDOR,API_VERSION); + return Version("Provides /tline command used to test who a mask matches", VF_VENDOR); } }; MODULE_INIT(ModuleTLine) -