Skip to content

Commit

Permalink
admin.dm fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Furrior committed Jan 4, 2025
1 parent bc2bc96 commit c4bb628
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modular_bandastation/metaserver/code/admin.dm
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
ADMIN_VERB(wl_ban, R_BAN, "WL Ban", "Ban a player from the whitelist.", ADMIN_CATEGORY_MAIN)
var/banned_ckey = input(user, "Please specify the ckey of the player you want to ban from the whitelist.", "WL Ban", "") as string|null
banned_ckey = ckey(ckey)
if(!input)
var/banned_ckey = input(user, "Please specify the ckey of the player you want to ban from the whitelist.", "WL Ban", "") as text|null
banned_ckey = ckey(banned_ckey)
if(!banned_ckey)
return
var/duration_days = input(user, "Please specify the duration of the ban in days.", "Duration", "") as num|null
if(!duration_days || duration_days < 0)
return

var/reason = input(user, "Please specify the reason for the ban.", "Reason", "") as text|null
var/reason = input(user, "Please specify the reason for the ban.", "Reason", "") as message|null

SScentral.whitelist_ban_player(banned_ckey, admin_ckey, duration_days, reason)
SScentral.whitelist_ban_player(banned_ckey, user.ckey, duration_days, reason)

log_admin("[key_name(user)] banned [banned_ckey] from whitelist for [duration_days] days for reason: [reason]")
message_admins("[key_name_admin(user)] banned [banned_ckey] from whitelist for [duration_days] days for reason: [reason]")
Expand Down

0 comments on commit c4bb628

Please sign in to comment.