|
楼主 |
发表于 2006-5-12 07:36:16
|
显示全部楼层
来自 中国–福建–泉州–永春县
回复: 【发布】游戏中玩家查看其他服务器状态(中)
Post by ahcat
不是说了是自己计算的么。。。。
yam给我的资料里面显示有可以获取ping的,好像
- ------------------------------
- Revised 1/3/2001 ywb -- Added new rcon protocol info:
- Note to those writing remote admin programs that issue rcon commands (the in-client rcon commands work as before), you will need to change your rcon tools to use the following revised protocol.
- Remote App sends a UDP packet to the server on the server's port (e.g., 127.0.0.1:27015):
- The packet should start with 4 consecutive bytes of 255 (32-bit integer -1) and the string:
- "challenge rcon\n".
- The server will respond to the requesting system on the purported remote IP address and port with four 255's and:
- "challenge rcon number\n" where number is an unsigned int32 number.
- To issue the actual rcon, the remote App then responds with a UDP packet containing 4 255s and:
- "rcon number "password" rconcommands" where password is the rcon_password ( should be enclosed in quotes as noted so that multiple word passwords will continue to work ), number is the unsigned int32 number received from the server and rconcommands is the actual rcon command string.
- If the remote App fails to send the appropriate challenge number, waits too long to send the challenge, or uses an invalid password more than a few times in the course of a few seconds, the remote App will be assumed to be malicious and the actual ip address used by the remote host will be permanently and automatically banned from the server (as with the addip command). You can use listip to see the list of banned ip addresses on a server.
- -----------------------------
- Game servers will answer the following messages:
- Messages are sent to the server by sending 4 consecutive bytes of 255 (32-bit integer -1) and then the string command followed by a zero byte to terminate it
- [color="Red"]"ping"
- Server responds with a single byte code ASCII 'j'[/color]
- "info"
- Server responds with the following packet:
- (int32) -1
- (byte) ASCII 'C' (info response, S2A_INFO)
- (string) net address of server
- (string) name of the host / server
- (string) name of the map
- (string) game directory (i.e. valve/)
- (string) Game description (e.g. "half-life multiplay")
- (byte) active client count
- (byte) maximum clients allowed
- (byte) protocol version (currently 7)
- "players"
- Server responds with the following packet:
- (int32) -1
- (byte) ASCII 'D' (players response, S2A_PLAYER)
- (byte) active client count
- for each active client
- (byte) client number / index
- (string) player name
- (int32) client's frag total
- (float32) client's total time in-game
- "rules"
- Server responds with the following packet:
- (int32) -1
- (byte) ASCII 'E' (rules response, S2A_RULES)
- (int16) number of rules
- for each rule
- (string) rule name
- (string) rule value
- -------------------
- Master server query protocol:
- Sent to master:
- (byte) ASCII 'c' ( A2M_GET_SERVERS )
- Response from master:
- (int32) -1
- (byte) ASCII 'd' ( M2A_SERVERS )
- (byte) unused
- // This is followed by as many 6 byte ip addresses as will fit in the message. The master currently feeds about 2K worth of IP address ( 300+ or so ), but we may up that # significantly in the near future.
- (4 x byte) ip address
- (int16) port #
-
- The old protocol is still valid, but there is a new, extended protocol:
- Here are both the old and new protocols ( the new one is the "details" message ):
- "info"
- Server responds with the following packet:
- (int32) -1
- (byte) ASCII 'C' (info response, S2A_INFO)
- (string) net address of server
- (string) name of the host / server
- (string) name of the map
- (string) game directory (i.e. valve/)
- (string) Game description (e.g. "half-life multiplay")
- (byte) active client count
- (byte) maximum clients allowed
- (byte) protocol version (currently 37)
- "details"
- (int32) -1
- (byte) ASCII 'm' ( S2A_INFO_DETAILED )
- (string) net address of server
- (string) name of the host / server
- (string) name of the map
- (string) game directory (i.e. valve/)
- (string) Game description (e.g. "half-life multiplay")
- (byte) active client count
- (byte) maximum clients allowed
- (byte) protocol version (currently 37)
- (byte) type of server == 'l' for listen or 'd' for dedicated
- (byte) os of server == 'w' for win32 or 'l' for linux
- (byte) password on server == 1 or yes, 0, for no
- (byte) is server running a mod? == 1 for yes, 0 for no
- IFF the server is running mod byte was 1:
- (string) URL for mod's "info" website
- (string) URL for mod's download ftp server
- (int32) mod version #
- (int32) mod download size ( in bytes, approx. )
- (byte) is the mod a server side only mod? 1 == yes, 0 == no
- (byte) does this server require you to have a custom client side .dll ( client
复制代码 |
|