X-Git-Url: https://jfr.im/git/irc/gameservirc.git/blobdiff_plain/9ea839ceb93a75c7953164560af68e98c640e5f5..6f727d4c9eb5c886f14598577f40da583577444e:/gameserv/flags.h diff --git a/gameserv/flags.h b/gameserv/flags.h index cf546af..c2a2ba1 100644 --- a/gameserv/flags.h +++ b/gameserv/flags.h @@ -1,6 +1,8 @@ #ifndef FLAGS_H #define FLAGS_H +#include "extern.h" + /* This file contains all the flags used in the aClient and Player classes. * More flags can be added simply by going up in multiples of 2. * ie. 0001 0002 0004 0008 0010 0020 0040 0080 0100 0200 0400 0800 1000 2000 4000 @@ -28,6 +30,8 @@ // aClient FLAGS ONLY #define FLAG_ADMIN 0x0001 +#define FLAG_IGNORE 0x0002 +#define FLAG_PLAYING 0x0004 // PLAYER FLAGS ONLY #define FLAG_MASTER 0x0001 @@ -35,6 +39,22 @@ #define FLAG_YOURTURN 0x0004 #define FLAG_WONGAME 0x0008 +// Config File flags +#define CFLAG_LISTENONCF 0x0001 +#define CFLAG_USEPRIVMSG 0x0002 +#define CFLAG_BOPER 0x0004 + +#define setListenOnCF() (configflags |= CFLAG_LISTENONCF) +#define clearListenOnCF() (configflags &= ~CFLAG_LISTENONCF) +#define isListenonCF() (configflags & CFLAG_LISTENONCF) + +#define setUsePrivmsg() (configflags |= CFLAG_USEPRIVMSG) +#define clearUsePrivmsg() (configflags &= ~CFLAG_USEPRIVMSG) +#define isUsePrivmsg() (configflags & CFLAG_USEPRIVMSG) + +#define setBOper() (configflags |= CFLAG_BOPER) +#define clearBOPer() (configflags &= ~CFLAG_BOPER) +#define isBOper() (configflags & CFLAG_BOPER) // aClient flags // #define ADMIN_FLAGS(FLAG_ONE | FLAG_TWO | FLAG_ETC) @@ -46,6 +66,13 @@ #define clearAdminFlags(x) ((x)->remFlag(ADMIN_FLAGS)) +#define setIgnore(x) ((x)->addFlag(FLAG_IGNORE)) +#define clearIgnore(x) ((x)->remFlag(FLAG_IGNORE)) +#define isIgnore(x) ((x)->getFlags() & FLAG_IGNORE) && !isAdmin(x) + +#define setPlaying(x) ((x)->addFlag(FLAG_PLAYING)) +#define clearPlaying(x) ((x)->remFlag(FLAG_IGNORE)) +#define FL_is_playing(x) ((x)->getFlags() & FLAG_PLAYING) // Player Flags #define seenMaster(x) ((x)->getFlags() & FLAG_MASTER)