mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-04-05 23:36:23 +00:00
Refactor to work on Linux / Unix, fix some compiler errors.
CMakeLists was also modified to make this work, but its scuffed and i will hold on to that for a while longer
This commit is contained in:
@@ -7,8 +7,10 @@
|
||||
#include "Settings.h"
|
||||
#include "Network.h"
|
||||
#include "Logger.h"
|
||||
#include "UnixCompat.h"
|
||||
#include <sstream>
|
||||
|
||||
|
||||
int FC(const std::string& s,const std::string& p,int n) {
|
||||
auto i = s.find(p);
|
||||
int j;
|
||||
@@ -116,10 +118,14 @@ void SyncClient(Client*c){
|
||||
}
|
||||
info(c->GetName() + Sec(" is now synced!"));
|
||||
}
|
||||
void ParseVeh(Client*c, const std::string&Packet){
|
||||
void ParseVeh(Client*c, const std::string& Packet){
|
||||
#ifdef __WIN32
|
||||
__try{
|
||||
VehicleParser(c,Packet);
|
||||
}__except(Handle(GetExceptionInformation(),Sec("Vehicle Handler"))){}
|
||||
#else // unix
|
||||
VehicleParser(c,Packet);
|
||||
#endif // __WIN32
|
||||
}
|
||||
|
||||
void HandleEvent(Client*c ,const std::string&Data){
|
||||
@@ -189,8 +195,12 @@ void GlobalParser(Client*c, const std::string& Pack){
|
||||
}
|
||||
}
|
||||
|
||||
void GParser(Client*c, const std::string&Packet){
|
||||
void GParser(Client*c, const std::string& Packet){
|
||||
#ifdef __WIN32
|
||||
__try{
|
||||
GlobalParser(c, Packet);
|
||||
}__except(Handle(GetExceptionInformation(),Sec("Global Handler"))){}
|
||||
}
|
||||
#else
|
||||
GlobalParser(c, Packet);
|
||||
#endif // __WIN32
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user