]> jfr.im git - irc/gameservirc.git/blame - gameserv/aClient.h
Added a lot of functionality. Added player flags and save/load them in the players...
[irc/gameservirc.git] / gameserv / aClient.h
CommitLineData
85ce9d3e 1#ifndef ACLIENT_H
2#define ACLIENT_H
3
4#include <string.h>
5#include <iostream.h>
6#include "player.h"
7
8class Player; // forward declaration
9
9d057db5 10
85ce9d3e 11class aClient {
12
13 friend ostream &operator<<( ostream &output, const aClient &c);
14
15 public:
96f71fee 16 aClient(char *); // Constructor takes a char for the nick
17 aClient(const aClient &); // Copy constructor
18 aClient(); // Default constructor
19 ~aClient(); // Destructor
85ce9d3e 20
96f71fee 21 // Sets the client's player struct data to the same thing as another aClient's
22 // player struct data
85ce9d3e 23 void setData(const aClient *);
96f71fee 24
25 void setNick(char *n) { strcpy(nick, n);}; // Sets the client's nick
26 char *getNick() { return nick; }; // Returns the client's nick
27 Player *stats; // Pointer to the client's player struct
28
29 long int getFlags() { return flags; }; // Returns the Client's current flags
30
31 // Functions also return the flags after modifying them
32 long int setFlags(long int); // Sets the clients flags to a new value
33 long int addFlag(long int); // Adds a flag to the client's flags
34 long int remFlag(long int); // Removes a flag from the client's current flags
85ce9d3e 35
36 private:
96f71fee 37 char nick[32]; // Client's current nickname.
38 long int flags; // Client's current flags.
85ce9d3e 39};
40
41#endif