mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Add unwarn, as mistakes do happen.
This commit is contained in:
@@ -66,6 +66,7 @@ var/global/floorIsLava = 0
|
||||
<b>Mob type</b> = [M.type]<br><br>
|
||||
<A href='?src=\ref[src];boot2=\ref[M]'>Kick</A> |
|
||||
<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> |
|
||||
<A href='?_src_=holder;unwarn=[M.ckey]'>UNWarn</A> |
|
||||
<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> |
|
||||
<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A> |
|
||||
<A href='?_src_=holder;appearanceban=\ref[M]'>Identity Ban</A> |
|
||||
|
||||
@@ -521,6 +521,37 @@ var/list/admin_verbs_mod = list(
|
||||
D.save_preferences()
|
||||
feedback_add_details("admin_verb","WARN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/unwarn(warned_ckey)
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
if(!warned_ckey || !istext(warned_ckey)) return
|
||||
/*if(warned_ckey in admin_datums)
|
||||
usr << "<font color='red'>Error: warn(): You can't warn admins.</font>"
|
||||
return*/
|
||||
|
||||
var/datum/preferences/D
|
||||
var/client/C = directory[warned_ckey]
|
||||
if(C) D = C.prefs
|
||||
else D = preferences_datums[warned_ckey]
|
||||
|
||||
if(!D)
|
||||
src << "<font color='red'>Error: unwarn(): No such ckey found.</font>"
|
||||
return
|
||||
|
||||
if(D.warns == 0)
|
||||
src << "<font color='red'>Error: unwarn(): You can't unwarn someone with 0 warnings, you big dummy.</font>"
|
||||
return
|
||||
|
||||
D.warns-=1
|
||||
var/strikesleft = MAX_WARNS-D.warns
|
||||
if(C)
|
||||
C << "<font color='red'><BIG><B>One of your warnings has been removed.</B></BIG><br>You currently have [strikesleft] strike\s left</font>"
|
||||
message_admins("[key_name_admin(src)] has unwarned [key_name_admin(C)]. They have [strikesleft] strike(s) remaining, and have been warn banned [D.warnbans] [D.warnbans == 1 ? "time" : "times"]")
|
||||
else
|
||||
message_admins("[key_name_admin(src)] has unwarned [warned_ckey] (DC). They have [strikesleft] strike(s) remaining, and have been warn banned [D.warnbans] [D.warnbans == 1 ? "time" : "times"]")
|
||||
D.save_preferences()
|
||||
feedback_add_details("admin_verb","UNWARN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
#undef MAX_WARNS
|
||||
#undef AUTOBANTIME
|
||||
|
||||
|
||||
@@ -370,6 +370,9 @@
|
||||
else if(href_list["warn"])
|
||||
usr.client.warn(href_list["warn"])
|
||||
|
||||
else if(href_list["unwarn"])
|
||||
usr.client.unwarn(href_list["unwarn"])
|
||||
|
||||
else if(href_list["unbane"])
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
// flip and rotate verbs
|
||||
verb/rotate()
|
||||
set name = "Rotate Pipe"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(usr.stat)
|
||||
@@ -100,6 +101,7 @@
|
||||
|
||||
verb/flip()
|
||||
set name = "Flip Pipe"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
if(usr.stat)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user