summaryrefslogtreecommitdiff
path: root/src/channels.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/channels.cpp')
-rw-r--r--src/channels.cpp66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 58388bef5..6e3bc5e04 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -90,7 +90,6 @@ void Channel::CheckDestroy()
FOREACH_MOD(OnChannelDelete, (this));
ServerInstance->chanlist.erase(iter);
- ClearInvites();
ServerInstance->GlobalCulls.AddItem(this);
}
@@ -638,68 +637,3 @@ bool Membership::SetPrefix(PrefixMode* delta_mh, bool adding)
modes.push_back(prefix);
return adding;
}
-
-void Invitation::Create(Channel* c, LocalUser* u, time_t timeout)
-{
- if ((timeout != 0) && (ServerInstance->Time() >= timeout))
- // Expired, don't bother
- return;
-
- ServerInstance->Logs->Log("INVITATION", LOG_DEBUG, "Invitation::Create chan=%s user=%s", c->name.c_str(), u->uuid.c_str());
-
- Invitation* inv = Invitation::Find(c, u, false);
- if (inv)
- {
- if ((inv->expiry == 0) || (inv->expiry > timeout))
- return;
- inv->expiry = timeout;
- ServerInstance->Logs->Log("INVITATION", LOG_DEBUG, "Invitation::Create changed expiry in existing invitation %p", (void*) inv);
- }
- else
- {
- inv = new Invitation(c, u, timeout);
- c->invites.push_front(inv);
- u->invites.push_front(inv);
- ServerInstance->Logs->Log("INVITATION", LOG_DEBUG, "Invitation::Create created new invitation %p", (void*) inv);
- }
-}
-
-Invitation* Invitation::Find(Channel* c, LocalUser* u, bool check_expired)
-{
- ServerInstance->Logs->Log("INVITATION", LOG_DEBUG, "Invitation::Find chan=%s user=%s check_expired=%d", c ? c->name.c_str() : "NULL", u ? u->uuid.c_str() : "NULL", check_expired);
-
- Invitation* result = NULL;
- for (InviteList::iterator i = u->invites.begin(); i != u->invites.end(); )
- {
- Invitation* inv = *i;
- ++i;
-
- if ((check_expired) && (inv->expiry != 0) && (inv->expiry <= ServerInstance->Time()))
- {
- /* Expired invite, remove it. */
- std::string expiration = InspIRCd::TimeString(inv->expiry);
- ServerInstance->Logs->Log("INVITATION", LOG_DEBUG, "Invitation::Find ecountered expired entry: %p expired %s", (void*) inv, expiration.c_str());
- delete inv;
- }
- else
- {
- /* Is it what we're searching for? */
- if (inv->chan == c)
- {
- result = inv;
- break;
- }
- }
- }
-
- ServerInstance->Logs->Log("INVITATION", LOG_DEBUG, "Invitation::Find result=%p", (void*) result);
- return result;
-}
-
-Invitation::~Invitation()
-{
- // Remove this entry from both lists
- chan->invites.erase(this);
- user->invites.erase(this);
- ServerInstance->Logs->Log("INVITEBASE", LOG_DEBUG, "Invitation::~ %p", (void*) this);
-}