]> jfr.im git - irc/gameservirc.git/blob - gameserv/aClient.h
fixed a small problem with compiler warnings
[irc/gameservirc.git] / gameserv / aClient.h
1 #ifndef ACLIENT_H
2 #define ACLIENT_H
3
4 #include <string.h>
5 #include "item.h"
6 #include "options.h"
7 #include "player.h"
8 #include <iostream>
9
10 using std::ostream;
11
12 class Player; // forward declaration
13
14 class aClient {
15
16 friend ostream &operator<<( ostream &output, const aClient &c);
17
18 public:
19 aClient(char *); // Constructor takes a char for the nick
20
21 #ifdef P10
22 aClient(char *, char *); // Constructor takes a char for the nick and realnick
23 #endif
24
25 aClient(const aClient &); // Copy constructor
26 aClient(); // Default constructor
27 ~aClient(); // Destructor
28
29 // Sets the client's player struct data to the same thing as another aClient's
30 // player struct data
31 void setData(const aClient *);
32
33 void setNick(char *n) { strcpy(nick, n);}; // Sets the client's nick
34 char *getNick() { return nick; }; // Returns the client's nick
35
36 #ifdef P10
37 void setRealNick(char *rn) { strcpy(realnick, rn);}; // Sets the client's realnick
38 char *getRealNick() { return realnick; }; // Returns the client's real text nickname
39 #endif
40
41 Player *stats; // Pointer to the client's player struct
42
43 long int getFlags() { return flags; }; // Returns the Client's current flags
44
45 // Functions also return the flags after modifying them
46 long int setFlags(long int); // Sets the clients flags to a new value
47 long int addFlag(long int); // Adds a flag to the client's flags
48 long int remFlag(long int); // Removes a flag from the client's current flags
49
50 private:
51 #ifdef P10
52 char realnick[32]; // Client's text nickname. Not the numeric
53 #endif
54 char nick[32]; // Client's current nickname. Numeric if P10 is used
55 long int flags; // Client's current flags.
56 };
57
58 #endif