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
commit 3d9b7c2d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ std::string Auth(SOCKET Sock){
auto Res = TCPRcv(Sock);
if(Res.empty() || Res[0] == 'E'){
if(Res.empty() || Res[0] == 'E' || Res[0] == 'K'){
Abord();
return "";
}
@ -87,7 +87,7 @@ std::string Auth(SOCKET Sock){
Res = TCPRcv(Sock);
if(Res[0] == 'E'){
if(Res[0] == 'E' || Res[0] == 'K'){
Abord();
return "";
}

View File

@ -109,7 +109,7 @@ std::string TCPRcv(SOCKET Sock){
#ifdef DEBUG
//debug("Parsing from server -> " + std::to_string(Ret.size()));
#endif
if(Ret[0] == 'E')UUl(Ret.substr(1));
if(Ret[0] == 'E' || Ret[0] == 'K')UUl(Ret.substr(1));
return Ret;
}