add web range bans
This commit is contained in:
parent
09df305de2
commit
3ac0bc6247
@ -398,6 +398,16 @@ void AOClient::pktWebSocketIp(AreaData* area, int argc, QStringList argv, AOPack
|
||||
qDebug() << "ws ip set to" << argv[0];
|
||||
#endif
|
||||
m_remote_ip = QHostAddress(argv[0]);
|
||||
|
||||
if (isIPBanned(m_remote_ip)){
|
||||
QString l_reason = "Your IP has been banned by a moderator.";
|
||||
AOPacket l_ban_reason("BD", {l_reason});
|
||||
m_socket->write(l_ban_reason.toUtf8());
|
||||
client->deleteLater();
|
||||
m_socket->close();
|
||||
return;
|
||||
}
|
||||
|
||||
calculateIpid();
|
||||
auto l_ban = server->db_manager->isIPBanned(m_ipid);
|
||||
if (l_ban.first) {
|
||||
|
Loading…
Reference in New Issue
Block a user