mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] default tgui alert input handling (#8891)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
@@ -295,7 +295,7 @@
|
||||
|
||||
var/delmob = 0
|
||||
switch(tgui_alert(usr, "Delete old mob?","Message",list("Yes","No","Cancel")))
|
||||
if("Cancel") return
|
||||
if("Cancel", null) return
|
||||
if("Yes") delmob = 1
|
||||
|
||||
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]")
|
||||
@@ -359,6 +359,8 @@
|
||||
var/duration
|
||||
|
||||
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No")))
|
||||
if(null)
|
||||
return
|
||||
if("Yes")
|
||||
temp = 1
|
||||
var/mins = 0
|
||||
@@ -777,6 +779,8 @@
|
||||
//Banning comes first
|
||||
if(notbannedlist.len) //at least 1 unbanned job exists in joblist so we have stuff to ban.
|
||||
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban", list("Yes","No","Cancel")))
|
||||
if(null)
|
||||
return
|
||||
if("Yes")
|
||||
if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0))
|
||||
to_chat(usr, "<span class='filter_adminlog warning'> You cannot issue temporary job-bans!</span>")
|
||||
@@ -913,6 +917,8 @@
|
||||
if(M.client && M.client.holder) return //admins cannot be banned. Even if they could, the ban doesn't affect them anyway
|
||||
|
||||
switch(tgui_alert(usr, "Temporary Ban?","Temporary Ban",list("Yes","No","Cancel")))
|
||||
if(null)
|
||||
return
|
||||
if("Yes")
|
||||
var/mins = tgui_input_number(usr,"How long (in minutes)?","Ban time",1440)
|
||||
if(!mins)
|
||||
@@ -951,7 +957,7 @@
|
||||
if(!reason)
|
||||
return
|
||||
switch(tgui_alert(usr,"IP ban?","IP Ban",list("Yes","No","Cancel")))
|
||||
if("Cancel") return
|
||||
if("Cancel", null) return
|
||||
if("Yes")
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
|
||||
if("No")
|
||||
|
||||
Reference in New Issue
Block a user