Merge pull request #49 from snepsnepsnep/master

Fix kick message for server 3.0+
This commit is contained in:
Simon Abed El Sater
2022-09-25 20:32:50 +03:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ std::string Auth(SOCKET Sock){
auto Res = TCPRcv(Sock); auto Res = TCPRcv(Sock);
if(Res.empty() || Res[0] == 'E'){ if(Res.empty() || Res[0] == 'E' || Res[0] == 'K'){
Abord(); Abord();
return ""; return "";
} }
@@ -87,7 +87,7 @@ std::string Auth(SOCKET Sock){
Res = TCPRcv(Sock); Res = TCPRcv(Sock);
if(Res[0] == 'E'){ if(Res[0] == 'E' || Res[0] == 'K'){
Abord(); Abord();
return ""; return "";
} }
+1 -1
View File
@@ -109,7 +109,7 @@ std::string TCPRcv(SOCKET Sock){
#ifdef DEBUG #ifdef DEBUG
//debug("Parsing from server -> " + std::to_string(Ret.size())); //debug("Parsing from server -> " + std::to_string(Ret.size()));
#endif #endif
if(Ret[0] == 'E')UUl(Ret.substr(1)); if(Ret[0] == 'E' || Ret[0] == 'K')UUl(Ret.substr(1));
return Ret; return Ret;
} }