{"NF_UNO_NAME", "Name"},
{"NF_UNO_WON_GAMES", "Won Games"},
{"NF_UNO_TOTAL_WON_GAMES", "Total won Games"},
+ {"NF_UNO_LESS_PLAYERS", "There are not enough players to start the game."},
{"NF_4WINS_NOT_YOUR_TURN", "Wait your turn!"},
{"NF_4WINS_INVALID_COLUMN", "invalid column!"},
{"NF_4WINS_VIEWING_GAME", "You are now viewing the game."},
{"NF_4WINS_GAME_CLOSED", "Game aborted."},
{"NF_4WINS_TIMEOUT", "Game aborted (timeout)."},
+ {"NF_4WINS_SELF", "You may not play against yourself."},
{NULL, NULL}
};
timeq_del(game->timer);
game->timer = NULL;
game->state = FOURWINS_STATE_RUNNING;
+ if((game->player[0]->user->flags & USERFLAG_ISAUTHED) && (game->player[1]->user->flags & USERFLAG_ISAUTHED) && !stricmp(game->player[0]->user->auth, game->player[1]->user->auth)) {
+ fourwins_reply(game, "NF_4WINS_SELF");
+ fourwins_free_game(game);
+ return;
+ }
fourwins_reply(game, "NF_4WINS_START", user->nick);
if((game->player[0]->user->flags & USERFLAG_ISAUTHED)) {
char *tmp;
reply(getTextBot(), user, "NS_USER_UNKNOWN", argv[0]);
return;
}
+ if(opp_user == user) {
+ reply(getTextBot(), user, "NF_4WINS_SELF");
+ return;
+ }
struct ChanUser *opponent = getChanUser(opp_user, chan);
if(!opponent) {
reply(getTextBot(), user, "NF_4WINS_OPPONENT_NOT_IN_CHAN", opp_user->nick);
struct uno_game *game = data;
game->timer = NULL;
if(game->players == 1) {
- //TEXT: too less users
+ uno_reply(game, NULL, "NF_UNO_LESS_PLAYERS");
uno_free_game(game);
return;
}