use core boolean type rather than additional local ones

This commit is contained in:
Mark 2005-10-18 22:25:50 +00:00
parent 43c53bca20
commit 4400e9bd19
5 changed files with 5 additions and 10 deletions

2
bomb.c
View file

@ -46,7 +46,7 @@ int timerupstopbomb(void *userptr)
* Start Bomb Game
*/
int startbomb(const CmdParams *cmdparams) {
if (CheckGameStart(cmdparams->source, cmdparams->av[0], GS_GAME_CHANNEL_BOMB, TS_ONE_MINUTE, GS_GAME_CHANNEL_KICK, GS_GAME_CHANNEL_JOIN) != NS_SUCCESS) {
if (CheckGameStart(cmdparams->source, cmdparams->av[0], GS_GAME_CHANNEL_BOMB, TS_ONE_MINUTE, NS_TRUE, NS_TRUE) != NS_SUCCESS) {
return NS_SUCCESS;
}
irc_chanprivmsg (gs_bot, gameroom[GS_GAME_CHANNEL_BOMB], "\0037A Bomb has been brought into the channel by %s. Don''t be the last one with it.", cmdparams->source->name);

View file

@ -82,11 +82,11 @@ int CheckGameStart(Client *u, char *cn, int gn, int ct, int kg, int cj) {
irc_prefmsg (gs_bot, u, "You must be in the Channel you wish to start the game in.");
return NS_FAILURE;
}
if (kickgameschanoponly && kg == GS_GAME_CHANNEL_KICK && !IsChanOp(c, u)) {
if (kickgameschanoponly && kg == NS_TRUE && !IsChanOp(c, u)) {
irc_prefmsg (gs_bot, u, "You must be a Channel Operator to start the game.");
return NS_FAILURE;
}
if (cj == GS_GAME_CHANNEL_JOIN) {
if (cj == NS_TRUE) {
for (i = 0 ; i < GS_GAME_CHANNEL_TOTAL ; i++) {
if (i != gn && gamestatus[i] != GS_GAME_CHANNEL_STOPPED && !ircstrcasecmp (gameroom[i], gameroom[gn])) {
i = (GS_GAME_CHANNEL_TOTAL + 1);

View file

@ -99,11 +99,6 @@ int playttt(const CmdParams *cmdparams);
#define GS_GAME_CHANNEL_PLAYING 0x00000003 /* Game Running */
#define GS_GAME_CHANNEL_STOPPING 0x00000004 /* Game Stopping */
#define GS_GAME_CHANNEL_NOJOIN 0x00000000 /* Don't Join Game Channel */
#define GS_GAME_CHANNEL_JOIN 0x00000001 /* Join Game Channel */
#define GS_GAME_CHANNEL_NOKICK 0x00000000 /* No Kicks From Channels */
#define GS_GAME_CHANNEL_KICK 0x00000001 /* Loser Kicked From Game Channel */
#define GS_GAME_USER_TICTACTOE 0x00000000 /* User Tic Tac Toe Game */
/*

2
hilo.c
View file

@ -41,7 +41,7 @@ int timerupstophilo(void *userptr) {
* Start HiLo Game
*/
int starthilo(const CmdParams *cmdparams) {
if (CheckGameStart(cmdparams->source, cmdparams->av[0], GS_GAME_CHANNEL_HILO, 120, GS_GAME_CHANNEL_NOKICK, GS_GAME_CHANNEL_JOIN) != NS_SUCCESS) {
if (CheckGameStart(cmdparams->source, cmdparams->av[0], GS_GAME_CHANNEL_HILO, 120, NS_FALSE, NS_TRUE) != NS_SUCCESS) {
return NS_SUCCESS;
}
num_low = (rand() % 999000);

View file

@ -37,7 +37,7 @@ int timerupstopruss(void *userptr) {
* Start Russian Roulette Game
*/
int startruss(const CmdParams *cmdparams) {
if (CheckGameStart(cmdparams->source, cmdparams->av[0], GS_GAME_CHANNEL_RUSS, TS_ONE_MINUTE, GS_GAME_CHANNEL_KICK, GS_GAME_CHANNEL_JOIN) != NS_SUCCESS) {
if (CheckGameStart(cmdparams->source, cmdparams->av[0], GS_GAME_CHANNEL_RUSS, TS_ONE_MINUTE, NS_TRUE, NS_TRUE) != NS_SUCCESS) {
return NS_SUCCESS;
}
irc_chanprivmsg (gs_bot, gameroom[GS_GAME_CHANNEL_RUSS], "\0037Russian Roulette has been started by %s. Who will die this time?", cmdparams->source->name);