Commit c8b15204 authored by nanahira's avatar nanahira

ban in mysql only

parent 9b6ebc77
......@@ -490,6 +490,8 @@ ROOM_bad_ip = global.ROOM_bad_ip = {}
# ban a user manually and permanently
ban_user = global.ban_user = (name) ->
if !settings.modules.mysql.enabled
throw "MySQL is not enabled"
bans = [dataManager.getBan(name, null)]
for room in ROOM_all when room and room.established
for playerType in ["players", "watchers"]
......
......@@ -641,6 +641,9 @@
// ban a user manually and permanently
ban_user = global.ban_user = async function(name) {
var ban, bans, len3, len4, len5, len6, n, o, p, player, playerType, q, ref3, ref4, room;
if (!settings.modules.mysql.enabled) {
throw "MySQL is not enabled";
}
bans = [dataManager.getBan(name, null)];
for (n = 0, len3 = ROOM_all.length; n < len3; n++) {
room = ROOM_all[n];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment