• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Avesta772 Ban System ??

Erevius

It Was A Good Day
Joined
Feb 12, 2010
Messages
157
Reaction score
7
Location
Poland/Olsztyn
The ban system in my avesta 7.7 doesn't work properly.
When I choose a punnishment (action) which the player should receive (eg. Name Report) then the server doesn't kick the selected player. He can log in/out again and again. Moreover, server sets the type of the punishment as "4" (=a notation). In addition, player doesn't get banned after he receive the third notation (I've set "NotationsToBan = 3" in config.lua). The last thing is, the comment in my database is strange.
It looks like "My commentªR‚.ïSaú™rkamils4ØÏ´Xb˜´‡..." (kamils is my password :D). I've tried to replace ban.cpp/h and "violationwindow" from game.cpp from TFS 0.2.6 but I get too many errors :S I hope you know something about this bug :[

Pliki/Files:
ban.cpp
ban.h
game.cpp
 
Change function Protocol74::ParseViolationWindow

to

Code:
void Protocol74::parseViolationWindow(NetworkMessage &msg)
{
     std::string name = msg.GetString();
     int32_t reason = msg.GetByte();
     int32_t action = msg.GetByte();
     std::string comment = msg.GetString();
     std::string statement = msg.GetString();
     msg.GetU16();
     bool IPBanishment = (msg.GetByte() == 0x01);

	 addGameTask(&Game::violationWindow, player->getID(), name, reason, comment, action, IPBanishment);
}
 

Similar threads

Back
Top