stop this nonsense

This commit is contained in:
SandPoot
2024-01-05 00:28:56 -03:00
parent 05e2cc0979
commit c7a2565255
487 changed files with 1662 additions and 1662 deletions
+1 -1
View File
@@ -173,7 +173,7 @@
AH.Resolve() //with prejudice
if(banned_client && banned_client.ckey == ckey)
qdel(banned_client)
return 1
return TRUE
/datum/admins/proc/DB_ban_unban(ckey, bantype, job = "")
+12 -12
View File
@@ -7,7 +7,7 @@ GLOBAL_PROTECT(Banlist)
if(!GLOB.Banlist) // if Banlist cannot be located for some reason
LoadBans() // try to load the bans
if(!GLOB.Banlist) // uh oh, can't find bans!
return 0 // ABORT ABORT ABORT
return FALSE // ABORT ABORT ABORT
. = list()
var/appeal
@@ -20,7 +20,7 @@ GLOBAL_PROTECT(Banlist)
if (GLOB.Banlist["temp"])
if (!GetExp(GLOB.Banlist["minutes"]))
ClearTempbans()
return 0
return FALSE
else
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: [GetExp(GLOB.Banlist["minutes"])]\nBy: [GLOB.Banlist["bannedby"]] during round ID [GLOB.Banlist["roundid"]][appeal]"
else
@@ -47,18 +47,18 @@ GLOBAL_PROTECT(Banlist)
if(GLOB.Banlist["temp"])
if (!GetExp(GLOB.Banlist["minutes"]))
ClearTempbans()
return 0
return FALSE
else
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: [GetExp(GLOB.Banlist["minutes"])]\nBy: [GLOB.Banlist["bannedby"]] during round ID [GLOB.Banlist["roundid"]][appeal]"
else
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [GLOB.Banlist["bannedby"]] during round ID [GLOB.Banlist["roundid"]][appeal]"
.["reason"] = matches
return .
return 0
return FALSE
/proc/UpdateTime() //No idea why i made this a proc.
GLOB.CMinutes = (world.realtime / 10) / 60
return 1
return TRUE
/proc/LoadBans()
if(!CONFIG_GET(flag/ban_legacy_system))
@@ -78,7 +78,7 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist.cd = "/base"
ClearTempbans()
return 1
return TRUE
/proc/ClearTempbans()
UpdateTime()
@@ -97,7 +97,7 @@ GLOBAL_PROTECT(Banlist)
if (GLOB.CMinutes >= GLOB.Banlist["minutes"])
RemoveBan(A)
return 1
return TRUE
/proc/AddBan(key, computerid, reason, bannedby, temp, minutes, address)
@@ -111,7 +111,7 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist.cd = "/base"
if ( GLOB.Banlist.dir.Find("[ban_ckey][computerid]") )
to_chat(usr, text("<span class='danger'>Ban already exists.</span>"))
return 0
return FALSE
else
GLOB.Banlist.dir.Add("[ban_ckey][computerid]")
GLOB.Banlist.cd = "/base/[ban_ckey][computerid]"
@@ -128,7 +128,7 @@ GLOBAL_PROTECT(Banlist)
create_message("note", key, bannedby, "Permanently banned - [reason]", null, null, 0, 0, null, 0, 0)
else
create_message("note", key, bannedby, "Banned for [minutes] minutes - [reason]", null, null, 0, 0, null, 0, 0)
return 1
return TRUE
/proc/RemoveBan(foldername)
var/key
@@ -140,7 +140,7 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist.cd = "/base"
if (!GLOB.Banlist.dir.Remove(foldername))
return 0
return FALSE
if(!usr)
log_admin_private("Ban Expired: [key]")
@@ -157,13 +157,13 @@ GLOBAL_PROTECT(Banlist)
GLOB.Banlist.dir.Remove(A)
continue
return 1
return TRUE
/proc/GetExp(minutes as num)
UpdateTime()
var/exp = minutes - GLOB.CMinutes
if (exp <= 0)
return 0
return FALSE
else
var/timeleftstring
if (exp >= 1440) //1440 = 1 day in minutes
+2 -2
View File
@@ -29,7 +29,7 @@
if ("Instant Runoff Voting")
polltype = POLLTYPE_IRV
else
return 0
return FALSE
var/starttime = SQLtime()
var/endtime = input("Set end time for poll as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than starting time for obvious reasons.", "Set end time", SQLtime()) as text
if(!endtime)
@@ -117,7 +117,7 @@
if("Finish")
add_option = 0
else
return 0
return FALSE
var/m1 = "[key_name(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]"
var/m2 = "[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]<br>Question: [question]"
var/datum/db_query/query_polladd_question = SSdbcore.NewQuery({"
+13 -13
View File
@@ -140,21 +140,21 @@ GLOBAL_PROTECT(href_token)
/datum/admins/proc/check_for_rights(rights_required)
if(rights_required && !(rights_required & rank.rights))
return 0
return 1
return FALSE
return TRUE
/datum/admins/proc/check_if_greater_rights_than_holder(datum/admins/other)
if(!other)
return 1 //they have no rights
return TRUE //they have no rights
if(rank.rights == R_EVERYTHING)
return 1 //we have all the rights
return TRUE //we have all the rights
if(src == other)
return 1 //you always have more rights than yourself
return TRUE //you always have more rights than yourself
if(rank.rights != other.rank.rights)
if( (rank.rights & other.rank.rights) == other.rank.rights )
return 1 //we have all the rights they have and more
return 0
return TRUE //we have all the rights they have and more
return FALSE
/datum/admins/vv_edit_var(var_name, var_value)
if(var_name == NAMEOF(src, fakekey))
@@ -164,7 +164,7 @@ GLOBAL_PROTECT(href_token)
/*
checks if usr is an admin with at least ONE of the flags in rights_required. (Note, they don't need all the flags)
if rights_required == 0, then it simply checks if they are an admin.
if it doesn't return 1 and show_msg=1 it will prints a message explaining why the check has failed
if it doesn't return TRUE and show_msg=1 it will prints a message explaining why the check has failed
generally it would be used like so:
/proc/admin_proc()
@@ -178,26 +178,26 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
/proc/check_rights(rights_required, show_msg=1)
if(usr && usr.client)
if (check_rights_for(usr.client, rights_required))
return 1
return TRUE
else
if(show_msg)
to_chat(usr, "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>")
return 0
return FALSE
//probably a bit iffy - will hopefully figure out a better solution
/proc/check_if_greater_rights_than(client/other)
if(usr && usr.client)
if(usr.client.holder)
if(!other || !other.holder)
return 1
return TRUE
return usr.client.holder.check_if_greater_rights_than_holder(other.holder)
return 0
return FALSE
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
/proc/check_rights_for(client/subject, rights_required)
if(subject && subject.holder)
return subject.holder.check_for_rights(rights_required)
return 0
return FALSE
/proc/GenerateToken()
. = ""
+4 -4
View File
@@ -1026,7 +1026,7 @@
to_chat(M, "<span class='boldannounce'>The reason is: [reason]</span>")
to_chat(M, "<span class='danger'>This jobban will be lifted in [mins] minutes.</span>")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
return TRUE
if("No")
var/reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null
severity = input("Set the severity of the note/ban.", "Severity", null, null) as null|anything in list("High", "Medium", "Minor", "None")
@@ -1052,7 +1052,7 @@
to_chat(M, "<span class='boldannounce'>The reason is: [reason]</span>")
to_chat(M, "<span class='danger'>Jobban can be lifted only upon request.</span>")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
return TRUE
if("Cancel")
return
@@ -1081,8 +1081,8 @@
message_admins("<span class='adminnotice'>[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg].</span>")
to_chat(M, "<span class='boldannounce'><BIG>You have been un-jobbanned by [usr.client.key] from [msg].</BIG></span>")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
return 0 //we didn't do anything!
return TRUE
return FALSE //we didn't do anything!
else if(href_list["boot2"])
if(!check_rights(R_ADMIN))
+2 -2
View File
@@ -89,11 +89,11 @@
available.Add(C)
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
if(!choice)
return 0
return FALSE
if(!isobserver(choice))
var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
if(confirm != "Yes")
return 0
return FALSE
var/obj/item/paicard/card = new(T)
var/mob/living/silicon/pai/pai = new(card)
pai.name = input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text
+2 -2
View File
@@ -65,7 +65,7 @@ GLOBAL_PROTECT(admin_verbs_debug_mapping)
icon_state = "yellow"
/obj/effect/debugging/marker/Move()
return 0
return FALSE
/client/proc/camera_view()
set category = "Mapping"
@@ -111,7 +111,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
if(!Master)
alert(usr,"Master_controller not found.","Sec Camera Report")
return 0
return FALSE
var/list/obj/machinery/camera/CL = list()
+15 -15
View File
@@ -70,10 +70,10 @@
H.mind.make_Traitor()
candidates.Remove(H)
return 1
return TRUE
return 0
return FALSE
/datum/admins/proc/makeChangelings()
@@ -102,9 +102,9 @@
H.mind.make_Changeling()
candidates.Remove(H)
return 1
return TRUE
return 0
return FALSE
/datum/admins/proc/makeRevs()
@@ -131,9 +131,9 @@
H = pick(candidates)
H.mind.make_Rev()
candidates.Remove(H)
return 1
return TRUE
return 0
return FALSE
/datum/admins/proc/makeWizard()
@@ -171,9 +171,9 @@
H.mind.make_Cultist()
candidates.Remove(H)
return 1
return TRUE
return 0
return FALSE
/datum/admins/proc/makeClockCult()
@@ -206,9 +206,9 @@
SSticker.mode.equip_servant(H)
candidates.Remove(H)
return 1
return TRUE
return 0
return FALSE
@@ -236,7 +236,7 @@
break
//Making sure we have atleast 3 Nuke agents, because less than that is kinda bad
if(agentcount < 3)
return 0
return FALSE
//Let's find the spawn locations
var/leader_chosen = FALSE
@@ -249,9 +249,9 @@
nuke_team = N.nuke_team
else
new_character.mind.add_antag_datum(/datum/antagonist/nukeop,nuke_team)
return 1
return TRUE
else
return 0
return FALSE
@@ -451,8 +451,8 @@
//Abductors
/datum/admins/proc/makeAbductorTeam()
new /datum/round_event/ghost_role/abductor
return 1
return TRUE
/datum/admins/proc/makeRevenant()
new /datum/round_event/ghost_role/revenant(TRUE, TRUE)
return 1
return TRUE
+3 -3
View File
@@ -300,7 +300,7 @@
else
to_chat(usr, "<span class='danger'>Error: create_xeno(): no suitable candidates.</span>")
if(!istext(ckey))
return 0
return FALSE
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva")
var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null
@@ -319,7 +319,7 @@
if("Larva")
new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
else
return 0
return FALSE
if(!spawn_here)
SSjob.SendToLateJoin(new_xeno, FALSE)
@@ -327,7 +327,7 @@
var/msg = "<span class='notice'>[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].</span>"
message_admins(msg)
admin_ticket_log(new_xeno, msg)
return 1
return TRUE
/*
If a guy was gibbed and you want to revive him, this is a good way to do so.