aboutsummaryrefslogtreecommitdiff
path: root/src/server.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-03-13 16:35:21 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-13 20:23:03 +0100
commit74d34da6cbb06a4d5659eb3287a87239c31da22c (patch)
tree639e35ad15a662006442431fdcc53b441f415e7f /src/server.h
parent9f3fc7201beedc66f974d54415b8e3fedb13ccb3 (diff)
downloadminetest-74d34da6cbb06a4d5659eb3287a87239c31da22c.tar.gz
minetest-74d34da6cbb06a4d5659eb3287a87239c31da22c.tar.bz2
minetest-74d34da6cbb06a4d5659eb3287a87239c31da22c.zip
Prepare Protocol v25 init & authentication.
* TOSERVER_INIT and TOCLIENT_INIT renamed to _LEGACY * TOSERVER_PASSWORD merged from dev-0.5, can use protocol v24 and v25 * TOCLIENT_ACCESS_DENIED merged from dev-0.5, can use protocol v24 and v25, with normalized strings an a custom id for custom errors * new TOSERVER_INIT packet only send MT version, supported compressions, protocols and serialization, this permit to rework everything later without break the _INIT packet * new TOSERVER_AUTH packet which auth the client * new TOCLIENT_HELLO packet which send server serialization version atm * new TOCLIENT_AUTH_ACCEPTED which is send when TOCLIENT_AUTH was okay. After this packet, the client load datas from servers, like after TOCLIENT_INIT_LEGACY packet
Diffstat (limited to 'src/server.h')
-rw-r--r--src/server.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server.h b/src/server.h
index 897841406..546a44a20 100644
--- a/src/server.h
+++ b/src/server.h
@@ -197,6 +197,8 @@ public:
void handleCommand_Null(NetworkPacket* pkt) {};
void handleCommand_Deprecated(NetworkPacket* pkt);
+ void handleCommand_Init(NetworkPacket* pkt);
+ void handleCommand_Auth(NetworkPacket* pkt);
void handleCommand_Init_Legacy(NetworkPacket* pkt);
void handleCommand_Init2(NetworkPacket* pkt);
void handleCommand_RequestMedia(NetworkPacket* pkt);
@@ -209,7 +211,7 @@ public:
void handleCommand_ChatMessage(NetworkPacket* pkt);
void handleCommand_Damage(NetworkPacket* pkt);
void handleCommand_Breath(NetworkPacket* pkt);
- void handleCommand_Password_Legacy(NetworkPacket* pkt);
+ void handleCommand_Password(NetworkPacket* pkt);
void handleCommand_PlayerItem(NetworkPacket* pkt);
void handleCommand_Respawn(NetworkPacket* pkt);
void handleCommand_Interact(NetworkPacket* pkt);
@@ -366,7 +368,8 @@ public:
void peerAdded(con::Peer *peer);
void deletingPeer(con::Peer *peer, bool timeout);
- void DenyAccess(u16 peer_id, const std::wstring &reason);
+ void DenyAccess(u16 peer_id, AccessDeniedCode reason, const std::wstring &custom_reason=NULL);
+ void DenyAccess_Legacy(u16 peer_id, const std::wstring &reason);
bool getClientConInfo(u16 peer_id, con::rtt_stat_type type,float* retval);
bool getClientInfo(u16 peer_id,ClientState* state, u32* uptime,
u8* ser_vers, u16* prot_vers, u8* major, u8* minor, u8* patch,
@@ -388,7 +391,8 @@ private:
void SendMovement(u16 peer_id);
void SendHP(u16 peer_id, u8 hp);
void SendBreath(u16 peer_id, u16 breath);
- void SendAccessDenied(u16 peer_id,const std::wstring &reason);
+ void SendAccessDenied(u16 peer_id, AccessDeniedCode reason, const std::wstring &custom_reason);
+ void SendAccessDenied_Legacy(u16 peer_id, const std::wstring &reason);
void SendDeathscreen(u16 peer_id,bool set_camera_point_target, v3f camera_point_target);
void SendItemDef(u16 peer_id,IItemDefManager *itemdef, u16 protocol_version);
void SendNodeDef(u16 peer_id,INodeDefManager *nodedef, u16 protocol_version);