summaryrefslogtreecommitdiff
path: root/src/modules/m_chgident.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 14:43:29 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 14:43:29 +0000
commit396c9ef9f7a96934d3227bb7d1d091315e3d4fa8 (patch)
treeb775fca47b8536d7e3c5df17480dbf4cca9f6ded /src/modules/m_chgident.cpp
parente80c54a965b1e11cc9da573a3e352a243e0ec9f8 (diff)
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
Diffstat (limited to 'src/modules/m_chgident.cpp')
-rw-r--r--src/modules/m_chgident.cpp9
1 files changed, 6 insertions, 3 deletions
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