mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Pretty sure this works, can't test because i can't connect to my sql db for some reason
This commit is contained in:
@@ -684,6 +684,7 @@
|
|||||||
#include "code\modules\admin\admin_memo.dm"
|
#include "code\modules\admin\admin_memo.dm"
|
||||||
#include "code\modules\admin\admin_ranks.dm"
|
#include "code\modules\admin\admin_ranks.dm"
|
||||||
#include "code\modules\admin\admin_verbs.dm"
|
#include "code\modules\admin\admin_verbs.dm"
|
||||||
|
#include "code\modules\admin\banappearance.dm"
|
||||||
#include "code\modules\admin\banjob.dm"
|
#include "code\modules\admin\banjob.dm"
|
||||||
#include "code\modules\admin\create_mob.dm"
|
#include "code\modules\admin\create_mob.dm"
|
||||||
#include "code\modules\admin\create_object.dm"
|
#include "code\modules\admin\create_object.dm"
|
||||||
@@ -1283,7 +1284,6 @@
|
|||||||
#include "code\WorkInProgress\autopsy.dm"
|
#include "code\WorkInProgress\autopsy.dm"
|
||||||
#include "code\WorkInProgress\buildmode.dm"
|
#include "code\WorkInProgress\buildmode.dm"
|
||||||
#include "code\WorkInProgress\explosion_particles.dm"
|
#include "code\WorkInProgress\explosion_particles.dm"
|
||||||
#include "code\WorkInProgress\periodic_news.dm"
|
|
||||||
#include "code\WorkInProgress\Cael_Aislinn\meteor_battery.dm"
|
#include "code\WorkInProgress\Cael_Aislinn\meteor_battery.dm"
|
||||||
#include "code\WorkInProgress\Cael_Aislinn\sculpture.dm"
|
#include "code\WorkInProgress\Cael_Aislinn\sculpture.dm"
|
||||||
#include "code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm"
|
#include "code\WorkInProgress\Cael_Aislinn\Economy\Accounts.dm"
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ datum/controller/game_controller/proc/process()
|
|||||||
controller_iteration++
|
controller_iteration++
|
||||||
|
|
||||||
vote.process()
|
vote.process()
|
||||||
process_newscaster()
|
//process_newscaster()
|
||||||
|
|
||||||
//AIR
|
//AIR
|
||||||
|
|
||||||
|
|||||||
@@ -357,8 +357,8 @@
|
|||||||
heads += player.mind
|
heads += player.mind
|
||||||
return heads
|
return heads
|
||||||
|
|
||||||
/datum/game_mode/New()
|
/*/datum/game_mode/New()
|
||||||
newscaster_announcements = pick(newscaster_standard_feeds)
|
newscaster_announcements = pick(newscaster_standard_feeds)*/
|
||||||
|
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
//Reports player logouts//
|
//Reports player logouts//
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
|||||||
if(BANTYPE_JOB_TEMP)
|
if(BANTYPE_JOB_TEMP)
|
||||||
bantype_str = "JOB_TEMPBAN"
|
bantype_str = "JOB_TEMPBAN"
|
||||||
bantype_pass = 1
|
bantype_pass = 1
|
||||||
|
if(BANTYPE_APPEARANCE)
|
||||||
|
bantype_str = "APPEARANCE_PERMABAN"
|
||||||
|
bantype_pass = 1
|
||||||
if( !bantype_pass ) return
|
if( !bantype_pass ) return
|
||||||
if( !istext(reason) ) return
|
if( !istext(reason) ) return
|
||||||
if( !isnum(duration) ) return
|
if( !isnum(duration) ) return
|
||||||
@@ -104,6 +107,9 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
|||||||
if(BANTYPE_JOB_TEMP)
|
if(BANTYPE_JOB_TEMP)
|
||||||
bantype_str = "JOB_TEMPBAN"
|
bantype_str = "JOB_TEMPBAN"
|
||||||
bantype_pass = 1
|
bantype_pass = 1
|
||||||
|
if(BANTYPE_APPEARANCE)
|
||||||
|
bantype_str = "APPEARANCE_PERMABAN"
|
||||||
|
bantype_pass = 1
|
||||||
if(BANTYPE_ANY_FULLBAN)
|
if(BANTYPE_ANY_FULLBAN)
|
||||||
bantype_str = "ANY"
|
bantype_str = "ANY"
|
||||||
bantype_pass = 1
|
bantype_pass = 1
|
||||||
@@ -288,6 +294,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
|||||||
output += "<option value='[BANTYPE_TEMP]'>TEMPBAN</option>"
|
output += "<option value='[BANTYPE_TEMP]'>TEMPBAN</option>"
|
||||||
output += "<option value='[BANTYPE_JOB_PERMA]'>JOB PERMABAN</option>"
|
output += "<option value='[BANTYPE_JOB_PERMA]'>JOB PERMABAN</option>"
|
||||||
output += "<option value='[BANTYPE_JOB_TEMP]'>JOB TEMPBAN</option>"
|
output += "<option value='[BANTYPE_JOB_TEMP]'>JOB TEMPBAN</option>"
|
||||||
|
output += "<option value='[BANTYPE_APPEARANCE]'>APPEARANCE BAN</option>"
|
||||||
output += "</select></td>"
|
output += "</select></td>"
|
||||||
output += "<td><b>Ckey:</b> <input type='text' name='dbbanaddckey'></td></tr>"
|
output += "<td><b>Ckey:</b> <input type='text' name='dbbanaddckey'></td></tr>"
|
||||||
output += "<tr><td><b>Duration:</b> <input type='text' name='dbbaddduration'></td>"
|
output += "<tr><td><b>Duration:</b> <input type='text' name='dbbaddduration'></td>"
|
||||||
@@ -375,6 +382,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
|||||||
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])"
|
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])"
|
||||||
if("JOB_TEMPBAN")
|
if("JOB_TEMPBAN")
|
||||||
typedesc = "<b>TEMP JOBBAN</b><br><font size='2'>([job])<br>([duration] minutes<br>Expires [expiration]"
|
typedesc = "<b>TEMP JOBBAN</b><br><font size='2'>([job])<br>([duration] minutes<br>Expires [expiration]"
|
||||||
|
if("APPEARANCE_PERMABAN")
|
||||||
|
typedesc = "<b>APPEARANCE/NAME BAN</b>"
|
||||||
|
|
||||||
output += "<tr bgcolor='[dcolor]'>"
|
output += "<tr bgcolor='[dcolor]'>"
|
||||||
output += "<td align='center'>[typedesc]</td>"
|
output += "<td align='center'>[typedesc]</td>"
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ var/global/floorIsLava = 0
|
|||||||
body += "<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> | "
|
body += "<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> | "
|
||||||
body += "<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> | "
|
body += "<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> | "
|
||||||
body += "<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A> | "
|
body += "<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A> | "
|
||||||
|
body += "<A href='?src=\ref[src];appearanceban=\ref[M]'>Appearance Ban</A> | "
|
||||||
body += "<A href='?src=\ref[src];notes=show;mob=\ref[M]'>Notes</A> "
|
body += "<A href='?src=\ref[src];notes=show;mob=\ref[M]'>Notes</A> "
|
||||||
|
|
||||||
if(M.client)
|
if(M.client)
|
||||||
@@ -1115,4 +1116,4 @@ proc/formatLocation(var/location)
|
|||||||
return "[A.name] - [loc.x],[loc.y],[loc.z]"
|
return "[A.name] - [loc.x],[loc.y],[loc.z]"
|
||||||
|
|
||||||
proc/formatPlayerPanel(var/mob/U,var/text="PP")
|
proc/formatPlayerPanel(var/mob/U,var/text="PP")
|
||||||
return "<A HREF='?_src_=holder;adminplayeropts=\ref[U]'>[text]</A>"
|
return "<A HREF='?_src_=holder;adminplayeropts=\ref[U]'>[text]</A>"
|
||||||
|
|||||||
@@ -93,6 +93,12 @@
|
|||||||
if(!banckey || !banreason || !banjob || !banduration)
|
if(!banckey || !banreason || !banjob || !banduration)
|
||||||
usr << "Not enough parameters (Requires ckey, reason and job)"
|
usr << "Not enough parameters (Requires ckey, reason and job)"
|
||||||
return
|
return
|
||||||
|
if(BANTYPE_APPEARANCE)
|
||||||
|
if(!banckey || !banreason)
|
||||||
|
usr << "Not enough parameters (Requires ckey and reason)"
|
||||||
|
return
|
||||||
|
banduration = null
|
||||||
|
banjob = null
|
||||||
|
|
||||||
var/mob/playermob
|
var/mob/playermob
|
||||||
|
|
||||||
@@ -354,6 +360,55 @@
|
|||||||
|
|
||||||
/////////////////////////////////////new ban stuff
|
/////////////////////////////////////new ban stuff
|
||||||
|
|
||||||
|
else if(href_list["appearanceban"])
|
||||||
|
if(!check_rights(R_BAN))
|
||||||
|
return
|
||||||
|
var/mob/M = locate(href_list["appearanceban"])
|
||||||
|
if(!ismob(M))
|
||||||
|
usr << "This can only be used on instances of type /mob"
|
||||||
|
return
|
||||||
|
if(!M.ckey) //sanity
|
||||||
|
usr << "This mob has no ckey"
|
||||||
|
return
|
||||||
|
|
||||||
|
var/banreason = appearance_isbanned(M)
|
||||||
|
if(banreason)
|
||||||
|
/* if(!config.ban_legacy_system)
|
||||||
|
usr << "Unfortunately, database based unbanning cannot be done through this panel"
|
||||||
|
DB_ban_panel(M.ckey)
|
||||||
|
return */
|
||||||
|
switch(alert("Reason: '[banreason]' Remove appearance ban?","Please Confirm","Yes","No"))
|
||||||
|
if("Yes")
|
||||||
|
ban_unban_log_save("[key_name(usr)] removed [key_name(M)]'s appearance ban")
|
||||||
|
log_admin("[key_name(usr)] removed [key_name(M)]'s appearance ban")
|
||||||
|
feedback_inc("ban_appearance_unban", 1)
|
||||||
|
DB_ban_unban(M.ckey, BANTYPE_APPEARANCE)
|
||||||
|
appearance_unban(M)
|
||||||
|
message_admins("\blue [key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban", 1)
|
||||||
|
M << "\red<BIG><B>[usr.client.ckey] has removed your appearance ban.</B></BIG>"
|
||||||
|
|
||||||
|
else switch(alert("Appearance ban [M.ckey]?",,"Yes","No", "Cancel"))
|
||||||
|
if("Yes")
|
||||||
|
var/reason = input(usr,"Reason?","reason","Metafriender") as text|null
|
||||||
|
if(!reason)
|
||||||
|
return
|
||||||
|
ban_unban_log_save("[key_name(usr)] appearance banned [key_name(M)]. reason: [reason]")
|
||||||
|
log_admin("[key_name(usr)] appearance banned [key_name(M)]. \nReason: [reason]")
|
||||||
|
feedback_inc("ban_appearance",1)
|
||||||
|
DB_ban_record(BANTYPE_APPEARANCE, M, -1, reason)
|
||||||
|
appearance_fullban(M, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
|
||||||
|
notes_add(M.ckey, "Appearance banned - [reason]")
|
||||||
|
message_admins("\blue [key_name_admin(usr)] appearance banned [key_name_admin(M)]", 1)
|
||||||
|
M << "\red<BIG><B>You have been appearance banned by [usr.client.ckey].</B></BIG>"
|
||||||
|
M << "\red <B>The reason is: [reason]</B>"
|
||||||
|
M << "\red Appearance ban can be lifted only upon request."
|
||||||
|
if(config.banappeals)
|
||||||
|
M << "\red To try to resolve this matter head to [config.banappeals]"
|
||||||
|
else
|
||||||
|
M << "\red No ban appeals URL has been set."
|
||||||
|
if("No")
|
||||||
|
return
|
||||||
|
|
||||||
else if(href_list["jobban2"])
|
else if(href_list["jobban2"])
|
||||||
// if(!check_rights(R_BAN)) return
|
// if(!check_rights(R_BAN)) return
|
||||||
|
|
||||||
|
|||||||
@@ -226,6 +226,7 @@ datum/preferences
|
|||||||
dat += "</center><hr><table><tr><td width='340px' height='320px'>"
|
dat += "</center><hr><table><tr><td width='340px' height='320px'>"
|
||||||
|
|
||||||
dat += "<b>Name:</b> "
|
dat += "<b>Name:</b> "
|
||||||
|
if(appearance_isbanned(user)) dat += "<b>You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game.</b><br>"
|
||||||
dat += "<a href='?_src_=prefs;preference=name;task=input'><b>[real_name]</b></a><br>"
|
dat += "<a href='?_src_=prefs;preference=name;task=input'><b>[real_name]</b></a><br>"
|
||||||
dat += "(<a href='?_src_=prefs;preference=name;task=random'>Random Name</A>) "
|
dat += "(<a href='?_src_=prefs;preference=name;task=random'>Random Name</A>) "
|
||||||
dat += "(<a href='?_src_=prefs;preference=name'>Always Random Name: [be_random_name ? "Yes" : "No"]</a>)"
|
dat += "(<a href='?_src_=prefs;preference=name'>Always Random Name: [be_random_name ? "Yes" : "No"]</a>)"
|
||||||
|
|||||||
@@ -354,7 +354,7 @@
|
|||||||
new_character.dna.mutantrace = "vox"
|
new_character.dna.mutantrace = "vox"
|
||||||
new_character.vox_talk_understand = 1
|
new_character.vox_talk_understand = 1
|
||||||
|
|
||||||
if(ticker.random_players)
|
if(ticker.random_players || appearance_isbanned(new_character))
|
||||||
new_character.gender = pick(MALE, FEMALE)
|
new_character.gender = pick(MALE, FEMALE)
|
||||||
client.prefs.real_name = random_name(new_character.gender)
|
client.prefs.real_name = random_name(new_character.gender)
|
||||||
client.prefs.randomize_appearance_for(new_character)
|
client.prefs.randomize_appearance_for(new_character)
|
||||||
|
|||||||
@@ -506,6 +506,7 @@ var/list/liftable_structures = list(\
|
|||||||
#define BANTYPE_JOB_PERMA 3
|
#define BANTYPE_JOB_PERMA 3
|
||||||
#define BANTYPE_JOB_TEMP 4
|
#define BANTYPE_JOB_TEMP 4
|
||||||
#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban.
|
#define BANTYPE_ANY_FULLBAN 5 //used to locate stuff to unban.
|
||||||
|
#define BANTYPE_APPEARANCE 6
|
||||||
|
|
||||||
#define SEE_INVISIBLE_MINIMUM 5
|
#define SEE_INVISIBLE_MINIMUM 5
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
load_alienwhitelist()
|
load_alienwhitelist()
|
||||||
jobban_loadbanfile()
|
jobban_loadbanfile()
|
||||||
jobban_updatelegacybans()
|
jobban_updatelegacybans()
|
||||||
|
appearance_loadbanfile()
|
||||||
LoadBans()
|
LoadBans()
|
||||||
|
|
||||||
if(config && config.server_name != null && config.server_suffix && world.port > 0)
|
if(config && config.server_name != null && config.server_suffix && world.port > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user