summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_chghost.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index c327d27b3..763bb2f26 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -60,10 +60,16 @@ class CommandChghost : public Command
return CMD_FAILURE;
}
- if ((dest->ChangeDisplayedHost(parameters[1].c_str())) && (!ServerInstance->ULine(user->server)))
+ if (IS_LOCAL(dest))
{
- // fix by brain - ulines set hosts silently
- ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->dhost);
+ if ((dest->ChangeDisplayedHost(parameters[1].c_str())) && (!ServerInstance->ULine(user->server)))
+ {
+ // fix by brain - ulines set hosts silently
+ ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->dhost);
+ }
+
+ /* ChangeDisplayedHost fixes it for us */
+ return CMD_LOCALONLY;
}
/* route it! */