2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
5 * Copyright (C) 2006-2008 Robin Burchell <robin+git@viroteck.net>
6 * Copyright (C) 2006, 2008 Oliver Lupton <oliverlupton@gmail.com>
7 * Copyright (C) 2008 Pippijn van Steenhoven <pip88nl@gmail.com>
8 * Copyright (C) 2003-2008 Craig Edwards <craigedwards@brainbox.cc>
9 * Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
10 * Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
12 * This file is part of InspIRCd. InspIRCd is free software: you can
13 * redistribute it and/or modify it under the terms of the GNU General Public
14 * License as published by the Free Software Foundation, version 2.
16 * This program is distributed in the hope that it will be useful, but WITHOUT
17 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <http://www.gnu.org/licenses/>.
33 ChanModeReference ban(NULL, "ban");
34 ChanModeReference inviteonlymode(NULL, "inviteonly");
35 ChanModeReference keymode(NULL, "key");
36 ChanModeReference limitmode(NULL, "limit");
37 ChanModeReference secretmode(NULL, "secret");
38 ChanModeReference privatemode(NULL, "private");
39 UserModeReference invisiblemode(NULL, "invisible");
42 Channel::Channel(const std::string &cname, time_t ts)
43 : name(cname), age(ts), topicset(0)
45 if (!ServerInstance->chanlist.insert(std::make_pair(cname, this)).second)
46 throw CoreException("Cannot create duplicate channel " + cname);
49 void Channel::SetMode(ModeHandler* mh, bool on)
51 modes[mh->GetId()] = on;
54 void Channel::SetTopic(User* u, const std::string& ntopic)
56 this->topic.assign(ntopic, 0, ServerInstance->Config->Limits.MaxTopic);
57 this->setby.assign(ServerInstance->Config->FullHostInTopic ? u->GetFullHost() : u->nick, 0, 128);
58 this->WriteChannel(u, "TOPIC %s :%s", this->name.c_str(), this->topic.c_str());
59 this->topicset = ServerInstance->Time();
61 FOREACH_MOD(OnPostTopicChange, (u, this, this->topic));
64 Membership* Channel::AddUser(User* user)
66 Membership*& memb = userlist[user];
70 memb = new Membership(user, this);
74 void Channel::DelUser(User* user)
76 UserMembIter it = userlist.find(user);
77 if (it != userlist.end())
81 void Channel::CheckDestroy()
83 if (!userlist.empty())
87 FIRST_MOD_RESULT(OnChannelPreDelete, res, (this));
88 if (res == MOD_RES_DENY)
91 chan_hash::iterator iter = ServerInstance->chanlist.find(this->name);
93 if (iter != ServerInstance->chanlist.end())
95 FOREACH_MOD(OnChannelDelete, (this));
96 ServerInstance->chanlist.erase(iter);
100 ServerInstance->GlobalCulls.AddItem(this);
103 void Channel::DelUser(const UserMembIter& membiter)
105 Membership* memb = membiter->second;
108 userlist.erase(membiter);
110 // If this channel became empty then it should be removed
114 Membership* Channel::GetUser(User* user)
116 UserMembIter i = userlist.find(user);
117 if (i == userlist.end())
122 void Channel::SetDefaultModes()
124 ServerInstance->Logs->Log("CHANNELS", LOG_DEBUG, "SetDefaultModes %s",
125 ServerInstance->Config->DefaultModes.c_str());
126 irc::spacesepstream list(ServerInstance->Config->DefaultModes);
128 std::string parameter;
130 list.GetToken(modeseq);
132 for (std::string::iterator n = modeseq.begin(); n != modeseq.end(); ++n)
134 ModeHandler* mode = ServerInstance->Modes->FindMode(*n, MODETYPE_CHANNEL);
137 if (mode->IsPrefixMode())
140 if (mode->GetNumParams(true))
141 list.GetToken(parameter);
145 mode->OnModeChange(ServerInstance->FakeClient, ServerInstance->FakeClient, this, parameter, true);
151 * add a channel to a user, creating the record for it if needed and linking
152 * it to the user record
154 Channel* Channel::JoinUser(LocalUser* user, std::string cname, bool override, const std::string& key)
156 if (user->registered != REG_ALL)
158 ServerInstance->Logs->Log("CHANNELS", LOG_DEBUG, "Attempted to join unregistered user " + user->uuid + " to channel " + cname);
163 * We don't restrict the number of channels that remote users or users that are override-joining may be in.
164 * We restrict local users to MaxChans channels.
165 * We restrict local operators to OperMaxChans channels.
166 * This is a lot more logical than how it was formerly. -- w00t
170 if (user->HasPrivPermission("channels/high-join-limit"))
172 if (user->chans.size() >= ServerInstance->Config->OperMaxChans)
174 user->WriteNumeric(ERR_TOOMANYCHANNELS, "%s :You are on too many channels", cname.c_str());
180 unsigned int maxchans = user->GetClass()->maxchans;
182 maxchans = ServerInstance->Config->MaxChans;
183 if (user->chans.size() >= maxchans)
185 user->WriteNumeric(ERR_TOOMANYCHANNELS, "%s :You are on too many channels", cname.c_str());
191 // Crop channel name if it's too long
192 if (cname.length() > ServerInstance->Config->Limits.ChanMax)
193 cname.resize(ServerInstance->Config->Limits.ChanMax);
195 Channel* chan = ServerInstance->FindChan(cname);
196 bool created_by_local = (chan == NULL); // Flag that will be passed to modules in the OnUserJoin() hook later
197 std::string privs; // Prefix mode(letter)s to give to the joining user
201 privs = ServerInstance->Config->DefaultModes.substr(0, ServerInstance->Config->DefaultModes.find(' '));
203 if (override == false)
205 // Ask the modules whether they're ok with the join, pass NULL as Channel* as the channel is yet to be created
206 ModResult MOD_RESULT;
207 FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (user, NULL, cname, privs, key));
208 if (MOD_RESULT == MOD_RES_DENY)
209 return NULL; // A module wasn't happy with the join, abort
212 chan = new Channel(cname, ServerInstance->Time());
213 // Set the default modes on the channel (<options:defaultmodes>)
214 chan->SetDefaultModes();
218 /* Already on the channel */
219 if (chan->HasUser(user))
222 if (override == false)
224 ModResult MOD_RESULT;
225 FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (user, chan, cname, privs, key));
227 // A module explicitly denied the join and (hopefully) generated a message
228 // describing the situation, so we may stop here without sending anything
229 if (MOD_RESULT == MOD_RES_DENY)
232 // If no module returned MOD_RES_DENY or MOD_RES_ALLOW (which is the case
233 // most of the time) then proceed to check channel modes +k, +i, +l and bans,
235 // If a module explicitly allowed the join (by returning MOD_RES_ALLOW),
236 // then this entire section is skipped
237 if (MOD_RESULT == MOD_RES_PASSTHRU)
239 std::string ckey = chan->GetModeParameter(keymode);
240 bool invited = user->IsInvited(chan);
241 bool can_bypass = ServerInstance->Config->InvBypassModes && invited;
245 FIRST_MOD_RESULT(OnCheckKey, MOD_RESULT, (user, chan, key));
246 if (!MOD_RESULT.check((ckey == key) || can_bypass))
248 // If no key provided, or key is not the right one, and can't bypass +k (not invited or option not enabled)
249 user->WriteNumeric(ERR_BADCHANNELKEY, "%s :Cannot join channel (Incorrect channel key)", chan->name.c_str());
254 if (chan->IsModeSet(inviteonlymode))
256 FIRST_MOD_RESULT(OnCheckInvite, MOD_RESULT, (user, chan));
257 if (!MOD_RESULT.check(invited))
259 user->WriteNumeric(ERR_INVITEONLYCHAN, "%s :Cannot join channel (Invite only)", chan->name.c_str());
264 std::string limit = chan->GetModeParameter(limitmode);
267 FIRST_MOD_RESULT(OnCheckLimit, MOD_RESULT, (user, chan));
268 if (!MOD_RESULT.check((chan->GetUserCounter() < atol(limit.c_str()) || can_bypass)))
270 user->WriteNumeric(ERR_CHANNELISFULL, "%s :Cannot join channel (Channel is full)", chan->name.c_str());
275 if (chan->IsBanned(user) && !can_bypass)
277 user->WriteNumeric(ERR_BANNEDFROMCHAN, "%s :Cannot join channel (You're banned)", chan->name.c_str());
282 * If the user has invites for this channel, remove them now
283 * after a successful join so they don't build up.
287 user->RemoveInvite(chan);
293 // We figured that this join is allowed and also created the
294 // channel if it didn't exist before, now do the actual join
295 chan->ForceJoin(user, &privs, false, created_by_local);
299 void Channel::ForceJoin(User* user, const std::string* privs, bool bursting, bool created_by_local)
303 ServerInstance->Logs->Log("CHANNELS", LOG_DEBUG, "Attempted to join server user " + user->uuid + " to channel " + this->name);
307 Membership* memb = this->AddUser(user);
309 return; // Already on the channel
311 user->chans.push_front(memb);
315 // If the user was granted prefix modes (in the OnUserPreJoin hook, or he's a
316 // remote user and his own server set the modes), then set them internally now
317 for (std::string::const_iterator i = privs->begin(); i != privs->end(); ++i)
319 PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(*i);
322 std::string nick = user->nick;
323 // Set the mode on the user
324 mh->OnModeChange(ServerInstance->FakeClient, NULL, this, nick, true);
329 // Tell modules about this join, they have the chance now to populate except_list with users we won't send the JOIN (and possibly MODE) to
331 FOREACH_MOD(OnUserJoin, (memb, bursting, created_by_local, except_list));
333 this->WriteAllExcept(user, false, 0, except_list, "JOIN :%s", this->name.c_str());
335 /* Theyre not the first ones in here, make sure everyone else sees the modes we gave the user */
336 if ((GetUserCounter() > 1) && (!memb->modes.empty()))
338 std::string ms = memb->modes;
339 for(unsigned int i=0; i < memb->modes.length(); i++)
340 ms.append(" ").append(user->nick);
342 except_list.insert(user);
343 this->WriteAllExcept(user, !ServerInstance->Config->CycleHostsFromUser, 0, except_list, "MODE %s +%s", this->name.c_str(), ms.c_str());
350 user->WriteNumeric(RPL_TOPIC, "%s :%s", this->name.c_str(), this->topic.c_str());
351 user->WriteNumeric(RPL_TOPICTIME, "%s %s %lu", this->name.c_str(), this->setby.c_str(), (unsigned long)this->topicset);
353 this->UserList(user);
356 FOREACH_MOD(OnPostJoin, (memb));
359 bool Channel::IsBanned(User* user)
362 FIRST_MOD_RESULT(OnCheckChannelBan, result, (user, this));
364 if (result != MOD_RES_PASSTHRU)
365 return (result == MOD_RES_DENY);
367 ListModeBase* banlm = static_cast<ListModeBase*>(*ban);
368 const ListModeBase::ModeList* bans = banlm->GetList(this);
371 for (ListModeBase::ModeList::const_iterator it = bans->begin(); it != bans->end(); it++)
373 if (CheckBan(user, it->mask))
380 bool Channel::CheckBan(User* user, const std::string& mask)
383 FIRST_MOD_RESULT(OnCheckBan, result, (user, this, mask));
384 if (result != MOD_RES_PASSTHRU)
385 return (result == MOD_RES_DENY);
387 // extbans were handled above, if this is one it obviously didn't match
388 if ((mask.length() <= 2) || (mask[1] == ':'))
391 std::string::size_type at = mask.find('@');
392 if (at == std::string::npos)
395 const std::string nickIdent = user->nick + "!" + user->ident;
396 std::string prefix = mask.substr(0, at);
397 if (InspIRCd::Match(nickIdent, prefix, NULL))
399 std::string suffix = mask.substr(at + 1);
400 if (InspIRCd::Match(user->host, suffix, NULL) ||
401 InspIRCd::Match(user->dhost, suffix, NULL) ||
402 InspIRCd::MatchCIDR(user->GetIPString(), suffix, NULL))
408 ModResult Channel::GetExtBanStatus(User *user, char type)
411 FIRST_MOD_RESULT(OnExtBanCheck, rv, (user, this, type));
412 if (rv != MOD_RES_PASSTHRU)
415 ListModeBase* banlm = static_cast<ListModeBase*>(*ban);
416 const ListModeBase::ModeList* bans = banlm->GetList(this);
419 for (ListModeBase::ModeList::const_iterator it = bans->begin(); it != bans->end(); ++it)
421 if (CheckBan(user, it->mask))
425 return MOD_RES_PASSTHRU;
429 * Remove a channel from a users record, remove the reference to the Membership object
430 * from the channel and destroy it.
432 void Channel::PartUser(User *user, std::string &reason)
434 UserMembIter membiter = userlist.find(user);
436 if (membiter != userlist.end())
438 Membership* memb = membiter->second;
440 FOREACH_MOD(OnUserPart, (memb, reason, except_list));
442 WriteAllExcept(user, false, 0, except_list, "PART %s%s%s", this->name.c_str(), reason.empty() ? "" : " :", reason.c_str());
444 // Remove this channel from the user's chanlist
445 user->chans.erase(memb);
446 // Remove the Membership from this channel's userlist and destroy it
447 this->DelUser(membiter);
451 void Channel::KickUser(User* src, User* victim, const std::string& reason, Membership* srcmemb)
453 UserMembIter victimiter = userlist.find(victim);
454 Membership* memb = ((victimiter != userlist.end()) ? victimiter->second : NULL);
458 src->WriteNumeric(ERR_USERNOTINCHANNEL, "%s %s :They are not on that channel", victim->nick.c_str(), this->name.c_str());
462 // Do the following checks only if the KICK is done by a local user;
463 // each server enforces its own rules.
466 // Modules are allowed to explicitly allow or deny kicks done by local users
468 FIRST_MOD_RESULT(OnUserPreKick, res, (src,memb,reason));
469 if (res == MOD_RES_DENY)
472 if (res == MOD_RES_PASSTHRU)
475 srcmemb = GetUser(src);
476 unsigned int them = srcmemb ? srcmemb->getRank() : 0;
477 unsigned int req = HALFOP_VALUE;
478 for (std::string::size_type i = 0; i < memb->modes.length(); i++)
480 ModeHandler* mh = ServerInstance->Modes->FindMode(memb->modes[i], MODETYPE_CHANNEL);
481 if (mh && mh->GetLevelRequired() > req)
482 req = mh->GetLevelRequired();
487 src->WriteNumeric(ERR_CHANOPRIVSNEEDED, "%s :You must be a channel %soperator",
488 this->name.c_str(), req > HALFOP_VALUE ? "" : "half-");
495 FOREACH_MOD(OnUserKick, (src, memb, reason, except_list));
497 WriteAllExcept(src, false, 0, except_list, "KICK %s %s :%s", name.c_str(), victim->nick.c_str(), reason.c_str());
499 victim->chans.erase(memb);
500 this->DelUser(victimiter);
503 void Channel::WriteChannel(User* user, const char* text, ...)
505 std::string textbuffer;
506 VAFORMAT(textbuffer, text, text);
507 this->WriteChannel(user, textbuffer);
510 void Channel::WriteChannel(User* user, const std::string &text)
512 const std::string message = ":" + user->GetFullHost() + " " + text;
514 for (UserMembIter i = userlist.begin(); i != userlist.end(); i++)
516 if (IS_LOCAL(i->first))
517 i->first->Write(message);
521 void Channel::WriteChannelWithServ(const std::string& ServName, const char* text, ...)
523 std::string textbuffer;
524 VAFORMAT(textbuffer, text, text);
525 this->WriteChannelWithServ(ServName, textbuffer);
528 void Channel::WriteChannelWithServ(const std::string& ServName, const std::string &text)
530 const std::string message = ":" + (ServName.empty() ? ServerInstance->Config->ServerName : ServName) + " " + text;
532 for (UserMembIter i = userlist.begin(); i != userlist.end(); i++)
534 if (IS_LOCAL(i->first))
535 i->first->Write(message);
539 /* write formatted text from a source user to all users on a channel except
540 * for the sender (for privmsg etc) */
541 void Channel::WriteAllExceptSender(User* user, bool serversource, char status, const char* text, ...)
543 std::string textbuffer;
544 VAFORMAT(textbuffer, text, text);
545 this->WriteAllExceptSender(user, serversource, status, textbuffer);
548 void Channel::WriteAllExcept(User* user, bool serversource, char status, CUList &except_list, const char* text, ...)
550 std::string textbuffer;
551 VAFORMAT(textbuffer, text, text);
552 textbuffer = ":" + (serversource ? ServerInstance->Config->ServerName : user->GetFullHost()) + " " + textbuffer;
553 this->RawWriteAllExcept(user, serversource, status, except_list, textbuffer);
556 void Channel::WriteAllExcept(User* user, bool serversource, char status, CUList &except_list, const std::string &text)
558 const std::string message = ":" + (serversource ? ServerInstance->Config->ServerName : user->GetFullHost()) + " " + text;
559 this->RawWriteAllExcept(user, serversource, status, except_list, message);
562 void Channel::RawWriteAllExcept(User* user, bool serversource, char status, CUList &except_list, const std::string &out)
564 unsigned int minrank = 0;
567 PrefixMode* mh = ServerInstance->Modes->FindPrefix(status);
569 minrank = mh->GetPrefixRank();
571 for (UserMembIter i = userlist.begin(); i != userlist.end(); i++)
573 if (IS_LOCAL(i->first) && (except_list.find(i->first) == except_list.end()))
575 /* User doesn't have the status we're after */
576 if (minrank && i->second->getRank() < minrank)
579 i->first->Write(out);
584 void Channel::WriteAllExceptSender(User* user, bool serversource, char status, const std::string& text)
587 except_list.insert(user);
588 this->WriteAllExcept(user, serversource, status, except_list, std::string(text));
591 const char* Channel::ChanModes(bool showkey)
593 static std::string scratch;
598 /* This was still iterating up to 190, Channel::modes is only 64 elements -- Om */
599 for(int n = 0; n < 64; n++)
601 ModeHandler* mh = ServerInstance->Modes->FindMode(n + 65, MODETYPE_CHANNEL);
602 if (mh && IsModeSet(mh))
604 scratch.push_back(n + 65);
606 ParamModeBase* pm = mh->IsParameterMode();
610 if (n == 'k' - 65 && !showkey)
617 pm->GetParameter(this, sparam);
623 return scratch.c_str();
626 /* compile a userlist of a channel into a string, each nick seperated by
627 * spaces and op, voice etc status shown as @ and +, and send it to 'user'
629 void Channel::UserList(User *user)
631 bool has_privs = user->HasPrivPermission("channels/auspex");
632 if (this->IsModeSet(secretmode) && !this->HasUser(user) && !has_privs)
634 user->WriteNumeric(ERR_NOSUCHNICK, "%s :No such nick/channel", this->name.c_str());
639 list.push_back(this->IsModeSet(secretmode) ? '@' : this->IsModeSet(privatemode) ? '*' : '=');
641 list.append(this->name).append(" :");
642 std::string::size_type pos = list.size();
644 bool has_one = false;
646 /* Improvement by Brain - this doesnt change in value, so why was it inside
649 bool has_user = this->HasUser(user);
651 const size_t maxlen = ServerInstance->Config->Limits.MaxLine - 10 - ServerInstance->Config->ServerName.size();
652 std::string prefixlist;
654 for (UserMembIter i = userlist.begin(); i != userlist.end(); ++i)
656 if ((!has_user) && (i->first->IsModeSet(invisiblemode)) && (!has_privs))
659 * user is +i, and source not on the channel, does not show
665 Membership* memb = i->second;
668 char prefix = memb->GetPrefixChar();
670 prefixlist.push_back(prefix);
671 nick = i->first->nick;
673 FOREACH_MOD(OnNamesListItem, (user, memb, prefixlist, nick));
675 /* Nick was nuked, a module wants us to skip it */
679 if (list.size() + prefixlist.length() + nick.length() + 1 > maxlen)
681 /* list overflowed into multiple numerics */
682 user->WriteNumeric(RPL_NAMREPLY, list);
684 // Erase all nicks, keep the constant part
689 list.append(prefixlist).append(nick).push_back(' ');
694 /* if whats left in the list isnt empty, send it */
697 user->WriteNumeric(RPL_NAMREPLY, list);
700 user->WriteNumeric(RPL_ENDOFNAMES, "%s :End of /NAMES list.", this->name.c_str());
703 /* returns the status character for a given user on a channel, e.g. @ for op,
704 * % for halfop etc. If the user has several modes set, the highest mode
705 * the user has must be returned.
707 char Membership::GetPrefixChar() const
710 unsigned int bestrank = 0;
712 for (std::string::const_iterator i = modes.begin(); i != modes.end(); ++i)
714 PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(*i);
715 if (mh && mh->GetPrefixRank() > bestrank && mh->GetPrefix())
717 bestrank = mh->GetPrefixRank();
718 pf = mh->GetPrefix();
724 unsigned int Membership::getRank()
726 char mchar = modes.c_str()[0];
730 PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(mchar);
732 rv = mh->GetPrefixRank();
737 const char* Membership::GetAllPrefixChars() const
739 static char prefix[64];
742 for (std::string::const_iterator i = modes.begin(); i != modes.end(); ++i)
744 PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(*i);
745 if (mh && mh->GetPrefix())
746 prefix[ctr++] = mh->GetPrefix();
753 unsigned int Channel::GetPrefixValue(User* user)
755 UserMembIter m = userlist.find(user);
756 if (m == userlist.end())
758 return m->second->getRank();
761 bool Membership::SetPrefix(PrefixMode* delta_mh, bool adding)
763 char prefix = delta_mh->GetModeChar();
764 for (unsigned int i = 0; i < modes.length(); i++)
766 char mchar = modes[i];
767 PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(mchar);
768 if (mh && mh->GetPrefixRank() <= delta_mh->GetPrefixRank())
770 modes = modes.substr(0,i) +
771 (adding ? std::string(1, prefix) : "") +
772 modes.substr(mchar == prefix ? i+1 : i);
773 return adding != (mchar == prefix);
777 modes.push_back(prefix);
781 void Invitation::Create(Channel* c, LocalUser* u, time_t timeout)
783 if ((timeout != 0) && (ServerInstance->Time() >= timeout))
784 // Expired, don't bother
787 ServerInstance->Logs->Log("INVITATION", LOG_DEBUG, "Invitation::Create chan=%s user=%s", c->name.c_str(), u->uuid.c_str());
789 Invitation* inv = Invitation::Find(c, u, false);
792 if ((inv->expiry == 0) || (inv->expiry > timeout))
794 inv->expiry = timeout;
795 ServerInstance->Logs->Log("INVITATION", LOG_DEBUG, "Invitation::Create changed expiry in existing invitation %p", (void*) inv);
799 inv = new Invitation(c, u, timeout);
800 c->invites.push_front(inv);
801 u->invites.push_front(inv);
802 ServerInstance->Logs->Log("INVITATION", LOG_DEBUG, "Invitation::Create created new invitation %p", (void*) inv);
806 Invitation* Invitation::Find(Channel* c, LocalUser* u, bool check_expired)
808 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);
809 if (!u || u->invites.empty())
812 Invitation* result = NULL;
813 for (InviteList::iterator i = u->invites.begin(); i != u->invites.end(); )
815 Invitation* inv = *i;
818 if ((check_expired) && (inv->expiry != 0) && (inv->expiry <= ServerInstance->Time()))
820 /* Expired invite, remove it. */
821 std::string expiration = InspIRCd::TimeString(inv->expiry);
822 ServerInstance->Logs->Log("INVITATION", LOG_DEBUG, "Invitation::Find ecountered expired entry: %p expired %s", (void*) inv, expiration.c_str());
827 /* Is it what we're searching for? */
836 ServerInstance->Logs->Log("INVITATION", LOG_DEBUG, "Invitation::Find result=%p", (void*) result);
840 Invitation::~Invitation()
842 // Remove this entry from both lists
843 chan->invites.erase(this);
844 user->invites.erase(this);
845 ServerInstance->Logs->Log("INVITEBASE", LOG_DEBUG, "Invitation::~ %p", (void*) this);