From 396c9ef9f7a96934d3227bb7d1d091315e3d4fa8 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 10 Aug 2006 14:43:29 +0000 Subject: FindNick, FindChan, ChanModes, UserList, CountInvisible, PurgeEmptyChannels, GetClass, WriteOpers, GetServerDescription -> into classes ServerConfig takes InspIRCd pointer in its constructor git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4832 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_chgident.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/modules/m_chgident.cpp') diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp index 7cb09127a..391f4b20b 100644 --- a/src/modules/m_chgident.cpp +++ b/src/modules/m_chgident.cpp @@ -3,9 +3,12 @@ #include "modules.h" #include "message.h" #include "helperfuncs.h" +#include "inspircd.h" /* $ModDesc: Provides support for the CHGIDENT command */ +extern InspIRCd* ServerInstance; + class cmd_chgident : public command_t { Server* Srv; @@ -19,8 +22,8 @@ class cmd_chgident : public command_t void Handle(const char** parameters, int pcnt, userrec *user) { - userrec* dest = Srv->FindNick(std::string(parameters[0])); - + userrec* dest = ServerInstance->FindNick(parameters[0]); + if(dest) { if(!isident(parameters[1])) @@ -29,7 +32,7 @@ class cmd_chgident : public command_t return; } - WriteOpers("%s used CHGIDENT to change %s's ident from '%s' to '%s'", user->nick, dest->nick, dest->ident, parameters[1]); + ServerInstance->WriteOpers("%s used CHGIDENT to change %s's ident from '%s' to '%s'", user->nick, dest->nick, dest->ident, parameters[1]); strlcpy(dest->ident, parameters[1], IDENTMAX+2); } else -- cgit v1.2.3