X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_vhost.cpp;h=82286748863fa716c572865986e873083a9e0583;hb=02c6ce1ad09a7471a6b03dc00bac4b843d157489;hp=f6f729058262ceafb93d1294b290a92e1ef326b5;hpb=7f9c6c5118261eac40d9bae22ac2c0ede670512d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index f6f729058..822867488 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -2,25 +2,19 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. - * E-mail: - * - * - * - * Written by Craig Edwards, Craig McLure, and others. + * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits + * * This program is free but copyrighted software; see * the file COPYING for details. * * --------------------------------------------------- */ -using namespace std; - -#include +#include "inspircd.h" #include "users.h" #include "channels.h" #include "modules.h" -#include "inspircd.h" /* $ModDesc: Provides masking of user hostnames via traditional /VHOST command */ @@ -46,7 +40,7 @@ class cmd_vhost : public command_t std::string pass = Conf->ReadValue("vhost","pass",index); if ((!strcmp(parameters[0],username.c_str())) && (!strcmp(parameters[1],pass.c_str()))) { - if (mask != "") + if (!mask.empty()) { user->WriteServ("NOTICE "+std::string(user->nick)+" :Setting your VHost: " + mask); user->ChangeDisplayedHost(mask.c_str()); @@ -66,7 +60,7 @@ class ModuleVHost : public Module cmd_vhost* mycommand; public: - ModuleVHost(InspIRCd* Me) : Module::Module(Me) + ModuleVHost(InspIRCd* Me) : Module(Me) { Conf = new ConfigReader(ServerInstance); @@ -84,7 +78,7 @@ class ModuleVHost : public Module List[I_OnRehash] = 1; } - virtual void OnRehash(const std::string ¶meter) + virtual void OnRehash(userrec* user, const std::string ¶meter) { DELETE(Conf); Conf = new ConfigReader(ServerInstance); @@ -118,7 +112,7 @@ class ModuleVHostFactory : public ModuleFactory }; -extern "C" void * init_module( void ) +extern "C" DllExport void * init_module( void ) { return new ModuleVHostFactory; }