]> jfr.im git - irc/gameservirc.git/blame - gameserv/aClient.h
Implemented the definitions for the new items class and added some declarations into...
[irc/gameservirc.git] / gameserv / aClient.h
CommitLineData
85ce9d3e 1#ifndef ACLIENT_H
2#define ACLIENT_H
3
4#include <string.h>
26b17386 5#include "item.h"
ce61cdfa 6#include "options.h"
85ce9d3e 7#include "player.h"
fb37ecc7 8#include <iostream>
26b17386 9
fb37ecc7 10using std::ostream;
85ce9d3e 11
12class Player; // forward declaration
13
14class aClient {
15
16 friend ostream &operator<<( ostream &output, const aClient &c);
17
18 public:
96f71fee 19 aClient(char *); // Constructor takes a char for the nick
ce61cdfa 20
21 #ifdef P10
22 aClient(char *, char *); // Constructor takes a char for the nick and realnick
23 #endif
24
96f71fee 25 aClient(const aClient &); // Copy constructor
26 aClient(); // Default constructor
27 ~aClient(); // Destructor
85ce9d3e 28
96f71fee 29 // Sets the client's player struct data to the same thing as another aClient's
30 // player struct data
85ce9d3e 31 void setData(const aClient *);
96f71fee 32
33 void setNick(char *n) { strcpy(nick, n);}; // Sets the client's nick
34 char *getNick() { return nick; }; // Returns the client's nick
ce61cdfa 35
36 #ifdef P10
37 void setRealNick(char *rn) { strcpy(realnick, rn);}; // Sets the client's realnick
7f17db99 38 char *getRealNick() { return realnick; }; // Returns the client's real text nickname
ce61cdfa 39 #endif
40
96f71fee 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
85ce9d3e 49
50 private:
ce61cdfa 51 #ifdef P10
52 char realnick[32]; // Client's text nickname. Not the numeric
53 #endif
fc9d2643 54 char nick[32]; // Client's current nickname. Numeric if P10 is used
96f71fee 55 long int flags; // Client's current flags.
85ce9d3e 56};
57
58#endif