diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-04-01 18:00:17 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-04-13 15:34:11 +0200 |
commit | d71b6a8b273ae6efc823ffe79130e6a85b6a1534 (patch) | |
tree | 887827c70168b74321b030b573eb5887d3d8d38b /src/users.cpp | |
parent | 551d687ec6d7ce44be35fae0dd7345fe73c4f63a (diff) |
Remove the deprecated invite API
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/src/users.cpp b/src/users.cpp index fb7c46d6b..c53fb7853 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -332,40 +332,22 @@ const std::string& User::GetFullRealHost() return this->cached_fullrealhost; } -bool LocalUser::IsInvited(const irc::string &channel) -{ - Channel* chan = ServerInstance->FindChan(channel.c_str()); - if (!chan) - return false; - - return (Invitation::Find(chan, this) != NULL); -} - InviteList& LocalUser::GetInviteList() { RemoveExpiredInvites(); return invites; } -void LocalUser::InviteTo(const irc::string &channel, time_t invtimeout) -{ - Channel* chan = ServerInstance->FindChan(channel.c_str()); - if (chan) - Invitation::Create(chan, this, invtimeout); -} - -void LocalUser::RemoveInvite(const irc::string &channel) +bool LocalUser::RemoveInvite(Channel* chan) { - Channel* chan = ServerInstance->FindChan(channel.c_str()); - if (chan) + Invitation* inv = Invitation::Find(chan, this); + if (inv) { - Invitation* inv = Invitation::Find(chan, this); - if (inv) - { - inv->cull(); - delete inv; - } + inv->cull(); + delete inv; + return true; } + return false; } void LocalUser::RemoveExpiredInvites() |