/* ************************************************************************* ArmageTron -- Just another Tron Lightcycle Game in 3D. Copyright (C) 2000 Manuel Moos (manuel@moosnet.de) ************************************************************************** This program 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; either version 2 of the License, or (at your option) any later version. 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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *************************************************************************** */ #ifndef ArmageTron_VOTER_H #define ArmageTron_VOTER_H class ePlayerNetID; //class eVoteItem; #include "tSafePTR.h" #include "tList.h" #include "tString.h" #include "nNetObject.h" #include "nSpamProtection.h" // class identifying a voter; all players coming from the same IP share the same voter. class eVoter: public tReferencable< eVoter >, public tListMember { friend class eVoteItem; public: eVoter( const tString& IP ); ~eVoter(); void Spam( int user ); // trigger spam guard bool IsSpamming( int user ); // check if user has been found spamming void RemoveFromGame(); // remove from game static void KickMenu(); // activate player kick menu static void VotingMenu(); // activate voting menu ( you can vote about suggestions there ) static eVoter* GetVoter ( int ID, bool complain = false ); // find or create the voter for the specified ID static bool VotingPossible(); // returns whether voting is currently possible tString Name(int senderID = -1) const; // returns the name of the voter private: static eVoter* GetVoterFromIP( tString IP ); // find or create the voter for the specified IP const tString IP_; // IP address of voter static tList< eVoter > voters_; // list of all voters nSpamProtection votingSpam_; // spam control }; #endif // ArmageTron_VOTER_H