Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
vsnet_cmd.cpp
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15
*/
16
17
#include "
vsnet_cmd.h
"
18
19
std::ostream&
operator<<
( std::ostream &ostr,
Cmd
cmd )
20
{
21
ostr<<
displayCmd
( cmd );
22
return
ostr;
23
}
24
25
#define CASE( a ) \
26
case a: \
27
return #a; break;
28
29
const
char
*
displayCmd
(
Cmd
cmd )
30
{
31
switch
(cmd)
32
{
33
CASE
(
CMD_LOGIN
)
34
CASE
(
CMD_LOGOUT
)
35
CASE
(
CMD_POSUPDATE
)
36
CASE
(
CMD_ADDCLIENT
)
37
CASE
(
CMD_PING
)
38
CASE
(
CMD_SNAPSHOT
)
39
CASE
(
CMD_SERVERTIME
)
40
41
CASE
(
CMD_CREATECHAR
)
42
CASE
(
CMD_LOCATIONS
)
43
CASE
(
LOGIN_ERROR
)
44
CASE
(
LOGIN_ACCEPT
)
45
CASE
(
LOGIN_DATA
)
46
CASE
(
LOGIN_ALREADY
)
47
CASE
(
LOGIN_NEW
)
48
CASE
(
CMD_RESPAWN
)
49
CASE
(
CMD_RESYNCACCOUNTS
)
50
CASE
(
CMD_SAVEACCOUNTS
)
51
52
CASE
(
CMD_SNAPCARGO
)
53
CASE
(
CMD_CARGOUPGRADE
)
54
CASE
(
CMD_CREDITS
)
55
CASE
(
CMD_FIREREQUEST
)
56
CASE
(
CMD_UNFIREREQUEST
)
57
CASE
(
CMD_TARGET
)
58
CASE
(
CMD_SCAN
)
59
CASE
(
CMD_DAMAGE
)
60
CASE
(
CMD_SNAPDAMAGE
)
61
CASE
(
CMD_KILL
)
62
CASE
(
CMD_JUMP
)
63
CASE
(
CMD_ASKFILE
)
64
CASE
(
CMD_DOWNLOAD
)
65
CASE
(
CMD_SOUNDSAMPLE
)
66
CASE
(
CMD_TXTMESSAGE
)
67
CASE
(
CMD_SECSNDSAMPLE
)
68
CASE
(
CMD_SECMESSAGE
)
69
CASE
(
CMD_STARTNETCOMM
)
70
CASE
(
CMD_STOPNETCOMM
)
71
CASE
(
CMD_DOCK
)
72
CASE
(
CMD_UNDOCK
)
73
74
CASE
(
CMD_NEWSUBSCRIBE
)
75
76
CASE
(
CMD_ENTERCLIENT
)
77
CASE
(
CMD_EXITCLIENT
)
78
CASE
(
CMD_ADDEDYOU
)
79
CASE
(
CMD_DISCONNECT
)
80
CASE
(
CMD_CONNECT
)
81
CASE
(
CMD_CHOOSESHIP
)
82
83
CASE
(
CMD_SAVEDATA
)
84
CASE
(
CMD_MISSION
)
85
CASE
(
CMD_CUSTOM
)
86
CASE
(
CMD_SHIPDEALER
)
87
CASE
(
CMD_COMM
)
88
//CASE( CMD_ACK )
89
default
:
90
return
"CMD_UNKNOWN"
;
91
92
break
;
93
}
94
}
95
96
#undef CASE
97
src
networking
lowlevel
vsnet_cmd.cpp
Generated on Fri May 29 2015 23:07:35 for Vegastrike 0.5.1 rc1 by
1.8.4