diff options
| author | 2007-05-11 18:07:18 +0000 | |
|---|---|---|
| committer | 2007-05-11 18:07:18 +0000 | |
| commit | 4f819960854d4e89c958b0ebacfcea692e152e09 (patch) | |
| tree | 3956815a57f54edc9ef3aa95e9a4babe0a7a6dc0 /src/modules/m_chghost.cpp | |
| parent | Opers haven't been able to change the modes of others since 1.0. (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/modules/m_chghost.cpp')
| -rw-r--r-- | src/modules/m_chghost.cpp | 21 |
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; + } }; |
