diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-01-03 16:06:53 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-01-03 16:06:53 +0100 |
commit | c512716c8e4b4c6bbe98bbe5df62959cc6b6fec3 (patch) | |
tree | 4eed34f90237f054264f2fbfeaea6a64cbe1a02d /src | |
parent | 3ccf0065d43db80f31c6404aeac4d65551481508 (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')
-rw-r--r-- | src/coremods/core_channel/cmd_invite.cpp | 4 |
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) { |