X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fusers.h;h=6852b3fb92f9b0f3929968025688e9215b178dbd;hb=2cb47dd7920355b11edd664f7399ca69e0d5d0b4;hp=109644c87ad8ee3b5dd7f2f8b4b1790c97d4463b;hpb=76619990ad82501afc95d0c76f057a2841862de9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/users.h b/include/users.h index 109644c87..6852b3fb9 100644 --- a/include/users.h +++ b/include/users.h @@ -1,16 +1,27 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2010 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2007-2008 Robin Burchell + * Copyright (C) 2008 Thomas Stagner + * Copyright (C) 2003-2007 Craig Edwards + * Copyright (C) 2007 Burlex + * Copyright (C) 2007 Dennis Friis * - * This program is free but copyrighted software; see - * the file COPYING for details. + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. * - * --------------------------------------------------- + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + #ifndef USERS_H #define USERS_H @@ -18,6 +29,7 @@ #include "inspsocket.h" #include "dns.h" #include "mode.h" +#include "membership.h" /** connect class types */ @@ -724,14 +736,8 @@ class CoreExport UserIOHandler : public StreamSocket typedef unsigned int already_sent_t; -class CoreExport LocalUser : public User +class CoreExport LocalUser : public User, public InviteBase { - /** A list of channels the user has a pending invite to. - * Upon INVITE channels are added, and upon JOIN, the - * channels are removed from this list. - */ - InvitedList invites; - public: LocalUser(int fd, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server); CullResult cull(); @@ -819,7 +825,7 @@ class CoreExport LocalUser : public User /** Returns the list of channels this user has been invited to but has not yet joined. * @return A list of channels the user is invited to */ - InvitedList* GetInviteList(); + InviteList& GetInviteList(); /** Returns true if a user is invited to a channel. * @param channel A channel name to look up @@ -840,6 +846,8 @@ class CoreExport LocalUser : public User */ void RemoveInvite(const irc::string &channel); + void RemoveExpiredInvites(); + /** Returns true or false for if a user can execute a privilaged oper command. * This is done by looking up their oper type from User::oper, then referencing * this to their oper classes and checking the commands they can execute.