1 | |
|
|
2 | /* |
|
|
3 | * static char *rcsid_c_new_c = |
|
|
4 | * "$Id: c_new.C,v 1.4 2006/09/10 15:59:57 root Exp $"; |
|
|
5 | */ |
|
|
6 | |
|
|
7 | /* |
1 | /* |
8 | CrossFire, A Multiplayer game for X-windows |
2 | CrossFire, A Multiplayer game for X-windows |
9 | |
3 | |
10 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
4 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
11 | Copyright (C) 1992 Frank Tore Johansen |
5 | Copyright (C) 1992 Frank Tore Johansen |
… | |
… | |
22 | |
16 | |
23 | You should have received a copy of the GNU General Public License |
17 | You should have received a copy of the GNU General Public License |
24 | along with this program; if not, write to the Free Software |
18 | along with this program; if not, write to the Free Software |
25 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
26 | |
20 | |
27 | The author can be reached via e-mail to crossfire-devel@real-time.com |
21 | The author can be reached via e-mail to <crossfire@schmorp.de> |
28 | */ |
22 | */ |
29 | |
23 | |
30 | /* This file deals with administrative commands from the client. */ |
24 | /* This file deals with administrative commands from the client. */ |
31 | #include <global.h> |
25 | #include <global.h> |
32 | #include <commands.h> |
26 | #include <commands.h> |
… | |
… | |
84 | cp++; |
78 | cp++; |
85 | } |
79 | } |
86 | |
80 | |
87 | csp = find_plugin_command (command, pl); |
81 | csp = find_plugin_command (command, pl); |
88 | |
82 | |
89 | if (!csp) |
|
|
90 | csp = find_command_element (command, NewServerCommands, NewServerCommandSize); |
83 | if (!csp) csp = find_command_element (command, NewServerCommands, NewServerCommandSize); |
91 | if (!csp) |
|
|
92 | csp = find_command_element (command, Commands, CommandsSize); |
84 | if (!csp) csp = find_command_element (command, Commands, CommandsSize); |
93 | if (!csp) |
|
|
94 | csp = find_command_element (command, CommunicationCommands, CommunicationCommandSize); |
85 | if (!csp) csp = find_command_element (command, CommunicationCommands, CommunicationCommandSize); |
95 | if (!csp && QUERY_FLAG (pl, FLAG_WIZ)) |
86 | if (!csp && QUERY_FLAG (pl, FLAG_WIZ)) |
96 | csp = find_command_element (command, WizCommands, WizCommandsSize); |
87 | csp = find_command_element (command, WizCommands, WizCommandsSize); |
97 | |
88 | |
98 | if (csp == NULL) |
89 | if (csp == NULL) |
99 | { |
90 | { |
… | |
… | |
112 | * but greater than -1. This is to improve the performance of the |
103 | * but greater than -1. This is to improve the performance of the |
113 | * new client/server. In theory, it shouldn't make much difference. |
104 | * new client/server. In theory, it shouldn't make much difference. |
114 | */ |
105 | */ |
115 | |
106 | |
116 | if (csp->time && pl->speed_left < -2.0) |
107 | if (csp->time && pl->speed_left < -2.0) |
117 | { |
|
|
118 | LOG (llevDebug, "execute_newclient_command: Player issued command that takes more time than he has left.\n"); |
108 | LOG (llevDebug, "execute_newclient_command: Player issued command that takes more time than he has left.\n"); |
119 | } |
109 | |
120 | return csp->func (pl, cp); |
110 | return csp->func (pl, cp); |
121 | } |
111 | } |
122 | |
112 | |
123 | int |
113 | int |
124 | command_run (object *op, char *params) |
114 | command_run (object *op, char *params) |