From c512716c8e4b4c6bbe98bbe5df62959cc6b6fec3 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 3 Jan 2015 16:06:53 +0100 Subject: cmd_invite Send RPL_AWAY after RPL_INVITING if the target user is away This is consistent with other server implementations and the RFC --- src/coremods/core_channel/cmd_invite.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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& 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) { -- cgit v1.2.3