X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_tline.cpp;h=bf3bd59c65a3c703b20558b7d76615a13f2ecead;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=78c90f68c3f571faaf441cef89863f07b30b69b3;hpb=cd712c40e1b352c05e7ae0f72e0a5e84cdf64323;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_tline.cpp b/src/modules/m_tline.cpp index 78c90f68c..bf3bd59c6 100644 --- a/src/modules/m_tline.cpp +++ b/src/modules/m_tline.cpp @@ -1,16 +1,23 @@ -/* +------------------------------------+ - * | 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) 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 */ @@ -42,7 +49,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,12 +73,11 @@ class ModuleTLine : public Module ModuleTLine() : cmd(this) { - ServerInstance->AddCommand(&cmd); } - - virtual ~ModuleTLine() + void init() { + ServerInstance->Modules->AddService(cmd); } virtual Version GetVersion() @@ -81,4 +87,3 @@ class ModuleTLine : public Module }; MODULE_INIT(ModuleTLine) -