Author: cazfi Date: Wed Sep 28 07:13:45 2016 New Revision: 33934 URL: http://svn.gna.org/viewcvs/freeciv?rev=33934&view=rev Log: Lower default cmdlevel to basic on game start.
Reported by taka <taka> See bug #24774 Modified: branches/S2_5/server/srv_main.c branches/S2_5/server/stdinhand.c branches/S2_5/server/stdinhand.h Modified: branches/S2_5/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/srv_main.c?rev=33934&r1=33933&r2=33934&view=diff ============================================================================== --- branches/S2_5/server/srv_main.c (original) +++ branches/S2_5/server/srv_main.c Wed Sep 28 07:13:45 2016 @@ -1431,6 +1431,7 @@ conn_set_access(pconn, ALLOW_BASIC, FALSE); } } conn_list_iterate_end; + set_running_game_access_level(); con_puts(C_OK, _("Starting game.")); Modified: branches/S2_5/server/stdinhand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/stdinhand.c?rev=33934&r1=33933&r2=33934&view=diff ============================================================================== --- branches/S2_5/server/stdinhand.c (original) +++ branches/S2_5/server/stdinhand.c Wed Sep 28 07:13:45 2016 @@ -1620,6 +1620,15 @@ return TRUE; } +/************************************************************************** + Adjust default command level on game start. +**************************************************************************/ +void set_running_game_access_level(void) +{ + if (default_access_level > ALLOW_BASIC) { + default_access_level = ALLOW_BASIC; + } +} /************************************************************************** Returns possible parameters for the commands that take server options Modified: branches/S2_5/server/stdinhand.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/stdinhand.h?rev=33934&r1=33933&r2=33934&view=diff ============================================================================== --- branches/S2_5/server/stdinhand.h (original) +++ branches/S2_5/server/stdinhand.h Wed Sep 28 07:13:45 2016 @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,7 +54,7 @@ bool start_command(struct connection *caller, bool check, bool notify); void toggle_ai_player_direct(struct connection *caller, - struct player *pplayer); + struct player *pplayer); /* for sernet.c in initing a new connection */ enum cmdlevel access_level_for_next_connection(void); @@ -63,6 +63,8 @@ bool conn_is_kicked(struct connection *pconn, int *time_remaining); +void set_running_game_access_level(void); + #ifdef HAVE_LIBREADLINE char **freeciv_completion(const char *text, int start, int end); #endif _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits