summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-11 18:07:18 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-11 18:07:18 +0000
commit4f819960854d4e89c958b0ebacfcea692e152e09 (patch)
tree3956815a57f54edc9ef3aa95e9a4babe0a7a6dc0 /src
parent187ece1bab24da3e9fda31053aaa04c5e4c401f9 (diff)
Logic cleanup here too.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6976 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_chghost.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index d4047ad48..45eaaa378 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -52,17 +52,22 @@ class cmd_chghost : public command_t
return CMD_FAILURE;
}
userrec* dest = ServerInstance->FindNick(parameters[0]);
- if (dest)
+
+ if (!dest)
{
- if ((dest->ChangeDisplayedHost(parameters[1])) && (!ServerInstance->ULine(user->server)))
- {
- // fix by brain - ulines set hosts silently
- ServerInstance->WriteOpers(std::string(user->nick)+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->dhost);
- }
- return CMD_SUCCESS;
+ /* Drop it like a hot potato. XXX - we should probably message here.. -- w00t */
+ return CMD_FAILURE;
}
- return CMD_FAILURE;
+ if ((dest->ChangeDisplayedHost(parameters[1])) && (!ServerInstance->ULine(user->server)))
+ {
+ // fix by brain - ulines set hosts silently
+ ServerInstance->WriteOpers(std::string(user->nick)+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->dhost);
+ }
+
+ /* route it! */
+ return CMD_SUCCESS;
+
}
};