summaryrefslogtreecommitdiff
path: root/src/coremods
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-01-03 16:06:53 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-01-03 16:06:53 +0100
commitc512716c8e4b4c6bbe98bbe5df62959cc6b6fec3 (patch)
tree4eed34f90237f054264f2fbfeaea6a64cbe1a02d /src/coremods
parent3ccf0065d43db80f31c6404aeac4d65551481508 (diff)
cmd_invite Send RPL_AWAY after RPL_INVITING if the target user is away
This is consistent with other server implementations and the RFC
Diffstat (limited to 'src/coremods')
-rw-r--r--src/coremods/core_channel/cmd_invite.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/coremods/core_channel/cmd_invite.cpp b/src/coremods/core_channel/cmd_invite.cpp
index ea4692d04..7bf669b29 100644
--- a/src/coremods/core_channel/cmd_invite.cpp
+++ b/src/coremods/core_channel/cmd_invite.cpp
@@ -114,7 +114,11 @@ CmdResult CommandInvite::Handle (const std::vector<std::string>& parameters, Use
}
if (IS_LOCAL(user))
+ {
user->WriteNumeric(RPL_INVITING, "%s %s", u->nick.c_str(),c->name.c_str());
+ if (u->IsAway())
+ user->WriteNumeric(RPL_AWAY, "%s :%s", u->nick.c_str(), u->awaymsg.c_str());
+ }
if (ServerInstance->Config->AnnounceInvites != ServerConfig::INVITE_ANNOUNCE_NONE)
{