projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed 4wins, uno ranking output and some language strings
[NeonServV5.git]
/
src
/
modules
/
NeonFun.mod
/
game_uno.c
diff --git
a/src/modules/NeonFun.mod/game_uno.c
b/src/modules/NeonFun.mod/game_uno.c
index 8ddd9c9d089b1097f1edc4af42055de249af2939..0fc95026f7a8a0f578e9fa32b30ad7027d1cc68e 100644
(file)
--- a/
src/modules/NeonFun.mod/game_uno.c
+++ b/
src/modules/NeonFun.mod/game_uno.c
@@
-276,7
+276,7
@@
TIMEQ_CALLBACK(uno_game_wait_timeout) {
struct uno_game *game = data;
game->timer = NULL;
if(game->players == 1) {
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;
}
uno_free_game(game);
return;
}
@@
-555,7
+555,7
@@
void uno_play_card(struct uno_game *game, struct uno_player *player, struct uno_
winner_count = 1;
char rank_buf[20], won_buf[50], total_won_buf[50];
char *tmp, *tmp2;
winner_count = 1;
char rank_buf[20], won_buf[50], total_won_buf[50];
char *tmp, *tmp2;
- for(cplayer = game->winner; cplayer
->next
; cplayer = cplayer->next) {
+ for(cplayer = game->winner; cplayer; cplayer = cplayer->next) {
sprintf(rank_buf, "%d", winner_count++);
content[0] = rank_buf;
content[1] = cplayer->chanuser->user->nick;
sprintf(rank_buf, "%d", winner_count++);
content[0] = rank_buf;
content[1] = cplayer->chanuser->user->nick;
@@
-652,6
+652,7
@@
void uno_event_freechan(struct ChanNode *chan) {
for(game = uno_active_games; game; game = game->next) {
if(game->channel == chan) {
uno_free_game(game);
for(game = uno_active_games; game; game = game->next) {
if(game->channel == chan) {
uno_free_game(game);
+ return;
}
}
}
}
}
}