]> jfr.im git - irc/gameservirc.git/blame - gameserv/aClient.h
Added a file pouch.h which contains an inventory class Pouch to be used for carrying...
[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
10class aClient {
11
12 friend ostream &operator<<( ostream &output, const aClient &c);
13
14 public:
96f71fee 15 aClient(char *); // Constructor takes a char for the nick
16 aClient(const aClient &); // Copy constructor
17 aClient(); // Default constructor
18 ~aClient(); // Destructor
85ce9d3e 19
96f71fee 20 // Sets the client's player struct data to the same thing as another aClient's
21 // player struct data
85ce9d3e 22 void setData(const aClient *);
96f71fee 23
24 void setNick(char *n) { strcpy(nick, n);}; // Sets the client's nick
25 char *getNick() { return nick; }; // Returns the client's nick
26 Player *stats; // Pointer to the client's player struct
27
28 long int getFlags() { return flags; }; // Returns the Client's current flags
29
30 // Functions also return the flags after modifying them
31 long int setFlags(long int); // Sets the clients flags to a new value
32 long int addFlag(long int); // Adds a flag to the client's flags
33 long int remFlag(long int); // Removes a flag from the client's current flags
85ce9d3e 34
35 private:
96f71fee 36 char nick[32]; // Client's current nickname.
37 long int flags; // Client's current flags.
85ce9d3e 38};
39
40#endif