diff --git a/baystation12.dme b/baystation12.dme
index 721aad43e7..51ebc82859 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -783,6 +783,7 @@
#include "code\modules\admin\verbs\adminjump.dm"
#include "code\modules\admin\verbs\adminpm.dm"
#include "code\modules\admin\verbs\adminsay.dm"
+#include "code\modules\admin\verbs\antag-ooc.dm"
#include "code\modules\admin\verbs\atmosdebug.dm"
#include "code\modules\admin\verbs\BrokenInhands.dm"
#include "code\modules\admin\verbs\buildmode.dm"
diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm
index e96bc3b4da..c26d86858d 100644
--- a/code/game/verbs/who.dm
+++ b/code/game/verbs/who.dm
@@ -25,6 +25,20 @@
entry += " - DEAD"
else
entry += " - DEAD"
+
+ var/age
+ if(isnum(C.player_age))
+ age = C.player_age
+ else
+ age = 0
+
+ if(age <= 1)
+ age = "[age]"
+ else if(age < 10)
+ age = "[age]"
+
+ entry += " - [age]"
+
if(is_special_character(C.mob))
entry += " - Antagonist"
entry += " (?)"
diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm
index 804116fede..32e633a200 100644
--- a/code/modules/admin/DB ban/functions.dm
+++ b/code/modules/admin/DB ban/functions.dm
@@ -1,5 +1,6 @@
-datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = -1, var/reason, var/job = "", var/rounds = 0, var/banckey = null)
+//Either pass the mob you wish to ban in the 'banned_mob' attribute, or the banckey, banip and bancid variables. If both are passed, the mob takes priority! If a mob is not passed, banckey is the minimum that needs to be passed! banip and bancid are optional.
+datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = -1, var/reason, var/job = "", var/rounds = 0, var/banckey = null, var/banip = null, var/bancid = null)
if(!check_rights(R_MOD,0) && !check_rights(R_BAN)) return
@@ -40,6 +41,8 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
ip = banned_mob.client.address
else if(banckey)
ckey = ckey(banckey)
+ computerid = bancid
+ ip = banip
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_player WHERE ckey = '[ckey]'")
query.Execute()
@@ -260,7 +263,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
holder.DB_ban_panel()
-/datum/admins/proc/DB_ban_panel(var/playerckey = null, var/adminckey = null)
+/datum/admins/proc/DB_ban_panel(var/playerckey = null, var/adminckey = null, var/playerip = null, var/playercid = null, var/dbbantype = null, var/match = null)
if(!usr.client)
return
@@ -282,16 +285,18 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
output += "
"
- output += "Please note that all jobban bans or unbans are in-effect the following round."
+ output += "Please note that all jobban bans or unbans are in-effect the following round.
"
+ output += "This search shows only last 100 bans."
- if(adminckey || playerckey)
-
- var/blcolor = "#ffeeee" //banned light
- var/bdcolor = "#ffdddd" //banned dark
- var/ulcolor = "#eeffee" //unbanned light
- var/udcolor = "#ddffdd" //unbanned dark
-
- output += ""
- output += ""
- output += "| TYPE | "
- output += "CKEY | "
- output += "TIME APPLIED | "
- output += "ADMIN | "
- output += "OPTIONS | "
- output += "
"
+ if(adminckey || playerckey || playerip || playercid || dbbantype)
adminckey = ckey(adminckey)
playerckey = ckey(playerckey)
- var/adminsearch = ""
- var/playersearch = ""
- if(adminckey)
- adminsearch = "AND a_ckey = '[adminckey]' "
- if(playerckey)
- playersearch = "AND ckey = '[playerckey]' "
+ playerip = sql_sanitize_text(playerip)
+ playercid = sql_sanitize_text(playercid)
- var/DBQuery/select_query = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits FROM erro_ban WHERE 1 [playersearch] [adminsearch] ORDER BY bantime DESC")
- select_query.Execute()
+ if(adminckey || playerckey || playerip || playercid || dbbantype)
- while(select_query.NextRow())
- var/banid = select_query.item[1]
- var/bantime = select_query.item[2]
- var/bantype = select_query.item[3]
- var/reason = select_query.item[4]
- var/job = select_query.item[5]
- var/duration = select_query.item[6]
- var/expiration = select_query.item[7]
- var/ckey = select_query.item[8]
- var/ackey = select_query.item[9]
- var/unbanned = select_query.item[10]
- var/unbanckey = select_query.item[11]
- var/unbantime = select_query.item[12]
- var/edits = select_query.item[13]
+ var/blcolor = "#ffeeee" //banned light
+ var/bdcolor = "#ffdddd" //banned dark
+ var/ulcolor = "#eeffee" //unbanned light
+ var/udcolor = "#ddffdd" //unbanned dark
- var/lcolor = blcolor
- var/dcolor = bdcolor
- if(unbanned)
- lcolor = ulcolor
- dcolor = udcolor
-
- var/typedesc =""
- switch(bantype)
- if("PERMABAN")
- typedesc = "PERMABAN"
- if("TEMPBAN")
- typedesc = "TEMPBAN
([duration] minutes [(unbanned) ? "" : "(Edit))"]
Expires [expiration]"
- if("JOB_PERMABAN")
- typedesc = "JOBBAN
([job])"
- if("JOB_TEMPBAN")
- typedesc = "TEMP JOBBAN
([job])
([duration] minutes
Expires [expiration]"
-
- output += ""
- output += "| [typedesc] | "
- output += "[ckey] | "
- output += "[bantime] | "
- output += "[ackey] | "
- output += "[(unbanned) ? "" : "Unban"] | "
+ output += ""
+ output += ""
+ output += "| TYPE | "
+ output += "CKEY | "
+ output += "TIME APPLIED | "
+ output += "ADMIN | "
+ output += "OPTIONS | "
output += "
"
- output += ""
- output += "| Reason: [(unbanned) ? "" : "(Edit)"] \"[reason]\" | "
- output += "
"
- if(edits)
+
+ var/adminsearch = ""
+ var/playersearch = ""
+ var/ipsearch = ""
+ var/cidsearch = ""
+ var/bantypesearch = ""
+
+ if(!match)
+ if(adminckey)
+ adminsearch = "AND a_ckey = '[adminckey]' "
+ if(playerckey)
+ playersearch = "AND ckey = '[playerckey]' "
+ if(playerip)
+ ipsearch = "AND ip = '[playerip]' "
+ if(playercid)
+ cidsearch = "AND computerid = '[playercid]' "
+ else
+ if(adminckey && lentext(adminckey) >= 3)
+ adminsearch = "AND a_ckey LIKE '[adminckey]%' "
+ if(playerckey && lentext(playerckey) >= 3)
+ playersearch = "AND ckey LIKE '[playerckey]%' "
+ if(playerip && lentext(playerip) >= 3)
+ ipsearch = "AND ip LIKE '[playerip]%' "
+ if(playercid && lentext(playercid) >= 7)
+ cidsearch = "AND computerid LIKE '[playercid]%' "
+
+ if(dbbantype)
+ bantypesearch = "AND bantype = "
+
+ switch(dbbantype)
+ if(BANTYPE_TEMP)
+ bantypesearch += "'TEMPBAN' "
+ if(BANTYPE_JOB_PERMA)
+ bantypesearch += "'JOB_PERMABAN' "
+ if(BANTYPE_JOB_TEMP)
+ bantypesearch += "'JOB_TEMPBAN' "
+ else
+ bantypesearch += "'PERMABAN' "
+
+ var/DBQuery/select_query = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits, ip, computerid FROM erro_ban WHERE 1 [playersearch] [adminsearch] [ipsearch] [cidsearch] [bantypesearch] ORDER BY bantime DESC LIMIT 100")
+ select_query.Execute()
+
+ while(select_query.NextRow())
+ var/banid = select_query.item[1]
+ var/bantime = select_query.item[2]
+ var/bantype = select_query.item[3]
+ var/reason = select_query.item[4]
+ var/job = select_query.item[5]
+ var/duration = select_query.item[6]
+ var/expiration = select_query.item[7]
+ var/ckey = select_query.item[8]
+ var/ackey = select_query.item[9]
+ var/unbanned = select_query.item[10]
+ var/unbanckey = select_query.item[11]
+ var/unbantime = select_query.item[12]
+ var/edits = select_query.item[13]
+ var/ip = select_query.item[14]
+ var/cid = select_query.item[15]
+
+ var/lcolor = blcolor
+ var/dcolor = bdcolor
+ if(unbanned)
+ lcolor = ulcolor
+ dcolor = udcolor
+
+ var/typedesc =""
+ switch(bantype)
+ if("PERMABAN")
+ typedesc = "PERMABAN"
+ if("TEMPBAN")
+ typedesc = "TEMPBAN
([duration] minutes [(unbanned) ? "" : "(Edit))"]
Expires [expiration]"
+ if("JOB_PERMABAN")
+ typedesc = "JOBBAN
([job])"
+ if("JOB_TEMPBAN")
+ typedesc = "TEMP JOBBAN
([job])
([duration] minutes
Expires [expiration]"
+
output += ""
- output += "| EDITS | "
+ output += "[typedesc] | "
+ output += "[ckey] | "
+ output += "[bantime] | "
+ output += "[ackey] | "
+ output += "[(unbanned) ? "" : "Unban"] | "
+ output += "
"
+ output += ""
+ output += "| IP: [ip] | "
+ output += "CIP: [cid] | "
output += "
"
output += ""
- output += "| [edits] | "
+ output += "Reason: [(unbanned) ? "" : "(Edit)"] \"[reason]\" | "
output += "
"
- if(unbanned)
- output += ""
- output += "| UNBANNED by admin [unbanckey] on [unbantime] | "
+ if(edits)
+ output += "
"
+ output += "| EDITS | "
+ output += "
"
+ output += ""
+ output += "| [edits] | "
+ output += "
"
+ if(unbanned)
+ output += ""
+ output += "| UNBANNED by admin [unbanckey] on [unbantime] | "
+ output += "
"
+ output += ""
+ output += "|   | "
output += "
"
- output += ""
- output += "|   | "
- output += "
"
- output += "
"
+ output += "
"
- usr << browse(output,"window=lookupbans;size=900x500")
\ No newline at end of file
+ usr << browse(output,"window=lookupbans;size=900x700")
\ No newline at end of file
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index ad1f1873f5..427e42fcc5 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -80,6 +80,7 @@ var/list/admin_verbs_admin = list(
/client/proc/allow_character_respawn, /* Allows a ghost to respawn */
/client/proc/event_manager_panel,
/client/proc/empty_ai_core_toggle_latejoin,
+ /client/proc/aooc,
/client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
/client/proc/change_human_appearance_self /* Allows the human-based mob itself change its basic appearance */
)
@@ -89,7 +90,8 @@ var/list/admin_verbs_ban = list(
)
var/list/admin_verbs_sounds = list(
/client/proc/play_local_sound,
- /client/proc/play_sound
+ /client/proc/play_sound,
+ /client/proc/play_server_sound
)
var/list/admin_verbs_fun = list(
/client/proc/object_talk,
@@ -208,6 +210,7 @@ var/list/admin_verbs_hideable = list(
/client/proc/check_words,
/client/proc/play_local_sound,
/client/proc/play_sound,
+ /client/proc/play_server_sound,
/client/proc/object_talk,
/client/proc/cmd_admin_dress,
/client/proc/cmd_admin_gib_self,
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 750af5e4d9..1f98e4ee3a 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -52,11 +52,18 @@
log_admin("[key_name(usr)] has spawned vox raiders.")
if(!src.makeVoxRaiders())
usr << "\red Unfortunately there weren't enough candidates available."
- else if(href_list["dbsearchckey"] || href_list["dbsearchadmin"])
+ else if(href_list["dbsearchckey"] || href_list["dbsearchadmin"] || href_list["dbsearchip"] || href_list["dbsearchcid"] || href_list["dbsearchbantype"])
var/adminckey = href_list["dbsearchadmin"]
var/playerckey = href_list["dbsearchckey"]
+ var/playerip = href_list["dbsearchip"]
+ var/playercid = href_list["dbsearchcid"]
+ var/dbbantype = text2num(href_list["dbsearchbantype"])
+ var/match = 0
- DB_ban_panel(playerckey, adminckey)
+ if("dbmatch" in href_list)
+ match = 1
+
+ DB_ban_panel(playerckey, adminckey, playerip, playercid, dbbantype, match)
return
else if(href_list["dbbanedit"])
@@ -72,6 +79,8 @@
var/bantype = text2num(href_list["dbbanaddtype"])
var/banckey = href_list["dbbanaddckey"]
+ var/banip = href_list["dbbanaddip"]
+ var/bancid = href_list["dbbanaddcid"]
var/banduration = text2num(href_list["dbbaddduration"])
var/banjob = href_list["dbbanaddjob"]
var/banreason = href_list["dbbanreason"]
@@ -107,9 +116,18 @@
playermob = M
break
+
banreason = "(MANUAL BAN) "+banreason
- DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey)
+ if(!playermob)
+ if(banip)
+ banreason = "[banreason] (CUSTOM IP)"
+ if(bancid)
+ banreason = "[banreason] (CUSTOM CID)"
+ else
+ message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob")
+
+ DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey, banip, bancid )
else if(href_list["editrights"])
if(!check_rights(R_PERMISSIONS))
diff --git a/code/modules/admin/verbs/antag-ooc.dm b/code/modules/admin/verbs/antag-ooc.dm
new file mode 100644
index 0000000000..82e81c0595
--- /dev/null
+++ b/code/modules/admin/verbs/antag-ooc.dm
@@ -0,0 +1,19 @@
+/client/proc/aooc(msg as text)
+ set category = "OOC"
+ set name = "AOOC"
+ set desc = "Antagonist OOC"
+
+ if(!check_rights(R_ADMIN)) return
+
+ msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN))
+ if(!msg) return
+
+ var/display_name = src.key
+ if(holder && holder.fakekey)
+ display_name = holder.fakekey
+
+ for(var/mob/M in mob_list)
+ if((M.mind && M.mind.special_role && M.client) || (M.client && M.client.holder))
+ M << "" + create_text_tag("aooc", "Antag-OOC:", M.client) + " [display_name]: [msg]"
+
+ log_ooc("(ANTAG) [key] : [msg]")
\ No newline at end of file
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 6ff66c4647..3a4b40d985 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -1,3 +1,5 @@
+var/list/sounds_cache = list()
+
/client/proc/play_sound(S as sound)
set category = "Fun"
set name = "Play Global Sound"
@@ -6,6 +8,11 @@
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
uploaded_sound.priority = 250
+ sounds_cache += S
+
+ if(alert("Do you ready?\nSong: [S]\nNow you can also play this sound using \"Play Server Sound\".", "Confirmation request" ,"Play", "Cancel") == "Cancel")
+ return
+
log_admin("[key_name(src)] played sound [S]")
message_admins("[key_name_admin(src)] played sound [S]", 1)
for(var/mob/M in player_list)
@@ -14,7 +21,6 @@
feedback_add_details("admin_verb","PGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-
/client/proc/play_local_sound(S as sound)
set category = "Fun"
set name = "Play Local Sound"
@@ -26,6 +32,22 @@
feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+/client/proc/play_server_sound()
+ set category = "Fun"
+ set name = "Play Server Sound"
+ if(!check_rights(R_SOUNDS)) return
+
+ var/list/sounds = file2list("sound/serversound_list.txt");
+ sounds += "--CANCEL--"
+ sounds += sounds_cache
+
+ var/melody = input("Select a sound from the server to play", "Server sound list", "--CANCEL--") in sounds
+
+ if(melody == "--CANCEL--") return
+
+ play_sound(melody)
+ feedback_add_details("admin_verb","PSS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+
/*
/client/proc/cuban_pete()
set category = "Fun"
diff --git a/icons/chattags.dmi b/icons/chattags.dmi
index 317ce5a992..5cfdcd689d 100644
Binary files a/icons/chattags.dmi and b/icons/chattags.dmi differ
diff --git a/sound/serversound_list.txt b/sound/serversound_list.txt
new file mode 100644
index 0000000000..24cbafaf15
--- /dev/null
+++ b/sound/serversound_list.txt
@@ -0,0 +1,11 @@
+sound/music/1.ogg
+sound/music/b12_combined_start.ogg
+sound/music/main.ogg
+sound/music/space.ogg
+sound/music/space_asshole.ogg
+sound/music/space_oddity.ogg
+sound/music/title1.ogg
+sound/music/title2.ogg
+sound/music/traitor.ogg
+sound/items/bikehorn.ogg
+sound/effects/siren.ogg
\ No newline at end of file