summaryrefslogtreecommitdiff
path: root/src/modules/m_chgident.cpp
diff options
context:
space:
mode:
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