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