Add unwarn, as mistakes do happen.

This commit is contained in:
Rob Nelson
2014-06-04 13:33:23 -07:00
parent ec01d1b6ed
commit e18194f49d
4 changed files with 37 additions and 0 deletions

View File

@@ -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> |

View File

@@ -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

View File

@@ -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

View File

@@ -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