mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Committing icons and code edits first
This commit is contained in:
@@ -79,3 +79,89 @@ world/IsBanned(key,address,computer_id)
|
||||
if (failedip)
|
||||
message_admins("[key] has logged in with a blank ip in the ban check.")
|
||||
return ..() //default pager ban stuff
|
||||
|
||||
|
||||
/client/New()
|
||||
world.log << "Checking [src.key] for bans..."
|
||||
if(IsBanned())
|
||||
world.log << "[IsBanned()]"
|
||||
src << IsBanned()
|
||||
del src
|
||||
. = ..()
|
||||
|
||||
/client/proc/IsBanned()
|
||||
//Guest Checking
|
||||
if(!guests_allowed && IsGuestKey(src.key))
|
||||
log_access("Failed Login: [src.key] - Guests not allowed")
|
||||
message_admins("\blue Failed Login: [src.key] - Guests not allowed")
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
|
||||
//check if the IP address is a known TOR node
|
||||
if(config && config.ToRban && ToRban_isbanned(src.address))
|
||||
log_access("Failed Login: [src] - Banned: ToR")
|
||||
message_admins("\blue Failed Login: [src] - Banned: ToR")
|
||||
//ban their computer_id and ckey for posterity
|
||||
AddBan(ckey(src.key), src.computer_id, "Use of ToR", "Automated Ban", 0, 0)
|
||||
return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [config.banappeals]")
|
||||
|
||||
|
||||
if(config.ban_legacy_system)
|
||||
//Ban Checking
|
||||
. = CheckBan( ckey(src.key), src.computer_id, src.address )
|
||||
if(.)
|
||||
log_access("Failed Login: [src.key] [src.computer_id] [src.address] - Banned [.["reason"]]")
|
||||
message_admins("\blue Failed Login: [src.key] id:[src.computer_id] ip:[src.address] - Banned [.["reason"]]")
|
||||
return .
|
||||
|
||||
return ..() //default pager ban stuff
|
||||
|
||||
else
|
||||
|
||||
var/ckeytext = ckey(key)
|
||||
|
||||
if(!establish_db_connection())
|
||||
world.log << "Ban database connection failure. Key [ckeytext] not checked"
|
||||
diary << "Ban database connection failure. Key [ckeytext] not checked"
|
||||
return
|
||||
|
||||
var/failedcid = 1
|
||||
var/failedip = 1
|
||||
|
||||
var/ipquery = ""
|
||||
var/cidquery = ""
|
||||
if(address)
|
||||
failedip = 0
|
||||
ipquery = " OR ip = '[address]' "
|
||||
|
||||
if(computer_id)
|
||||
failedcid = 0
|
||||
cidquery = " OR computerid = '[computer_id]' "
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
var/pckey = query.item[1]
|
||||
//var/pip = query.item[2]
|
||||
//var/pcid = query.item[3]
|
||||
var/ackey = query.item[4]
|
||||
var/reason = query.item[5]
|
||||
var/expiration = query.item[6]
|
||||
var/duration = query.item[7]
|
||||
var/bantime = query.item[8]
|
||||
var/bantype = query.item[9]
|
||||
|
||||
var/expires = ""
|
||||
if(text2num(duration) > 0)
|
||||
expires = " The ban is for [duration] minutes and expires on [expiration] (server time)."
|
||||
|
||||
var/desc = "\nReason: You, or another user of this computer or connection ([pckey]) is banned from playing here. The ban reason is:\n[reason]\nThis ban was applied by [ackey] on [bantime], [expires]"
|
||||
|
||||
//return list("reason"="[bantype]", "desc"="[desc]")
|
||||
return "[bantype][desc]"
|
||||
|
||||
if (failedcid)
|
||||
message_admins("[key] has logged in with a blank computer id in the ban check.")
|
||||
if (failedip)
|
||||
message_admins("[key] has logged in with a blank ip in the ban check.")
|
||||
return ..() //default pager ban stuff
|
||||
@@ -34,17 +34,17 @@
|
||||
usr << "\red Unfortunatly there were no candidates available"
|
||||
if("7")
|
||||
log_admin("[key_name(usr)] has spawned a nuke team.")
|
||||
if(!src.makeNukeTeam())
|
||||
if(!makeNukeTeam())
|
||||
usr << "\red Unfortunatly there were no candidates available"
|
||||
if("8")
|
||||
log_admin("[key_name(usr)] has spawned a ninja.")
|
||||
src.makeSpaceNinja()
|
||||
makeSpaceNinja()
|
||||
if("9")
|
||||
log_admin("[key_name(usr)] has spawned aliens.")
|
||||
src.makeAliens()
|
||||
makeAliens()
|
||||
if("10")
|
||||
log_admin("[key_name(usr)] has spawned a death squad.")
|
||||
if(!src.makeDeathsquad())
|
||||
if(!makeDeathsquad())
|
||||
usr << "\red Unfortunatly there were no candidates available"
|
||||
else if(href_list["dbsearchckey"] || href_list["dbsearchadmin"])
|
||||
var/adminckey = href_list["dbsearchadmin"]
|
||||
@@ -1963,6 +1963,12 @@
|
||||
var/obj/machinery/status_display/A = M
|
||||
A.friendc = 1
|
||||
message_admins("[key_name_admin(usr)] turned all AIs into best friends.", 1)
|
||||
if("aliens")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","AL")
|
||||
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
|
||||
//makeAliens()
|
||||
new /datum/event/alien_infestation
|
||||
if("floorlava")
|
||||
if(floorIsLava)
|
||||
usr << "The floor is lava already."
|
||||
|
||||
@@ -17,17 +17,17 @@ client/proc/one_click_antag()
|
||||
<a href='?src=\ref[src];makeAntag=4'>Make Cult</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=5'>Make Malf AI</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=6'>Make Wizard (Requires Ghosts)</a><br>
|
||||
"}
|
||||
|
||||
/* These dont work just yet
|
||||
Ninja, aliens and deathsquad I have not looked into yet
|
||||
Nuke team is getting a null mob returned from makebody() (runtime error: null.mind. Line 272)
|
||||
|
||||
*/
|
||||
<a href='?src=\ref[src];makeAntag=7'>Make Nuke Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=8'>Make Space Ninja (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=9'>Make Aliens (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=10'>Make Deathsquad (Syndicate) (Requires Ghosts)</a><br>
|
||||
"}
|
||||
*/
|
||||
|
||||
usr << browse(dat, "window=oneclickantag;size=400x400")
|
||||
return
|
||||
|
||||
@@ -217,6 +217,7 @@ client/proc/one_click_antag()
|
||||
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
var/list/mob/dead/observer/picked = list()
|
||||
var/time_passed = world.time
|
||||
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
@@ -245,19 +246,26 @@ client/proc/one_click_antag()
|
||||
candidates.Remove(j)
|
||||
continue
|
||||
|
||||
theghost = candidates
|
||||
theghost = j
|
||||
candidates.Remove(theghost)
|
||||
|
||||
/* Seeing if we have enough agents before we make the nuke team
|
||||
var/mob/living/carbon/human/new_character=makeBody(theghost)
|
||||
new_character.mind.make_Nuke()
|
||||
*/
|
||||
picked += theghost
|
||||
agentcount++
|
||||
break
|
||||
//This is so we don't get a nuke team with only 1 or 2 people
|
||||
if(agentcount < 3)
|
||||
return 0
|
||||
else
|
||||
for(var/mob/j in picked)
|
||||
theghost = j
|
||||
var/mob/living/carbon/human/new_character=makeBody(theghost)
|
||||
new_character.mind.make_Nuke()
|
||||
|
||||
agentcount++
|
||||
|
||||
if(agentcount < 1)
|
||||
return 0
|
||||
|
||||
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
|
||||
var/obj/effect/landmark/closet_spawn = locate("landmark*Nuclear-Closet")
|
||||
var/obj/effect/landmark/closet_spawn = locate("landmark*Syndicate-Uplink")
|
||||
|
||||
var/nuke_code = "[rand(10000, 99999)]"
|
||||
|
||||
@@ -298,7 +306,6 @@ client/proc/one_click_antag()
|
||||
|
||||
for (var/obj/machinery/nuclearbomb/bomb in world)
|
||||
bomb.r_code = nuke_code // All the nukes are set to this code.
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user