From 2ad8d26aebfcf7caa9ee19fbce75ac54e43c5e5f Mon Sep 17 00:00:00 2001 From: volas Date: Mon, 9 Mar 2015 11:01:00 +0300 Subject: [PATCH 1/8] Play server sound verb for admins --- code/modules/admin/admin_verbs.dm | 4 +++- code/modules/admin/verbs/playsound.dm | 24 +++++++++++++++++++++++- sound/serversound_list.txt | 11 +++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 sound/serversound_list.txt diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 6b079ef1ac..cc31febed8 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -87,7 +87,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, @@ -206,6 +207,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/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/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 From c7573a0d11a37dc2dfd14699a30a8bb687fe2eb8 Mon Sep 17 00:00:00 2001 From: volas Date: Mon, 9 Mar 2015 11:57:40 +0300 Subject: [PATCH 2/8] Antag-OOC --- baystation12.dme | 1 + code/modules/admin/admin_verbs.dm | 3 ++- code/modules/admin/verbs/antag-ooc.dm | 18 ++++++++++++++++++ icons/chattags.dmi | Bin 1147 -> 1275 bytes 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 code/modules/admin/verbs/antag-ooc.dm diff --git a/baystation12.dme b/baystation12.dme index a8ceac79f0..82d3fd6102 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -782,6 +782,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/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index cc31febed8..ceb093c5d6 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -79,7 +79,8 @@ var/list/admin_verbs_admin = list( /client/proc/toggle_antagHUD_restrictions, /client/proc/allow_character_respawn, /* Allows a ghost to respawn */ /client/proc/event_manager_panel, - /client/proc/empty_ai_core_toggle_latejoin + /client/proc/empty_ai_core_toggle_latejoin, + /client/proc/aooc ) var/list/admin_verbs_ban = list( /client/proc/unban_panel, diff --git a/code/modules/admin/verbs/antag-ooc.dm b/code/modules/admin/verbs/antag-ooc.dm new file mode 100644 index 0000000000..65cf596bab --- /dev/null +++ b/code/modules/admin/verbs/antag-ooc.dm @@ -0,0 +1,18 @@ +/client/proc/aooc() + set category = "Admin" + set name = "Antag OOC" + + if(!check_rights(R_ADMIN)) return + + var/msg = sanitize(copytext(input(usr, "", "Antag OOC") as text, 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-OOC: [key] : [msg]") \ No newline at end of file diff --git a/icons/chattags.dmi b/icons/chattags.dmi index 317ce5a992b23e3e37dc1c87c9789a1a03a4341e..5cfdcd689dbbc23276a5c8e26ead700deee7e233 100644 GIT binary patch delta 1246 zcmV<41R?wT2>S_;7g;V=-0C=2@(6I`_ zFcgL1Irk|J?JljlW|0=@(7r+l=4t{-Q_`rf?;tpuY-jl3z~ACBUZ(}aJkg8O?&1oO zZyA5aTSLOQv_qmNaZft%cmIs9LD~ej7FCF*XbkHz+JdUM+k%SET*;L7bu?Q}MQGV? z;RZTa#*hKPSyaRdUIohe>uAwR2Ys?Pa7 zBAaACXpj6cXnSI08UI%!G4lHEWNka0Hpai5PS;WZ@ZtB1gt-|y0D$Ko-GyDC?E{1j~MZk;PKUBXyu0zssKTt z1XbWybfCddIH1*Ek_oW_z=MA(fxaPXee?YlWuR1o%qjn>Q#PG(1n#T^rBLqy?U6qQ z?eb~Xm=Y_WW@|0iHOAj^-JTNkRv~e;-~s@gLcs|CH~^~)7%c(M`QcQ8NhmSd!$Pwe zXgkGX$j0n(`N=!M04yu)AZyDU*E_$JcY;o_7;=!cWsXyUqWA}MC#Ziueg=v{v#FgG zY9SO?iBaVf1DY!t>Q9vq1$6-8D6u|fK-BtX`-JW|8-qB1H9mxRXb*y4v{_R8BYzCq zrj^)urDBYKyi(~Y!NQ)CFn14|-tU5AhQC#*z{>AAW=mjWNR^u>;+I*sz&$KQ7)=&a`h!4YN7 zus|w=qE4Lkr^fMt(T3=b4-l_%1obKnK-3Ad)#k^=b{-I4i|dThK;M-hpYjUl<0-*z zHy9AUt&jG|AA|Ph?3ghnwmCaC9Cw2G4KsIga9!kbIRL16KgoI`mxJ}m@Q0!ICLH%c zs07R0rgGrhS*d5bHV!)&f&d7W7@IKfi0GNjCP0$^Bt>H6zb7aSK)KrutR|HS_Z`vz z99UK$g%#<1FQNTCK^{~#sBA<4lRo=H82Mw+eq~UJdE7?v4*?Ai2T^Z*761SM07*qo IM6N<$f^G9!7ytkO delta 1117 zcmV-j1fu)<3Hu0;7g#a~1^@s6?1SAD0001;dQ@0+L}hbha%pgMX>V=-0C=2@&9Mr? zFce1NIrk}k+Fe?8%_1q%p?!rC%+&;%CZthc-$8JbWIMwLr^RKsjx*FW(u>pX!UmCW z8GnRZL&CVUL!u{fPulahe`c*g+IY7Wl@F$94C^wAeyP|+zl3M5WQ$(wXttb+(DEAp zp%%lepr(;NjMsZS-}u(7000A-Nkl`DQ@9&N19~6rXtNgCH4&Y0U!m*c_ z-+uv<`UUheFGcsN8f#B4w6r+|q}tzBR9MXGjss}uRpyvBVTu6eSY=JXbJp$y8x5= z2`9LHGZ*V|I&~f6PN%NPexknA^M4{xx=;W(`*D}xwiZhXp69j}OR7g7+8}n|)2VCz zMISgS8PUEXj(=W=8A_i53x*GBYq2EcsKoL5&pv=6spb7tL9PJFl6`W}c7kkGs1n2a zZQso4BvI)ERiNseaT=RoF!slwJ$v3Y=EP>tyN%7dYfOK$?)IJF_rHH~)_?9}7G(gy z+10%f{SE-DT51_Bf#zKmCiSIvg3a62hwp1Izmiu0T0CFeT>&4ramE;(o4eC3= zXyEKSACxFL{5S&Y-Jb;)4V)!Hln@5iM~rMvuz9v1S`TmMBP=7i>7F2ZBDNbh`fk!(*Db#yFF!slwy>n4E=EQa`%8ici z8`JOje%}d(vyeMF@Bsjx;~3GO1Yq?5qa_dqKblT34<{!3(P_71ZLd;EaE#BYPu>Z} zU|GokSz8vk-ubP(6Z9&TM1ZU<3!F+6r9YfILG|%7R5as1uOIi4AZCq^)nZPw0-bF^uz9@Yqh=; zbdJ58wfoo$KON7Eey3K0wS4TEErAas>IA*rI;BGCTta14|?P4jz1f8b8g+g*+&N3?QA1yUoF_QhF$Y8;;! zZHVsp0P!rRaIew?qmwNZW6<84 jpD^ac_U0#y-wFN$#nIDA3E Date: Mon, 9 Mar 2015 14:20:31 +0300 Subject: [PATCH 3/8] 'Who' verb now shows the age of players on the server for admins --- code/game/verbs/who.dm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 += " (?)" From 64d6012399012b5b3d8a06baad8de47bd6d88e42 Mon Sep 17 00:00:00 2001 From: errorage Date: Tue, 16 Jul 2013 07:26:51 +0200 Subject: [PATCH 4/8] Added the ability to define the ip and computer id for a manual ban (in the banning panel). This is so mirroring bans or banning people who were not online during the round in progress does not require admins to spawn a mob, set their variables and then ban the mob. If however an admin attempts to add a manual ban for a player who was present during the current round, a player who still has a mob somewhere in the game world, the proc will prioritize the mob's ip and computer id variables, not the things entered in the banning panel form. --- code/modules/admin/DB ban/functions.dm | 7 ++++++- code/modules/admin/topic.dm | 13 ++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index 804116fede..50f229ceaf 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() @@ -290,6 +293,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) output += "" output += "" output += "Ckey: " + output += "IP: " + output += "Computer id: " output += "Duration: " output += "Job:" output += "" - output += "" - output += "" - output += "" - output += "" - output += "" - output += "" + output += "" + output += "" + output += "" + output += "" output += "
Ban type:Ban type:Ckey:
IP: Computer id:
Duration: Job:Ckey:
IP: CID:
Duration: Job:
" - output += "
Search: " - output += "" - output += "Ckey: " - output += "Admin ckey: " - output += "" + output += "" + output += "" + output += "" + output += "" + output += "
Search:" + output += "
Ckey: Admin ckey:
IP: CID:
" + output += "

" + output += " Match(min. 3 characters to search)
" output += "
" output += "Please note that all jobban bans or unbans are in-effect the following round." - if(adminckey || playerckey) + if(adminckey || playerckey || playerip || playercid) var/blcolor = "#ffeeee" //banned light var/bdcolor = "#ffdddd" //banned dark @@ -339,14 +342,33 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) adminckey = ckey(adminckey) playerckey = ckey(playerckey) + playerip = sql_sanitize_text(playerip) + playercid = sql_sanitize_text(playercid) + var/adminsearch = "" var/playersearch = "" - if(adminckey) - adminsearch = "AND a_ckey = '[adminckey]' " - if(playerckey) - playersearch = "AND ckey = '[playerckey]' " + var/ipsearch = "" + var/cidsearch = "" + 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) > 3) + cidsearch = "AND computerid LIKE '[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") + 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] ORDER BY bantime DESC") select_query.Execute() while(select_query.NextRow()) @@ -363,6 +385,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) 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 @@ -388,6 +412,10 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) output += "[ackey]" output += "[(unbanned) ? "" : "Unban"]" output += "" + output += "" + output += "IP: [ip]" + output += "CIP: [cid]" + output += "" output += "" output += "Reason: [(unbanned) ? "" : "(Edit)"] \"[reason]\"" output += "" @@ -408,4 +436,4 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) 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/topic.dm b/code/modules/admin/topic.dm index c9d3306797..0471d4b2e5 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -52,11 +52,16 @@ 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"]) var/adminckey = href_list["dbsearchadmin"] var/playerckey = href_list["dbsearchckey"] + var/playerip = href_list["dbsearchip"] + var/playercid = href_list["dbsearchcid"] + var/match = 0 + if("dbmatch" in href_list) + match = 1 - DB_ban_panel(playerckey, adminckey) + DB_ban_panel(playerckey, adminckey, playerip, playercid, match) return else if(href_list["dbbanedit"]) From ca079144249b3cb010f50a8cf4dfc26e25445e8a Mon Sep 17 00:00:00 2001 From: volas Date: Thu, 10 Apr 2014 00:45:51 +0400 Subject: [PATCH 6/8] Ability to search bans by bantype --- code/modules/admin/DB ban/functions.dm | 225 ++++++++++++++----------- code/modules/admin/topic.dm | 6 +- 2 files changed, 129 insertions(+), 102 deletions(-) diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index d5354dfa41..ae8c8c4865 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -263,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, var/playerip = null, var/playercid = null, var/match = 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 @@ -318,122 +318,147 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) output += "Ckey: " output += "Admin ckey: " output += "IP: " - output += "CID: " + output += "CID: " + output += "Ban type:" output += "

" - output += " Match(min. 3 characters to search)
" + output += " Match(min. 3 characters to search by key or ip, and 7 to search by cid)
" 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 || playerip || playercid) - - var/blcolor = "#ffeeee" //banned light - var/bdcolor = "#ffdddd" //banned dark - var/ulcolor = "#eeffee" //unbanned light - var/udcolor = "#ddffdd" //unbanned dark - - output += "" - output += "" - output += "" - output += "" - output += "" - output += "" - output += "" - output += "" + if(adminckey || playerckey || playerip || playercid || dbbantype) adminckey = ckey(adminckey) playerckey = ckey(playerckey) playerip = sql_sanitize_text(playerip) playercid = sql_sanitize_text(playercid) - var/adminsearch = "" - var/playersearch = "" - var/ipsearch = "" - var/cidsearch = "" - 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) > 3) - cidsearch = "AND computerid LIKE '[playercid]%' " + if(adminckey || playerckey || playerip || playercid || dbbantype) - 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] ORDER BY bantime DESC") - select_query.Execute() + var/blcolor = "#ffeeee" //banned light + var/bdcolor = "#ffdddd" //banned dark + var/ulcolor = "#eeffee" //unbanned light + var/udcolor = "#ddffdd" //unbanned dark - 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 += "" - output += "" - output += "" - output += "" - output += "" + output += "
TYPECKEYTIME APPLIEDADMINOPTIONS
[typedesc][ckey][bantime][ackey][(unbanned) ? "" : "Unban"]
" + output += "" + output += "" + output += "" + output += "" + output += "" + output += "" output += "" - output += "" - output += "" - output += "" - output += "" - output += "" - output += "" - 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 += "" + output += "" + output += "" + output += "" + output += "" + output += "" + output += "" + output += "" + output += "" + output += "" output += "" output += "" - output += "" + output += "" output += "" - if(unbanned) - output += "" - output += "" + if(edits) + output += "" + output += "" + output += "" + output += "" + output += "" + output += "" + if(unbanned) + output += "" + output += "" + output += "" + output += "" + output += "" output += "" - output += "" - output += "" - output += "" - output += "
TYPECKEYTIME APPLIEDADMINOPTIONS
IP: [ip]CIP: [cid]
Reason: [(unbanned) ? "" : "(Edit)"] \"[reason]\"
EDITS[typedesc][ckey][bantime][ackey][(unbanned) ? "" : "Unban"]
IP: [ip]CIP: [cid]
[edits]Reason: [(unbanned) ? "" : "(Edit)"] \"[reason]\"
UNBANNED by admin [unbanckey] on [unbantime]
EDITS
[edits]
UNBANNED by admin [unbanckey] on [unbantime]
 
 
" + output += "" usr << browse(output,"window=lookupbans;size=900x700") \ No newline at end of file diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 0471d4b2e5..1f98e4ee3a 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -52,16 +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"] || href_list["dbsearchip"] || href_list["dbsearchcid"]) + 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 + if("dbmatch" in href_list) match = 1 - DB_ban_panel(playerckey, adminckey, playerip, playercid, match) + DB_ban_panel(playerckey, adminckey, playerip, playercid, dbbantype, match) return else if(href_list["dbbanedit"]) From a9b30da7cc679116bf9be6b45c51312824c7dc0b Mon Sep 17 00:00:00 2001 From: volas Date: Mon, 9 Mar 2015 16:53:08 +0300 Subject: [PATCH 7/8] Small correction --- code/modules/admin/DB ban/functions.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index ae8c8c4865..32e633a200 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -371,13 +371,13 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) if(playercid) cidsearch = "AND computerid = '[playercid]' " else - if(adminckey && lentext(adminckey) > 3) + if(adminckey && lentext(adminckey) >= 3) adminsearch = "AND a_ckey LIKE '[adminckey]%' " - if(playerckey && lentext(playerckey) > 3) + if(playerckey && lentext(playerckey) >= 3) playersearch = "AND ckey LIKE '[playerckey]%' " - if(playerip && lentext(playerip) > 3) + if(playerip && lentext(playerip) >= 3) ipsearch = "AND ip LIKE '[playerip]%' " - if(playercid && lentext(playercid) > 7) + if(playercid && lentext(playercid) >= 7) cidsearch = "AND computerid LIKE '[playercid]%' " if(dbbantype) From 5fa66b2a8afcc9cbc52730096ff26f596aa38a85 Mon Sep 17 00:00:00 2001 From: volas Date: Mon, 9 Mar 2015 22:59:52 +0300 Subject: [PATCH 8/8] Changes to aooc --- code/modules/admin/verbs/antag-ooc.dm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/modules/admin/verbs/antag-ooc.dm b/code/modules/admin/verbs/antag-ooc.dm index 65cf596bab..82e81c0595 100644 --- a/code/modules/admin/verbs/antag-ooc.dm +++ b/code/modules/admin/verbs/antag-ooc.dm @@ -1,10 +1,11 @@ -/client/proc/aooc() - set category = "Admin" - set name = "Antag OOC" +/client/proc/aooc(msg as text) + set category = "OOC" + set name = "AOOC" + set desc = "Antagonist OOC" if(!check_rights(R_ADMIN)) return - var/msg = sanitize(copytext(input(usr, "", "Antag OOC") as text, 1, MAX_MESSAGE_LEN)) + msg = sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)) if(!msg) return var/display_name = src.key @@ -15,4 +16,4 @@ 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-OOC: [key] : [msg]") \ No newline at end of file + log_ooc("(ANTAG) [key] : [msg]") \ No newline at end of file