Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

Miscreant bans #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions code/datums/crew_objective.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
if (!crewMind.current || !crewMind.objectives || crewMind.objectives.len || crewMind.special_role || (crewMind.assigned_role == "MODE"))
return

if(jobban_isbanned(crewMind.current, "Miscreant"))
return

var/rolePathString = ckey(crewMind.assigned_role)
if (!rolePathString)
return
Expand Down
5 changes: 5 additions & 0 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,11 @@ var/global/noir = 0
else
jobs += "<BR><a href='?src=\ref[src];action=[action];type=Ghostdrone;target=[target]'>Ghostdrone</a> "

if(jobban_isbanned(M, "Miscreant"))
jobs += "<a href='?src=\ref[src];action=[action];type=Miscreant;target=[target]'><font color=red>Miscreant</font></a> "
else
jobs += "<a href='?src=\ref[src];action=[action];type=Miscreant;target=[target]'>Miscreant</a> "

if(jobban_isbanned(M, "Custom Names"))
jobs += "<BR><a href='?src=\ref[src];action=[action];type=Custom Names;target=[target]'><font color=red>[replacetext("Having a Custom Name", " ", "&nbsp")]</font></a> "
else
Expand Down
10 changes: 6 additions & 4 deletions code/modules/admin/bans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ var/global/list/playersSeen = list()
return
data["reason"] = reason

var/server_nice = input(usr, "What server does the ban apply to?", "Ban") as null|anything in list("All", "Roleplay", "Main", "Roleplay Overflow", "Main Overflow")
/*var/server_nice = input(usr, "What server does the ban apply to?", "Ban") as null|anything in list("All", "Roleplay", "Main", "Roleplay Overflow", "Main Overflow")
var/server = null
switch (server_nice)
if ("Roleplay")
Expand All @@ -304,7 +304,8 @@ var/global/list/playersSeen = list()
server = "main2"
if ("Main Overflow")
server = "main3"
data["server"] = server
data["server"] = server*/
data["server"] = "main"

var/ban_time = input(usr,"How long will the ban be?","Ban") as null|anything in list("Half-hour","One Hour","Six Hours","One Day","Half a Week","One Week","One Month","Permanent","Custom")
var/mins = 0
Expand Down Expand Up @@ -434,7 +435,7 @@ var/global/list/playersSeen = list()
return
data["reason"] = reason

var/server_nice = input(usr, "What server does the ban apply to?", "Ban") as null|anything in list("All", "Roleplay", "Main")
/*var/server_nice = input(usr, "What server does the ban apply to?", "Ban") as null|anything in list("All", "Roleplay", "Main")
var/server = null
switch (server_nice)
if ("Roleplay")
Expand All @@ -445,7 +446,8 @@ var/global/list/playersSeen = list()
server = "main2"
if ("Main Overflow")
server = "main3"
data["server"] = server
data["server"] = server*/
data["server"] = "main"

var/ban_time = input(usr,"How long will the ban be? (select Custom to alter existing duration)","Ban") as null|anything in list("Half-hour","One Hour","Six Hours","One Day","Half a Week","One Week","One Month","Permanent","Custom")
var/mins = 0
Expand Down
6 changes: 4 additions & 2 deletions code/modules/admin/jobban.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
if(ismob(M))
var/mob/keysource = M
M = keysource.ckey
var/server_nice = input(usr, "What server does the ban apply to?", "Ban") as null|anything in list("All", "Roleplay", "Main", "Roleplay Overflow", "Main Overflow")
/*var/server_nice = input(usr, "What server does the ban apply to?", "Ban") as null|anything in list("All", "Roleplay", "Main", "Roleplay Overflow", "Main Overflow")
var/server = null //heehoo copy pasta
switch (server_nice)
if ("Roleplay")
Expand All @@ -15,7 +15,9 @@
if ("Roleplay Overflow")
server = "main2"
if ("Main Overflow")
server = "main3"
server = "main3"*/
var/server = "main"

if(apiHandler.queryAPI("jobbans/add", list("ckey"=M,"rank"=rank, "akey"=akey, "applicable_server"=server)))
var/datum/player/player = make_player(M) //Recache the player.
if(player)
Expand Down