* Rewrote the database format using Jupiter::Database
* Replaced 'active' with 'flags' in ban entries, adding support for many types of bans
* Added 'prefix_length' to entries; netmask banning is now supported internally
* Moved 'banner' to ban entry from varData
* "bansearch" IRC command now includes type (flags) information
General bug fixes and optimization
fprintf(stdout,"Updated BanDatabase file \"%s\" from version %d to %d."ENDL,RenX::BanDatabase::filename.c_str(),RenX::BanDatabase::version,write_version);
puts("FATAL ERROR: UNABLE TO REMOVE UNSUPPORTED BAN DATABASE FILE VERSION");
else
fprintf(stdout,"CRITICAL ERROR: BanDatabase file \"%s\" failed to update from version %d to %d."ENDL,RenX::BanDatabase::filename.c_str(),RenX::BanDatabase::version,write_version);
RenX::BanDatabase::version=write_version;
{
puts("Warning: Unsupported ban database file version. The database will be removed and rewritten.");
RenX::Server::forceKickPlayer(player,Jupiter::StringS::Format("You are permanently banned from the server by %.*s for: %.*s",banner.size(),banner.ptr(),reason.size(),reason.ptr()));
else
RenX::Server::forceKickPlayer(player,Jupiter::StringS::Format("You are permanently banned from the server for: %.*s",reason.size(),reason.ptr()));
}
elseif(banner.isNotEmpty())
RenX::Server::forceKickPlayer(player,Jupiter::StringS::Format("You are banned from the server by %.*s for the next %d days, %d:%d:%d for: %.*s",banner.size(),banner.ptr(),length/86400,length%3600,(length%3600)/60,length%60,reason.size(),reason.ptr()));
else
RenX::Server::forceKickPlayer(player,Jupiter::StringS::Format("You are banned from the server for the next %d days, %d:%d:%d for: %.*s",length/86400,length%3600,(length%3600)/60,length%60,reason.size(),reason.ptr()));
strftime(timeStr,sizeof(timeStr),"%b %d %Y at %H:%M:%S",localtime(&(entry->timestamp)));
this->forceKickPlayer(player,Jupiter::StringS::Format("You are were permanently banned from the server on %s for: %.*s",timeStr,entry->reason.size(),entry->reason.ptr()));
strftime(timeStr,sizeof(timeStr),"%b %d %Y at %H:%M:%S",localtime(std::addressof<consttime_t>(last_to_expire[0]->timestamp+last_to_expire[0]->length)));
if(last_to_expire[0]->length==0)
this->forceKickPlayer(player,Jupiter::StringS::Format("You were permanently banned from the server on %s for: %.*s",timeStr,last_to_expire[0]->reason.size(),last_to_expire[0]->reason.ptr()));
else
this->forceKickPlayer(player,Jupiter::StringS::Format("You are banned from the server until %s for: %.*s",timeStr,last_to_expire[0]->reason.size(),last_to_expire[0]->reason.ptr()));
strftime(timeStr,sizeof(timeStr),"%b %d %Y at %H:%M:%S",localtime(std::addressof<consttime_t>(entry->timestamp+entry->length)));
this->forceKickPlayer(player,Jupiter::StringS::Format("You are banned from the server until %s for: %.*s",timeStr,entry->reason.size(),entry->reason.ptr()));
if(last_to_expire[1]!=nullptr)// Chat ban
{
strftime(timeStr,sizeof(timeStr),"%b %d %Y at %H:%M:%S",localtime(std::addressof<consttime_t>(last_to_expire[1]->timestamp+last_to_expire[1]->length)));
this->mute(player);
if(last_to_expire[1]->length==0)
this->sendMessage(player,Jupiter::StringS::Format("You were permanently muted on this server on %s for: %.*s",timeStr,last_to_expire[1]->reason.size(),last_to_expire[1]->reason.ptr()));
else
this->sendMessage(player,Jupiter::StringS::Format("You are muted on this server until %s for: %.*s",timeStr,last_to_expire[1]->reason.size(),last_to_expire[1]->reason.ptr()));
strftime(timeStr,sizeof(timeStr),"%b %d %Y at %H:%M:%S",localtime(std::addressof<consttime_t>(last_to_expire[2]->timestamp+last_to_expire[2]->length)));
if(last_to_expire[2]->length==0)
this->sendMessage(player,Jupiter::StringS::Format("You were permanently bot-muted on this server on %s for: %.*s",timeStr,last_to_expire[2]->reason.size(),last_to_expire[2]->reason.ptr()));
else
this->sendMessage(player,Jupiter::StringS::Format("You are bot-muted on this server until %s for: %.*s",timeStr,last_to_expire[2]->reason.size(),last_to_expire[2]->reason.ptr()));
}
if(last_to_expire[3]!=nullptr)// Vote ban
{
strftime(timeStr,sizeof(timeStr),"%b %d %Y at %H:%M:%S",localtime(std::addressof<consttime_t>(last_to_expire[3]->timestamp+last_to_expire[3]->length)));
if(last_to_expire[3]->length==0)
this->sendMessage(player,Jupiter::StringS::Format("You were permanently vote-muted on this server on %s for: %.*s",timeStr,last_to_expire[3]->reason.size(),last_to_expire[3]->reason.ptr()));
else
this->sendMessage(player,Jupiter::StringS::Format("You are vote-muted on this server until %s for: %.*s",timeStr,last_to_expire[3]->reason.size(),last_to_expire[3]->reason.ptr()));
}
if(last_to_expire[4]!=nullptr)// Mine ban
{
this->mineBan(player);
strftime(timeStr,sizeof(timeStr),"%b %d %Y at %H:%M:%S",localtime(std::addressof<consttime_t>(last_to_expire[4]->timestamp+last_to_expire[4]->length)));
if(last_to_expire[4]->length==0)
this->sendMessage(player,Jupiter::StringS::Format("You were permanently mine-banned on this server on %s for: %.*s",timeStr,last_to_expire[4]->reason.size(),last_to_expire[4]->reason.ptr()));
else
this->sendMessage(player,Jupiter::StringS::Format("You are mine-banned on this server until %s for: %.*s",timeStr,last_to_expire[4]->reason.size(),last_to_expire[4]->reason.ptr()));
}
if(last_to_expire[5]!=nullptr)// Ladder ban
{
strftime(timeStr,sizeof(timeStr),"%b %d %Y at %H:%M:%S",localtime(std::addressof<consttime_t>(last_to_expire[5]->timestamp+last_to_expire[5]->length)));
if(last_to_expire[5]->length==0)
this->sendMessage(player,Jupiter::StringS::Format("You were permanently ladder-banned on this server on %s for: %.*s",timeStr,last_to_expire[5]->reason.size(),last_to_expire[5]->reason.ptr()));
else
this->sendMessage(player,Jupiter::StringS::Format("You are ladder-banned on this server until %s for: %.*s",timeStr,last_to_expire[5]->reason.size(),last_to_expire[5]->reason.ptr()));
Jupiter::StringLmsg=Jupiter::StringL::Format(IRCCOLOR"04[Alert] "IRCCOLORIRCBOLD"%.*s"IRCBOLDIRCCOLOR" is marked for monitoring by %.*s for: \"%.*s\". Please keep an eye on them in ",fmtName.size(),fmtName.ptr(),last_to_expire[6]->banner.size(),last_to_expire[6]->banner.ptr(),last_to_expire[6]->reason.size(),last_to_expire[6]->reason.ptr());
Jupiter::StringSmsg2=Jupiter::StringS::Format(IRCCOLOR"04[Alert] "IRCCOLORIRCBOLD"%.*s"IRCBOLDIRCCOLOR" is marked for monitoring by %.*s for: \"%.*s\"."IRCCOLOR,fmtName.size(),fmtName.ptr(),last_to_expire[6]->banner.size(),last_to_expire[6]->banner.ptr(),last_to_expire[6]->reason.size(),last_to_expire[6]->reason.ptr());
server->sendPubChan(IRCCOLOR"13[Aimbot]"IRCCOLOR" %.*s was banned from the server! Kills: %u - Deaths: %u - Headshots: %u",player->name.size(),player->name.ptr(),player->kills,player->deaths,player->headshots);
Jupiter::StringS::Format(IRCCOLOR"12[Join] "IRCBOLD"%.*s"IRCBOLD" joined the game fighting for the %.*s from "IRCBOLD"%.*s"IRCBOLD" using Steam ID "IRCBOLD"%.*s"IRCBOLD". Their hostname is: "IRCBOLD"%.*s",RenX::tags->nameTag.size(),RenX::tags->nameTag.ptr(),RenX::tags->teamLongTag.size(),RenX::tags->teamLongTag.ptr(),RenX::tags->ipTag.size(),RenX::tags->ipTag.ptr(),RenX::tags->steamTag.size(),RenX::tags->steamTag.ptr(),RenX::tags->rdnsTag.size(),RenX::tags->rdnsTag.ptr()));
Jupiter::StringS::Format(IRCCOLOR"12[Join] "IRCBOLD"%.*s"IRCBOLD" joined the game fighting for the %.*s from "IRCBOLD"%.*s"IRCBOLD", but is not using Steam. Their hostname is: "IRCBOLD"%.*s",RenX::tags->nameTag.size(),RenX::tags->nameTag.ptr(),RenX::tags->teamLongTag.size(),RenX::tags->teamLongTag.ptr(),RenX::tags->ipTag.size(),RenX::tags->ipTag.ptr(),RenX::tags->rdnsTag.size(),RenX::tags->rdnsTag.ptr()));
Jupiter::StringS::Format(IRCCOLOR"12[Join] "IRCBOLD"%.*s"IRCBOLD" joined the game fighting for the %.*s from "IRCBOLD"%.*s"IRCBOLD", but is "IRCBOLD"not"IRCBOLD" using Steam. Their hostname is: "IRCBOLD"%.*s",RenX::tags->nameTag.size(),RenX::tags->nameTag.ptr(),RenX::tags->teamLongTag.size(),RenX::tags->teamLongTag.ptr(),RenX::tags->ipTag.size(),RenX::tags->ipTag.ptr(),RenX::tags->rdnsTag.size(),RenX::tags->rdnsTag.ptr()));
Jupiter::StringS::Format(IRCCOLOR"12[Part] "IRCBOLD"%.*s"IRCBOLD" left the %.*s.",RenX::tags->nameTag.size(),RenX::tags->nameTag.ptr(),RenX::tags->teamLongTag.size(),RenX::tags->teamLongTag.ptr()));
source->sendNotice(nick,Jupiter::StringS::Format("%.*s has been kicked from the server for exceeding the warning limit (%d warnings).",player->name.size(),player->name.ptr(),warns));
source->sendNotice(nick,Jupiter::StringS::Format("%.*s has been banned from the server for exceeding the warning limit (%d warnings).",player->name.size(),player->name.ptr(),warns));
break;
}
@ -187,7 +187,7 @@ void WarnGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, co
source->sendMessage(player,Jupiter::StringS::Format("%.*s has been kicked from the server for exceeding the warning limit (%d warnings).",target->name.size(),target->name.ptr(),warns));
source->sendMessage(player,Jupiter::StringS::Format("%.*s has been banned from the server for exceeding the warning limit (%d warnings).",target->name.size(),target->name.ptr(),warns));