summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-01 18:00:17 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-13 15:34:11 +0200
commitd71b6a8b273ae6efc823ffe79130e6a85b6a1534 (patch)
tree887827c70168b74321b030b573eb5887d3d8d38b /src/commands
parent551d687ec6d7ce44be35fae0dd7345fe73c4f63a (diff)
Remove the deprecated invite API
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/cmd_invite.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/commands/cmd_invite.cpp b/src/commands/cmd_invite.cpp
index 11cb549af..6e5aead12 100644
--- a/src/commands/cmd_invite.cpp
+++ b/src/commands/cmd_invite.cpp
@@ -107,9 +107,14 @@ CmdResult CommandInvite::Handle (const std::vector<std::string>& parameters, Use
}
if (IS_LOCAL(u))
- IS_LOCAL(u)->InviteTo(c->name.c_str(), timeout);
- u->WriteFrom(user,"INVITE %s :%s",u->nick.c_str(),c->name.c_str());
- user->WriteNumeric(RPL_INVITING, "%s %s %s",user->nick.c_str(),u->nick.c_str(),c->name.c_str());
+ {
+ Invitation::Create(c, IS_LOCAL(u), timeout);
+ u->WriteFrom(user,"INVITE %s :%s",u->nick.c_str(),c->name.c_str());
+ }
+
+ if (IS_LOCAL(user))
+ user->WriteNumeric(RPL_INVITING, "%s %s %s",user->nick.c_str(),u->nick.c_str(),c->name.c_str());
+
if (ServerInstance->Config->AnnounceInvites != ServerConfig::INVITE_ANNOUNCE_NONE)
{
char prefix;