mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
Fix conflicts
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
computerid = bancid
|
||||
ip = banip
|
||||
|
||||
var/DBQuery/query_add_ban_get_id = dbcon.NewQuery("SELECT id FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
|
||||
var/DBQuery/query_add_ban_get_id = GLOB.dbcon.NewQuery("SELECT id FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
|
||||
if(!query_add_ban_get_id.warn_execute())
|
||||
return
|
||||
var/validckey = 0
|
||||
@@ -97,14 +97,14 @@
|
||||
return
|
||||
|
||||
var/who
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(!who)
|
||||
who = "[C]"
|
||||
else
|
||||
who += ", [C]"
|
||||
|
||||
var/adminwho
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(!adminwho)
|
||||
adminwho = "[C]"
|
||||
else
|
||||
@@ -113,7 +113,7 @@
|
||||
reason = sanitizeSQL(reason)
|
||||
|
||||
if(maxadminbancheck)
|
||||
var/DBQuery/query_check_adminban_amt = dbcon.NewQuery("SELECT count(id) AS num FROM [format_table_name("ban")] WHERE (a_ckey = '[a_ckey]') AND (bantype = 'ADMIN_PERMABAN' OR (bantype = 'ADMIN_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
var/DBQuery/query_check_adminban_amt = GLOB.dbcon.NewQuery("SELECT count(id) AS num FROM [format_table_name("ban")] WHERE (a_ckey = '[a_ckey]') AND (bantype = 'ADMIN_PERMABAN' OR (bantype = 'ADMIN_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
if(!query_check_adminban_amt.warn_execute())
|
||||
return
|
||||
if(query_check_adminban_amt.NextRow())
|
||||
@@ -126,7 +126,7 @@
|
||||
if(!ip)
|
||||
ip = "0.0.0.0"
|
||||
var/sql = "INSERT INTO [format_table_name("ban")] (`bantime`,`server_ip`,`server_port`,`bantype`,`reason`,`job`,`duration`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`) VALUES (Now(), INET_ATON('[world.internet_address]'), '[world.port]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', INET_ATON('[ip]'), '[a_ckey]', '[a_computerid]', INET_ATON('[a_ip]'), '[who]', '[adminwho]')"
|
||||
var/DBQuery/query_add_ban = dbcon.NewQuery(sql)
|
||||
var/DBQuery/query_add_ban = GLOB.dbcon.NewQuery(sql)
|
||||
if(!query_add_ban.warn_execute())
|
||||
return
|
||||
to_chat(usr, "<span class='adminnotice'>Ban saved to database.</span>")
|
||||
@@ -187,13 +187,13 @@
|
||||
if(job)
|
||||
sql += " AND job = '[job]'"
|
||||
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
return
|
||||
|
||||
var/ban_id
|
||||
var/ban_number = 0 //failsafe
|
||||
|
||||
var/DBQuery/query_unban_get_id = dbcon.NewQuery(sql)
|
||||
var/DBQuery/query_unban_get_id = GLOB.dbcon.NewQuery(sql)
|
||||
if(!query_unban_get_id.warn_execute())
|
||||
return
|
||||
while(query_unban_get_id.NextRow())
|
||||
@@ -225,7 +225,7 @@
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/query_edit_ban_get_details = dbcon.NewQuery("SELECT ckey, duration, reason FROM [format_table_name("ban")] WHERE id = [banid]")
|
||||
var/DBQuery/query_edit_ban_get_details = GLOB.dbcon.NewQuery("SELECT ckey, duration, reason FROM [format_table_name("ban")] WHERE id = [banid]")
|
||||
if(!query_edit_ban_get_details.warn_execute())
|
||||
return
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/query_edit_ban_reason = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from <cite><b>\\\"[reason]\\\"</b></cite> to <cite><b>\\\"[value]\\\"</b></cite><BR>') WHERE id = [banid]")
|
||||
var/DBQuery/query_edit_ban_reason = GLOB.dbcon.NewQuery("UPDATE [format_table_name("ban")] SET reason = '[value]', edits = CONCAT(edits,'- [eckey] changed ban reason from <cite><b>\\\"[reason]\\\"</b></cite> to <cite><b>\\\"[value]\\\"</b></cite><BR>') WHERE id = [banid]")
|
||||
if(!query_edit_ban_reason.warn_execute())
|
||||
return
|
||||
message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s reason from [reason] to [value]",1)
|
||||
@@ -265,7 +265,7 @@
|
||||
to_chat(usr, "Cancelled")
|
||||
return
|
||||
|
||||
var/DBQuery/query_edit_ban_duration = dbcon.NewQuery("UPDATE [format_table_name("ban")] SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]<br>'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]")
|
||||
var/DBQuery/query_edit_ban_duration = GLOB.dbcon.NewQuery("UPDATE [format_table_name("ban")] SET duration = [value], edits = CONCAT(edits,'- [eckey] changed ban duration from [duration] to [value]<br>'), expiration_time = DATE_ADD(bantime, INTERVAL [value] MINUTE) WHERE id = [banid]")
|
||||
if(!query_edit_ban_duration.warn_execute())
|
||||
return
|
||||
message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s duration from [duration] to [value]",1)
|
||||
@@ -287,13 +287,13 @@
|
||||
|
||||
var/sql = "SELECT ckey FROM [format_table_name("ban")] WHERE id = [id]"
|
||||
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
return
|
||||
|
||||
var/ban_number = 0 //failsafe
|
||||
|
||||
var/pckey
|
||||
var/DBQuery/query_unban_get_ckey = dbcon.NewQuery(sql)
|
||||
var/DBQuery/query_unban_get_ckey = GLOB.dbcon.NewQuery(sql)
|
||||
if(!query_unban_get_ckey.warn_execute())
|
||||
return
|
||||
while(query_unban_get_ckey.NextRow())
|
||||
@@ -316,7 +316,7 @@
|
||||
var/unban_ip = src.owner:address
|
||||
|
||||
var/sql_update = "UPDATE [format_table_name("ban")] SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = INET_ATON('[unban_ip]') WHERE id = [id]"
|
||||
var/DBQuery/query_unban = dbcon.NewQuery(sql_update)
|
||||
var/DBQuery/query_unban = GLOB.dbcon.NewQuery(sql_update)
|
||||
if(!query_unban.warn_execute())
|
||||
return
|
||||
message_admins("[key_name_admin(usr)] has lifted [pckey]'s ban.",1)
|
||||
@@ -339,7 +339,7 @@
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
output += "<option value=''>--</option>"
|
||||
for(var/j in get_all_jobs())
|
||||
output += "<option value='[j]'>[j]</option>"
|
||||
for(var/j in nonhuman_positions)
|
||||
for(var/j in GLOB.nonhuman_positions)
|
||||
output += "<option value='[j]'>[j]</option>"
|
||||
for(var/j in list("traitor","changeling","operative","revolutionary", "gangster","cultist","wizard"))
|
||||
output += "<option value='[j]'>[j]</option>"
|
||||
@@ -405,7 +405,7 @@
|
||||
var/bansperpage = 15
|
||||
var/pagecount = 0
|
||||
page = text2num(page)
|
||||
var/DBQuery/query_count_bans = dbcon.NewQuery("SELECT COUNT(id) FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch]")
|
||||
var/DBQuery/query_count_bans = GLOB.dbcon.NewQuery("SELECT COUNT(id) FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch]")
|
||||
if(!query_count_bans.warn_execute())
|
||||
return
|
||||
if(query_count_bans.NextRow())
|
||||
@@ -431,7 +431,7 @@
|
||||
output += "<th width='15%'><b>OPTIONS</b></th>"
|
||||
output += "</tr>"
|
||||
var/limit = " LIMIT [bansperpage * page], [bansperpage]"
|
||||
var/DBQuery/query_search_bans = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] ORDER BY bantime DESC[limit]")
|
||||
var/DBQuery/query_search_bans = GLOB.dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] ORDER BY bantime DESC[limit]")
|
||||
if(!query_search_bans.warn_execute())
|
||||
return
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.)")
|
||||
var/admin = 0
|
||||
var/ckey = ckey(key)
|
||||
if((ckey in admin_datums) || (ckey in deadmins))
|
||||
if((ckey in GLOB.admin_datums) || (ckey in GLOB.deadmins))
|
||||
admin = 1
|
||||
|
||||
//Whitelist
|
||||
@@ -32,10 +32,10 @@
|
||||
|
||||
//Guest Checking
|
||||
if(IsGuestKey(key))
|
||||
if (!guests_allowed)
|
||||
if (!GLOB.guests_allowed)
|
||||
log_access("Failed Login: [key] - Guests not allowed")
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
if (config.panic_bunker && dbcon && dbcon.IsConnected())
|
||||
if (config.panic_bunker && GLOB.dbcon && GLOB.dbcon.IsConnected())
|
||||
log_access("Failed Login: [key] - Guests not allowed during panic bunker")
|
||||
return list("reason"="guest", "desc"="\nReason: Sorry but the server is currently not accepting connections from never before seen players or guests. If you have played on this server with a byond account before, please log in to the byond account you have played from.")
|
||||
|
||||
@@ -61,9 +61,9 @@
|
||||
|
||||
var/ckeytext = ckey(key)
|
||||
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
log_world("Ban database connection failure. Key [ckeytext] not checked")
|
||||
diary << "Ban database connection failure. Key [ckeytext] not checked"
|
||||
GLOB.diary << "Ban database connection failure. Key [ckeytext] not checked"
|
||||
return
|
||||
|
||||
var/ipquery = ""
|
||||
@@ -74,7 +74,7 @@
|
||||
if(computer_id)
|
||||
cidquery = " OR computerid = '[computer_id]' "
|
||||
|
||||
var/DBQuery/query_ban_check = dbcon.NewQuery("SELECT ckey, a_ckey, reason, expiration_time, duration, bantime, bantype FROM [format_table_name("ban")] WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR bantype = 'ADMIN_PERMABAN' OR ((bantype = 'TEMPBAN' OR bantype = 'ADMIN_TEMPBAN') AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
var/DBQuery/query_ban_check = GLOB.dbcon.NewQuery("SELECT ckey, a_ckey, reason, expiration_time, duration, bantime, bantype FROM [format_table_name("ban")] WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR bantype = 'ADMIN_PERMABAN' OR ((bantype = 'TEMPBAN' OR bantype = 'ADMIN_TEMPBAN') AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
if(!query_ban_check.Execute())
|
||||
return
|
||||
while(query_ban_check.NextRow())
|
||||
@@ -120,7 +120,7 @@
|
||||
bannedckey = ban["ckey"]
|
||||
|
||||
var/newmatch = FALSE
|
||||
var/client/C = directory[ckey]
|
||||
var/client/C = GLOB.directory[ckey]
|
||||
var/cachedban = SSstickyban.cache[bannedckey]
|
||||
|
||||
//rogue ban in the process of being reverted.
|
||||
|
||||
@@ -1,76 +1,77 @@
|
||||
var/CMinutes = null
|
||||
var/savefile/Banlist
|
||||
GLOBAL_VAR(CMinutes)
|
||||
GLOBAL_DATUM(Banlist, /savefile)
|
||||
GLOBAL_PROTECT(Banlist)
|
||||
|
||||
|
||||
/proc/CheckBan(ckey, id, address)
|
||||
if(!Banlist) // if Banlist cannot be located for some reason
|
||||
if(!GLOB.Banlist) // if Banlist cannot be located for some reason
|
||||
LoadBans() // try to load the bans
|
||||
if(!Banlist) // uh oh, can't find bans!
|
||||
if(!GLOB.Banlist) // uh oh, can't find bans!
|
||||
return 0 // ABORT ABORT ABORT
|
||||
|
||||
. = list()
|
||||
var/appeal
|
||||
if(config && config.banappeals)
|
||||
appeal = "\nFor more information on your ban, or to appeal, head to <a href='[config.banappeals]'>[config.banappeals]</a>"
|
||||
Banlist.cd = "/base"
|
||||
if( "[ckey][id]" in Banlist.dir )
|
||||
Banlist.cd = "[ckey][id]"
|
||||
if (Banlist["temp"])
|
||||
if (!GetExp(Banlist["minutes"]))
|
||||
GLOB.Banlist.cd = "/base"
|
||||
if( "[ckey][id]" in GLOB.Banlist.dir )
|
||||
GLOB.Banlist.cd = "[ckey][id]"
|
||||
if (GLOB.Banlist["temp"])
|
||||
if (!GetExp(GLOB.Banlist["minutes"]))
|
||||
ClearTempbans()
|
||||
return 0
|
||||
else
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
|
||||
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: [GetExp(GLOB.Banlist["minutes"])]\nBy: [GLOB.Banlist["bannedby"]][appeal]"
|
||||
else
|
||||
Banlist.cd = "/base/[ckey][id]"
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [Banlist["bannedby"]][appeal]"
|
||||
GLOB.Banlist.cd = "/base/[ckey][id]"
|
||||
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [GLOB.Banlist["bannedby"]][appeal]"
|
||||
.["reason"] = "ckey/id"
|
||||
return .
|
||||
else
|
||||
for (var/A in Banlist.dir)
|
||||
Banlist.cd = "/base/[A]"
|
||||
for (var/A in GLOB.Banlist.dir)
|
||||
GLOB.Banlist.cd = "/base/[A]"
|
||||
var/matches
|
||||
if( ckey == Banlist["key"] )
|
||||
if( ckey == GLOB.Banlist["key"] )
|
||||
matches += "ckey"
|
||||
if( id == Banlist["id"] )
|
||||
if( id == GLOB.Banlist["id"] )
|
||||
if(matches)
|
||||
matches += "/"
|
||||
matches += "id"
|
||||
if( address == Banlist["ip"] )
|
||||
if( address == GLOB.Banlist["ip"] )
|
||||
if(matches)
|
||||
matches += "/"
|
||||
matches += "ip"
|
||||
|
||||
if(matches)
|
||||
if(Banlist["temp"])
|
||||
if (!GetExp(Banlist["minutes"]))
|
||||
if(GLOB.Banlist["temp"])
|
||||
if (!GetExp(GLOB.Banlist["minutes"]))
|
||||
ClearTempbans()
|
||||
return 0
|
||||
else
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: [GetExp(Banlist["minutes"])]\nBy: [Banlist["bannedby"]][appeal]"
|
||||
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: [GetExp(GLOB.Banlist["minutes"])]\nBy: [GLOB.Banlist["bannedby"]][appeal]"
|
||||
else
|
||||
.["desc"] = "\nReason: [Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [Banlist["bannedby"]][appeal]"
|
||||
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [GLOB.Banlist["bannedby"]][appeal]"
|
||||
.["reason"] = matches
|
||||
return .
|
||||
return 0
|
||||
|
||||
/proc/UpdateTime() //No idea why i made this a proc.
|
||||
CMinutes = (world.realtime / 10) / 60
|
||||
GLOB.CMinutes = (world.realtime / 10) / 60
|
||||
return 1
|
||||
|
||||
/proc/LoadBans()
|
||||
|
||||
Banlist = new("data/banlist.bdb")
|
||||
GLOB.Banlist = new("data/banlist.bdb")
|
||||
log_admin("Loading Banlist")
|
||||
|
||||
if (!length(Banlist.dir)) log_admin("Banlist is empty.")
|
||||
if (!length(GLOB.Banlist.dir)) log_admin("Banlist is empty.")
|
||||
|
||||
if (!Banlist.dir.Find("base"))
|
||||
if (!GLOB.Banlist.dir.Find("base"))
|
||||
log_admin("Banlist missing base dir.")
|
||||
Banlist.dir.Add("base")
|
||||
Banlist.cd = "/base"
|
||||
else if (Banlist.dir.Find("base"))
|
||||
Banlist.cd = "/base"
|
||||
GLOB.Banlist.dir.Add("base")
|
||||
GLOB.Banlist.cd = "/base"
|
||||
else if (GLOB.Banlist.dir.Find("base"))
|
||||
GLOB.Banlist.cd = "/base"
|
||||
|
||||
ClearTempbans()
|
||||
return 1
|
||||
@@ -78,17 +79,17 @@ var/savefile/Banlist
|
||||
/proc/ClearTempbans()
|
||||
UpdateTime()
|
||||
|
||||
Banlist.cd = "/base"
|
||||
for (var/A in Banlist.dir)
|
||||
Banlist.cd = "/base/[A]"
|
||||
if (!Banlist["key"] || !Banlist["id"])
|
||||
GLOB.Banlist.cd = "/base"
|
||||
for (var/A in GLOB.Banlist.dir)
|
||||
GLOB.Banlist.cd = "/base/[A]"
|
||||
if (!GLOB.Banlist["key"] || !GLOB.Banlist["id"])
|
||||
RemoveBan(A)
|
||||
log_admin("Invalid Ban.")
|
||||
message_admins("Invalid Ban.")
|
||||
continue
|
||||
|
||||
if (!Banlist["temp"]) continue
|
||||
if (CMinutes >= Banlist["minutes"]) RemoveBan(A)
|
||||
if (!GLOB.Banlist["temp"]) continue
|
||||
if (GLOB.CMinutes >= GLOB.Banlist["minutes"]) RemoveBan(A)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -99,23 +100,23 @@ var/savefile/Banlist
|
||||
|
||||
if (temp)
|
||||
UpdateTime()
|
||||
bantimestamp = CMinutes + minutes
|
||||
bantimestamp = GLOB.CMinutes + minutes
|
||||
|
||||
Banlist.cd = "/base"
|
||||
if ( Banlist.dir.Find("[ckey][computerid]") )
|
||||
GLOB.Banlist.cd = "/base"
|
||||
if ( GLOB.Banlist.dir.Find("[ckey][computerid]") )
|
||||
to_chat(usr, text("<span class='danger'>Ban already exists.</span>"))
|
||||
return 0
|
||||
else
|
||||
Banlist.dir.Add("[ckey][computerid]")
|
||||
Banlist.cd = "/base/[ckey][computerid]"
|
||||
Banlist["key"] << ckey
|
||||
Banlist["id"] << computerid
|
||||
Banlist["ip"] << address
|
||||
Banlist["reason"] << reason
|
||||
Banlist["bannedby"] << bannedby
|
||||
Banlist["temp"] << temp
|
||||
GLOB.Banlist.dir.Add("[ckey][computerid]")
|
||||
GLOB.Banlist.cd = "/base/[ckey][computerid]"
|
||||
GLOB.Banlist["key"] << ckey
|
||||
GLOB.Banlist["id"] << computerid
|
||||
GLOB.Banlist["ip"] << address
|
||||
GLOB.Banlist["reason"] << reason
|
||||
GLOB.Banlist["bannedby"] << bannedby
|
||||
GLOB.Banlist["temp"] << temp
|
||||
if (temp)
|
||||
Banlist["minutes"] << bantimestamp
|
||||
GLOB.Banlist["minutes"] << bantimestamp
|
||||
if(!temp)
|
||||
create_message("note", ckey, bannedby, "Permanently banned - [reason]", null, null, 0, 0)
|
||||
else
|
||||
@@ -126,12 +127,12 @@ var/savefile/Banlist
|
||||
var/key
|
||||
var/id
|
||||
|
||||
Banlist.cd = "/base/[foldername]"
|
||||
Banlist["key"] >> key
|
||||
Banlist["id"] >> id
|
||||
Banlist.cd = "/base"
|
||||
GLOB.Banlist.cd = "/base/[foldername]"
|
||||
GLOB.Banlist["key"] >> key
|
||||
GLOB.Banlist["id"] >> id
|
||||
GLOB.Banlist.cd = "/base"
|
||||
|
||||
if (!Banlist.dir.Remove(foldername)) return 0
|
||||
if (!GLOB.Banlist.dir.Remove(foldername)) return 0
|
||||
|
||||
if(!usr)
|
||||
log_admin_private("Ban Expired: [key]")
|
||||
@@ -142,18 +143,18 @@ var/savefile/Banlist
|
||||
message_admins("[key_name_admin(usr)] unbanned: [key]")
|
||||
feedback_inc("ban_unban",1)
|
||||
usr.client.holder.DB_ban_unban( ckey(key), BANTYPE_ANY_FULLBAN)
|
||||
for (var/A in Banlist.dir)
|
||||
Banlist.cd = "/base/[A]"
|
||||
if (key == Banlist["key"] /*|| id == Banlist["id"]*/)
|
||||
Banlist.cd = "/base"
|
||||
Banlist.dir.Remove(A)
|
||||
for (var/A in GLOB.Banlist.dir)
|
||||
GLOB.Banlist.cd = "/base/[A]"
|
||||
if (key == GLOB.Banlist["key"] /*|| id == Banlist["id"]*/)
|
||||
GLOB.Banlist.cd = "/base"
|
||||
GLOB.Banlist.dir.Remove(A)
|
||||
continue
|
||||
|
||||
return 1
|
||||
|
||||
/proc/GetExp(minutes as num)
|
||||
UpdateTime()
|
||||
var/exp = minutes - CMinutes
|
||||
var/exp = minutes - GLOB.CMinutes
|
||||
if (exp <= 0)
|
||||
return 0
|
||||
else
|
||||
@@ -170,19 +171,19 @@ var/savefile/Banlist
|
||||
var/count = 0
|
||||
var/dat
|
||||
//var/dat = "<HR><B>Unban Player:</B> \blue(U) = Unban , (E) = Edit Ban\green (Total<HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >"
|
||||
Banlist.cd = "/base"
|
||||
for (var/A in Banlist.dir)
|
||||
GLOB.Banlist.cd = "/base"
|
||||
for (var/A in GLOB.Banlist.dir)
|
||||
count++
|
||||
Banlist.cd = "/base/[A]"
|
||||
GLOB.Banlist.cd = "/base/[A]"
|
||||
var/ref = "\ref[src]"
|
||||
var/key = Banlist["key"]
|
||||
var/id = Banlist["id"]
|
||||
var/ip = Banlist["ip"]
|
||||
var/reason = Banlist["reason"]
|
||||
var/by = Banlist["bannedby"]
|
||||
var/key = GLOB.Banlist["key"]
|
||||
var/id = GLOB.Banlist["id"]
|
||||
var/ip = GLOB.Banlist["ip"]
|
||||
var/reason = GLOB.Banlist["reason"]
|
||||
var/by = GLOB.Banlist["bannedby"]
|
||||
var/expiry
|
||||
if(Banlist["temp"])
|
||||
expiry = GetExp(Banlist["minutes"])
|
||||
if(GLOB.Banlist["temp"])
|
||||
expiry = GetExp(GLOB.Banlist["minutes"])
|
||||
if(!expiry)
|
||||
expiry = "Removal Pending"
|
||||
else
|
||||
@@ -207,26 +208,26 @@ var/savefile/Banlist
|
||||
var/a = pick(1,0)
|
||||
var/b = pick(1,0)
|
||||
if(b)
|
||||
Banlist.cd = "/base"
|
||||
Banlist.dir.Add("trash[i]trashid[i]")
|
||||
Banlist.cd = "/base/trash[i]trashid[i]"
|
||||
Banlist["key"] << "trash[i]"
|
||||
GLOB.Banlist.cd = "/base"
|
||||
GLOB.Banlist.dir.Add("trash[i]trashid[i]")
|
||||
GLOB.Banlist.cd = "/base/trash[i]trashid[i]"
|
||||
GLOB.Banlist["key"] << "trash[i]"
|
||||
else
|
||||
Banlist.cd = "/base"
|
||||
Banlist.dir.Add("[last]trashid[i]")
|
||||
Banlist.cd = "/base/[last]trashid[i]"
|
||||
Banlist["key"] << last
|
||||
Banlist["id"] << "trashid[i]"
|
||||
Banlist["reason"] << "Trashban[i]."
|
||||
Banlist["temp"] << a
|
||||
Banlist["minutes"] << CMinutes + rand(1,2000)
|
||||
Banlist["bannedby"] << "trashmin"
|
||||
GLOB.Banlist.cd = "/base"
|
||||
GLOB.Banlist.dir.Add("[last]trashid[i]")
|
||||
GLOB.Banlist.cd = "/base/[last]trashid[i]"
|
||||
GLOB.Banlist["key"] << last
|
||||
GLOB.Banlist["id"] << "trashid[i]"
|
||||
GLOB.Banlist["reason"] << "Trashban[i]."
|
||||
GLOB.Banlist["temp"] << a
|
||||
GLOB.Banlist["minutes"] << GLOB.CMinutes + rand(1,2000)
|
||||
GLOB.Banlist["bannedby"] << "trashmin"
|
||||
last = "trash[i]"
|
||||
|
||||
Banlist.cd = "/base"
|
||||
GLOB.Banlist.cd = "/base"
|
||||
|
||||
/proc/ClearAllBans()
|
||||
Banlist.cd = "/base"
|
||||
for (var/A in Banlist.dir)
|
||||
GLOB.Banlist.cd = "/base"
|
||||
for (var/A in GLOB.Banlist.dir)
|
||||
RemoveBan(A)
|
||||
|
||||
|
||||
+42
-44
@@ -1,19 +1,17 @@
|
||||
|
||||
var/global/BSACooldown = 0
|
||||
|
||||
////////////////////////////////
|
||||
/proc/message_admins(msg)
|
||||
msg = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[msg]</span></span>"
|
||||
to_chat(admins, msg)
|
||||
to_chat(GLOB.admins, msg)
|
||||
|
||||
/proc/relay_msg_admins(msg)
|
||||
msg = "<span class=\"admin\"><span class=\"prefix\">RELAY:</span> <span class=\"message\">[msg]</span></span>"
|
||||
to_chat(admins, msg)
|
||||
to_chat(GLOB.admins, msg)
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////Panels
|
||||
|
||||
/datum/admins/proc/show_player_panel(mob/M in mob_list)
|
||||
/datum/admins/proc/show_player_panel(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Show Player Panel"
|
||||
set desc="Edit player (respawn, ban, heal, etc)"
|
||||
@@ -189,14 +187,14 @@ var/global/BSACooldown = 0
|
||||
dat += "Welcome to the admin newscaster.<BR> Here you can add, edit and censor every newspiece on the network."
|
||||
dat += "<BR>Feed channels and stories entered through here will be uneditable and handled as official news by the rest of the units."
|
||||
dat += "<BR>Note that this panel allows full freedom over the news network, there are no constrictions except the few basic ones. Don't break things!</FONT>"
|
||||
if(news_network.wanted_issue.active)
|
||||
if(GLOB.news_network.wanted_issue.active)
|
||||
dat+= "<HR><A href='?src=\ref[src];ac_view_wanted=1'>Read Wanted Issue</A>"
|
||||
dat+= "<HR><BR><A href='?src=\ref[src];ac_create_channel=1'>Create Feed Channel</A>"
|
||||
dat+= "<BR><A href='?src=\ref[src];ac_view=1'>View Feed Channels</A>"
|
||||
dat+= "<BR><A href='?src=\ref[src];ac_create_feed_story=1'>Submit new Feed story</A>"
|
||||
dat+= "<BR><BR><A href='?src=\ref[usr];mach_close=newscaster_main'>Exit</A>"
|
||||
var/wanted_already = 0
|
||||
if(news_network.wanted_issue.active)
|
||||
if(GLOB.news_network.wanted_issue.active)
|
||||
wanted_already = 1
|
||||
dat+="<HR><B>Feed Security functions:</B><BR>"
|
||||
dat+="<BR><A href='?src=\ref[src];ac_menu_wanted=1'>[(wanted_already) ? ("Manage") : ("Publish")] \"Wanted\" Issue</A>"
|
||||
@@ -205,10 +203,10 @@ var/global/BSACooldown = 0
|
||||
dat+="<BR><HR><A href='?src=\ref[src];ac_set_signature=1'>The newscaster recognises you as:<BR> <FONT COLOR='green'>[src.admin_signature]</FONT></A>"
|
||||
if(1)
|
||||
dat+= "Station Feed Channels<HR>"
|
||||
if( isemptylist(news_network.network_channels) )
|
||||
if( isemptylist(GLOB.news_network.network_channels) )
|
||||
dat+="<I>No active channels found...</I>"
|
||||
else
|
||||
for(var/datum/newscaster/feed_channel/CHANNEL in news_network.network_channels)
|
||||
for(var/datum/newscaster/feed_channel/CHANNEL in GLOB.news_network.network_channels)
|
||||
if(CHANNEL.is_admin_channel)
|
||||
dat+="<B><FONT style='BACKGROUND-COLOR: LightGreen'><A href='?src=\ref[src];ac_show_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A></FONT></B><BR>"
|
||||
else
|
||||
@@ -245,7 +243,7 @@ var/global/BSACooldown = 0
|
||||
if(src.admincaster_feed_channel.channel_name =="" || src.admincaster_feed_channel.channel_name == "\[REDACTED\]")
|
||||
dat+="<FONT COLOR='maroon'>Invalid channel name.</FONT><BR>"
|
||||
var/check = 0
|
||||
for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
|
||||
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
|
||||
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
|
||||
check = 1
|
||||
break
|
||||
@@ -280,10 +278,10 @@ var/global/BSACooldown = 0
|
||||
dat+="<FONT SIZE=1>NOTE: Due to the nature of news Feeds, total deletion of a Feed Story is not possible.<BR>"
|
||||
dat+="Keep in mind that users attempting to view a censored feed will instead see the \[REDACTED\] tag above it.</FONT>"
|
||||
dat+="<HR>Select Feed channel to get Stories from:<BR>"
|
||||
if(isemptylist(news_network.network_channels))
|
||||
if(isemptylist(GLOB.news_network.network_channels))
|
||||
dat+="<I>No feed channels found active...</I><BR>"
|
||||
else
|
||||
for(var/datum/newscaster/feed_channel/CHANNEL in news_network.network_channels)
|
||||
for(var/datum/newscaster/feed_channel/CHANNEL in GLOB.news_network.network_channels)
|
||||
dat+="<A href='?src=\ref[src];ac_pick_censor_channel=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
|
||||
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Cancel</A>"
|
||||
if(11)
|
||||
@@ -291,10 +289,10 @@ var/global/BSACooldown = 0
|
||||
dat+="<FONT SIZE=1>A D-Notice is to be bestowed upon the channel if the handling Authority deems it as harmful for the station's"
|
||||
dat+="morale, integrity or disciplinary behaviour. A D-Notice will render a channel unable to be updated by anyone, without deleting any feed"
|
||||
dat+="stories it might contain at the time. You can lift a D-Notice if you have the required access at any time.</FONT><HR>"
|
||||
if(isemptylist(news_network.network_channels))
|
||||
if(isemptylist(GLOB.news_network.network_channels))
|
||||
dat+="<I>No feed channels found active...</I><BR>"
|
||||
else
|
||||
for(var/datum/newscaster/feed_channel/CHANNEL in news_network.network_channels)
|
||||
for(var/datum/newscaster/feed_channel/CHANNEL in GLOB.news_network.network_channels)
|
||||
dat+="<A href='?src=\ref[src];ac_pick_d_notice=\ref[CHANNEL]'>[CHANNEL.channel_name]</A> [(CHANNEL.censored) ? ("<FONT COLOR='red'>***</FONT>") : ()]<BR>"
|
||||
|
||||
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Back</A>"
|
||||
@@ -329,7 +327,7 @@ var/global/BSACooldown = 0
|
||||
dat+="<B>Wanted Issue Handler:</B>"
|
||||
var/wanted_already = 0
|
||||
var/end_param = 1
|
||||
if(news_network.wanted_issue.active)
|
||||
if(GLOB.news_network.wanted_issue.active)
|
||||
wanted_already = 1
|
||||
end_param = 2
|
||||
if(wanted_already)
|
||||
@@ -338,7 +336,7 @@ var/global/BSACooldown = 0
|
||||
dat+="<A href='?src=\ref[src];ac_set_wanted_name=1'>Criminal Name</A>: [src.admincaster_wanted_message.criminal] <BR>"
|
||||
dat+="<A href='?src=\ref[src];ac_set_wanted_desc=1'>Description</A>: [src.admincaster_wanted_message.body] <BR>"
|
||||
if(wanted_already)
|
||||
dat+="<B>Wanted Issue created by:</B><FONT COLOR='green'>[news_network.wanted_issue.scannedUser]</FONT><BR>"
|
||||
dat+="<B>Wanted Issue created by:</B><FONT COLOR='green'>[GLOB.news_network.wanted_issue.scannedUser]</FONT><BR>"
|
||||
else
|
||||
dat+="<B>Wanted Issue will be created under prosecutor:</B><FONT COLOR='green'>[src.admin_signature]</FONT><BR>"
|
||||
dat+="<BR><A href='?src=\ref[src];ac_submit_wanted=[end_param]'>[(wanted_already) ? ("Edit Issue") : ("Submit")]</A>"
|
||||
@@ -359,12 +357,12 @@ var/global/BSACooldown = 0
|
||||
dat+="<B>Wanted Issue successfully deleted from Circulation</B><BR>"
|
||||
dat+="<BR><A href='?src=\ref[src];ac_setScreen=[0]'>Return</A><BR>"
|
||||
if(18)
|
||||
dat+="<B><FONT COLOR ='maroon'>-- STATIONWIDE WANTED ISSUE --</B></FONT><BR><FONT SIZE=2>\[Submitted by: <FONT COLOR='green'>[news_network.wanted_issue.scannedUser]</FONT>\]</FONT><HR>"
|
||||
dat+="<B>Criminal</B>: [news_network.wanted_issue.criminal]<BR>"
|
||||
dat+="<B>Description</B>: [news_network.wanted_issue.body]<BR>"
|
||||
dat+="<B><FONT COLOR ='maroon'>-- STATIONWIDE WANTED ISSUE --</B></FONT><BR><FONT SIZE=2>\[Submitted by: <FONT COLOR='green'>[GLOB.news_network.wanted_issue.scannedUser]</FONT>\]</FONT><HR>"
|
||||
dat+="<B>Criminal</B>: [GLOB.news_network.wanted_issue.criminal]<BR>"
|
||||
dat+="<B>Description</B>: [GLOB.news_network.wanted_issue.body]<BR>"
|
||||
dat+="<B>Photo:</B>: "
|
||||
if(news_network.wanted_issue.img)
|
||||
usr << browse_rsc(news_network.wanted_issue.img, "tmp_photow.png")
|
||||
if(GLOB.news_network.wanted_issue.img)
|
||||
usr << browse_rsc(GLOB.news_network.wanted_issue.img, "tmp_photow.png")
|
||||
dat+="<BR><img src='tmp_photow.png' width = '180'>"
|
||||
else
|
||||
dat+="None"
|
||||
@@ -389,7 +387,7 @@ var/global/BSACooldown = 0
|
||||
<center><B>Game Panel</B></center><hr>\n
|
||||
<A href='?src=\ref[src];c_mode=1'>Change Game Mode</A><br>
|
||||
"}
|
||||
if(master_mode == "secret")
|
||||
if(GLOB.master_mode == "secret")
|
||||
dat += "<A href='?src=\ref[src];f_secret=1'>(Force Secret Mode)</A><br>"
|
||||
|
||||
dat += {"
|
||||
@@ -461,20 +459,20 @@ var/global/BSACooldown = 0
|
||||
if(!check_rights(0))
|
||||
return
|
||||
|
||||
var/new_admin_notice = input(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",admin_notice) as message|null
|
||||
var/new_admin_notice = input(src,"Set a public notice for this round. Everyone who joins the server will see it.\n(Leaving it blank will delete the current notice):","Set Notice",GLOB.admin_notice) as message|null
|
||||
if(new_admin_notice == null)
|
||||
return
|
||||
if(new_admin_notice == admin_notice)
|
||||
if(new_admin_notice == GLOB.admin_notice)
|
||||
return
|
||||
if(new_admin_notice == "")
|
||||
message_admins("[key_name(usr)] removed the admin notice.")
|
||||
log_admin("[key_name(usr)] removed the admin notice:\n[admin_notice]")
|
||||
log_admin("[key_name(usr)] removed the admin notice:\n[GLOB.admin_notice]")
|
||||
else
|
||||
message_admins("[key_name(usr)] set the admin notice.")
|
||||
log_admin("[key_name(usr)] set the admin notice:\n[new_admin_notice]")
|
||||
to_chat(world, "<span class ='adminnotice'><b>Admin Notice:</b>\n \t [new_admin_notice]</span>")
|
||||
feedback_add_details("admin_verb","SAN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
admin_notice = new_admin_notice
|
||||
GLOB.admin_notice = new_admin_notice
|
||||
return
|
||||
|
||||
/datum/admins/proc/toggleooc()
|
||||
@@ -490,7 +488,7 @@ var/global/BSACooldown = 0
|
||||
set category = "Server"
|
||||
set desc="Toggle dis bitch"
|
||||
set name="Toggle Dead OOC"
|
||||
dooc_allowed = !( dooc_allowed )
|
||||
GLOB.dooc_allowed = !( GLOB.dooc_allowed )
|
||||
|
||||
log_admin("[key_name(usr)] toggled OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.")
|
||||
@@ -529,8 +527,8 @@ var/global/BSACooldown = 0
|
||||
set category = "Server"
|
||||
set desc="People can't enter"
|
||||
set name="Toggle Entering"
|
||||
enter_allowed = !( enter_allowed )
|
||||
if (!( enter_allowed ))
|
||||
GLOB.enter_allowed = !( GLOB.enter_allowed )
|
||||
if (!( GLOB.enter_allowed ))
|
||||
to_chat(world, "<B>New players may no longer enter the game.</B>")
|
||||
else
|
||||
to_chat(world, "<B>New players may now enter the game.</B>")
|
||||
@@ -556,13 +554,13 @@ var/global/BSACooldown = 0
|
||||
set category = "Server"
|
||||
set desc="Respawn basically"
|
||||
set name="Toggle Respawn"
|
||||
abandon_allowed = !( abandon_allowed )
|
||||
if (abandon_allowed)
|
||||
GLOB.abandon_allowed = !( GLOB.abandon_allowed )
|
||||
if (GLOB.abandon_allowed)
|
||||
to_chat(world, "<B>You may now respawn.</B>")
|
||||
else
|
||||
to_chat(world, "<B>You may no longer respawn :(</B>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].</span>")
|
||||
log_admin("[key_name(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled respawn to [GLOB.abandon_allowed ? "On" : "Off"].</span>")
|
||||
log_admin("[key_name(usr)] toggled respawn to [GLOB.abandon_allowed ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -585,11 +583,11 @@ var/global/BSACooldown = 0
|
||||
log_admin("[key_name(usr)] set the pre-game delay to [newtime] seconds.")
|
||||
feedback_add_details("admin_verb","DELAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/unprison(mob/M in mob_list)
|
||||
/datum/admins/proc/unprison(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Unprison"
|
||||
if (M.z == ZLEVEL_CENTCOM)
|
||||
M.loc = pick(latejoin)
|
||||
M.loc = pick(GLOB.latejoin)
|
||||
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]")
|
||||
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
|
||||
else
|
||||
@@ -638,7 +636,7 @@ var/global/BSACooldown = 0
|
||||
feedback_add_details("admin_verb","SA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/datum/admins/proc/show_traitor_panel(mob/M in mob_list)
|
||||
/datum/admins/proc/show_traitor_panel(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set desc = "Edit mobs's memory and role"
|
||||
set name = "Show Traitor Panel"
|
||||
@@ -658,8 +656,8 @@ var/global/BSACooldown = 0
|
||||
set category = "Debug"
|
||||
set desc="Reduces view range when wearing welding helmets"
|
||||
set name="Toggle tinted welding helmes"
|
||||
tinted_weldhelh = !( tinted_weldhelh )
|
||||
if (tinted_weldhelh)
|
||||
GLOB.tinted_weldhelh = !( GLOB.tinted_weldhelh )
|
||||
if (GLOB.tinted_weldhelh)
|
||||
to_chat(world, "<B>The tinted_weldhelh has been enabled!</B>")
|
||||
else
|
||||
to_chat(world, "<B>The tinted_weldhelh has been disabled!</B>")
|
||||
@@ -671,18 +669,18 @@ var/global/BSACooldown = 0
|
||||
set category = "Server"
|
||||
set desc="Guests can't enter"
|
||||
set name="Toggle guests"
|
||||
guests_allowed = !( guests_allowed )
|
||||
if (!( guests_allowed ))
|
||||
GLOB.guests_allowed = !( GLOB.guests_allowed )
|
||||
if (!( GLOB.guests_allowed ))
|
||||
to_chat(world, "<B>Guests may no longer enter the game.</B>")
|
||||
else
|
||||
to_chat(world, "<B>Guests may now enter the game.</B>")
|
||||
log_admin("[key_name(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.</span>")
|
||||
log_admin("[key_name(usr)] toggled guests game entering [GLOB.guests_allowed?"":"dis"]allowed.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled guests game entering [GLOB.guests_allowed?"":"dis"]allowed.</span>")
|
||||
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/output_ai_laws()
|
||||
var/ai_number = 0
|
||||
for(var/mob/living/silicon/S in mob_list)
|
||||
for(var/mob/living/silicon/S in GLOB.mob_list)
|
||||
ai_number++
|
||||
if(isAI(S))
|
||||
to_chat(usr, "<b>AI [key_name(S, usr)]'s laws:</b>")
|
||||
@@ -770,7 +768,7 @@ var/global/BSACooldown = 0
|
||||
//returns a list of ckeys of the kicked clients
|
||||
/proc/kick_clients_in_lobby(message, kick_only_afk = 0)
|
||||
var/list/kicked_client_names = list()
|
||||
for(var/client/C in clients)
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(isnewplayer(C.mob))
|
||||
if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk
|
||||
continue
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
if("hrefs") //persistent logs and stuff
|
||||
if(href_logfile)
|
||||
src << browse(href_logfile,"window=investigate[subject];size=800x300")
|
||||
if(GLOB.href_logfile)
|
||||
src << browse(GLOB.href_logfile,"window=investigate[subject];size=800x300")
|
||||
else if(!config.log_hrefs)
|
||||
to_chat(src, "<span class='danger'>Href logging is off and no logfile was found.</span>")
|
||||
return
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
GLOBAL_LIST_EMPTY(admin_ranks) //list of all admin_rank datums
|
||||
GLOBAL_PROTECT(admin_ranks)
|
||||
|
||||
/datum/admin_rank
|
||||
var/name = "NoRank"
|
||||
@@ -99,7 +100,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
|
||||
//load our rank - > rights associations
|
||||
/proc/load_admin_ranks()
|
||||
admin_ranks.Cut()
|
||||
GLOB.admin_ranks.Cut()
|
||||
|
||||
if(config.admin_legacy_system)
|
||||
var/previous_rights = 0
|
||||
@@ -114,7 +115,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
var/datum/admin_rank/R = new(ckeyEx(copytext(line, 1, next)))
|
||||
if(!R)
|
||||
continue
|
||||
admin_ranks += R
|
||||
GLOB.admin_ranks += R
|
||||
|
||||
var/prev = findchar(line, "+-", next, 0)
|
||||
while(prev)
|
||||
@@ -124,14 +125,14 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
|
||||
previous_rights = R.rights
|
||||
else
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
log_world("Failed to connect to database in load_admin_ranks(). Reverting to legacy system.")
|
||||
diary << "Failed to connect to database in load_admin_ranks(). Reverting to legacy system."
|
||||
GLOB.diary << "Failed to connect to database in load_admin_ranks(). Reverting to legacy system."
|
||||
config.admin_legacy_system = 1
|
||||
load_admin_ranks()
|
||||
return
|
||||
|
||||
var/DBQuery/query_load_admin_ranks = dbcon.NewQuery("SELECT rank, flags FROM [format_table_name("admin_ranks")]")
|
||||
var/DBQuery/query_load_admin_ranks = GLOB.dbcon.NewQuery("SELECT rank, flags FROM [format_table_name("admin_ranks")]")
|
||||
if(!query_load_admin_ranks.Execute())
|
||||
return
|
||||
while(query_load_admin_ranks.NextRow())
|
||||
@@ -142,11 +143,11 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
var/datum/admin_rank/R = new(rank_name, flags)
|
||||
if(!R)
|
||||
continue
|
||||
admin_ranks += R
|
||||
GLOB.admin_ranks += R
|
||||
|
||||
#ifdef TESTING
|
||||
var/msg = "Permission Sets Built:\n"
|
||||
for(var/datum/admin_rank/R in admin_ranks)
|
||||
for(var/datum/admin_rank/R in GLOB.admin_ranks)
|
||||
msg += "\t[R.name]"
|
||||
var/rights = rights2text(R.rights,"\n\t\t",R.adds,R.subs)
|
||||
if(rights)
|
||||
@@ -158,18 +159,18 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
/proc/load_admins(target = null)
|
||||
//clear the datums references
|
||||
if(!target)
|
||||
admin_datums.Cut()
|
||||
for(var/client/C in admins)
|
||||
GLOB.admin_datums.Cut()
|
||||
for(var/client/C in GLOB.admins)
|
||||
C.remove_admin_verbs()
|
||||
C.holder = null
|
||||
admins.Cut()
|
||||
GLOB.admins.Cut()
|
||||
load_admin_ranks()
|
||||
//Clear profile access
|
||||
for(var/A in world.GetConfig("admin"))
|
||||
world.SetConfig("APP/admin", A, null)
|
||||
|
||||
var/list/rank_names = list()
|
||||
for(var/datum/admin_rank/R in admin_ranks)
|
||||
for(var/datum/admin_rank/R in GLOB.admin_ranks)
|
||||
rank_names[R.name] = R
|
||||
|
||||
if(config.admin_legacy_system)
|
||||
@@ -197,16 +198,16 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
continue //will occur if an invalid rank is provided
|
||||
if(D.rank.rights & R_DEBUG) //grant profile access
|
||||
world.SetConfig("APP/admin", ckey, "role=admin")
|
||||
D.associate(directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
D.associate(GLOB.directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
else
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
log_world("Failed to connect to database in load_admins(). Reverting to legacy system.")
|
||||
diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||
GLOB.diary << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||
config.admin_legacy_system = 1
|
||||
load_admins()
|
||||
return
|
||||
|
||||
var/DBQuery/query_load_admins = dbcon.NewQuery("SELECT ckey, rank FROM [format_table_name("admin")]")
|
||||
var/DBQuery/query_load_admins = GLOB.dbcon.NewQuery("SELECT ckey, rank FROM [format_table_name("admin")]")
|
||||
if(!query_load_admins.Execute())
|
||||
return
|
||||
while(query_load_admins.NextRow())
|
||||
@@ -224,19 +225,19 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
continue //will occur if an invalid rank is provided
|
||||
if(D.rank.rights & R_DEBUG) //grant profile access
|
||||
world.SetConfig("APP/admin", ckey, "role=admin")
|
||||
D.associate(directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
D.associate(GLOB.directory[ckey]) //find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
|
||||
#ifdef TESTING
|
||||
var/msg = "Admins Built:\n"
|
||||
for(var/ckey in admin_datums)
|
||||
var/datum/admins/D = admin_datums[ckey]
|
||||
for(var/ckey in GLOB.admin_datums)
|
||||
var/datum/admins/D = GLOB.admin_datums[ckey]
|
||||
msg += "\t[ckey] - [D.rank.name]\n"
|
||||
testing(msg)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef TESTING
|
||||
/client/verb/changerank(newrank in admin_ranks)
|
||||
/client/verb/changerank(newrank in GLOB.admin_ranks)
|
||||
if(holder)
|
||||
holder.rank = newrank
|
||||
else
|
||||
@@ -266,7 +267,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null)
|
||||
if(!new_ckey)
|
||||
return
|
||||
if(new_ckey in admin_datums)
|
||||
if(new_ckey in GLOB.admin_datums)
|
||||
to_chat(usr, "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>")
|
||||
return
|
||||
adm_ckey = new_ckey
|
||||
@@ -277,7 +278,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
to_chat(usr, "<font color='red'>Error: Topic 'editrights': No valid ckey</font>")
|
||||
return
|
||||
|
||||
var/datum/admins/D = admin_datums[adm_ckey]
|
||||
var/datum/admins/D = GLOB.admin_datums[adm_ckey]
|
||||
|
||||
switch(task)
|
||||
if("remove")
|
||||
@@ -288,7 +289,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
message_admins("[key_name_admin(usr)] attempted to remove [adm_ckey] from the admins list without sufficient rights.")
|
||||
log_admin("[key_name(usr)] attempted to remove [adm_ckey] from the admins list without sufficient rights.")
|
||||
return
|
||||
admin_datums -= adm_ckey
|
||||
GLOB.admin_datums -= adm_ckey
|
||||
D.disassociate()
|
||||
|
||||
updateranktodb(adm_ckey, "player")
|
||||
@@ -300,7 +301,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
var/datum/admin_rank/R
|
||||
|
||||
var/list/rank_names = list("*New Rank*")
|
||||
for(R in admin_ranks)
|
||||
for(R in GLOB.admin_ranks)
|
||||
rank_names[R.name] = R
|
||||
|
||||
var/new_rank = input("Please select a rank", "New rank", null, null) as null|anything in rank_names
|
||||
@@ -325,7 +326,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
R = new(new_rank, D.rank.rights, D.rank.adds, D.rank.subs) //duplicate our previous admin_rank but with a new name
|
||||
else
|
||||
R = new(new_rank) //blank new admin_rank
|
||||
admin_ranks += R
|
||||
GLOB.admin_ranks += R
|
||||
|
||||
if(D) //they were previously an admin
|
||||
D.disassociate() //existing admin needs to be disassociated
|
||||
@@ -333,7 +334,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
else
|
||||
D = new(R,adm_ckey) //new admin
|
||||
|
||||
var/client/C = directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
|
||||
var/client/C = GLOB.directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
|
||||
D.associate(C) //link up with the client and add verbs
|
||||
|
||||
updateranktodb(adm_ckey, new_rank)
|
||||
@@ -362,7 +363,7 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
|
||||
D.rank.process_keyword(keyword)
|
||||
|
||||
var/client/C = directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
|
||||
var/client/C = GLOB.directory[adm_ckey] //find the client with the specified ckey (if they are logged in)
|
||||
D.associate(C) //link up with the client and add verbs
|
||||
|
||||
message_admins("[key_name(usr)] added keyword [keyword] to permission of [adm_ckey]")
|
||||
@@ -372,10 +373,10 @@ var/list/admin_ranks = list() //list of all admin_rank datums
|
||||
edit_admin_permissions()
|
||||
|
||||
/datum/admins/proc/updateranktodb(ckey,newrank)
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
return
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
var/sql_admin_rank = sanitizeSQL(newrank)
|
||||
|
||||
var/DBQuery/query_admin_rank_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'")
|
||||
var/DBQuery/query_admin_rank_update = GLOB.dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'")
|
||||
query_admin_rank_update.Execute()
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
//admin verb groups - They can overlap if you so wish. Only one of each verb will exist in the verbs list regardless
|
||||
var/list/admin_verbs_default = list(
|
||||
GLOBAL_PROTECT(admin_verbs_default)
|
||||
GLOBAL_LIST_INIT(admin_verbs_default, AVerbsDefault())
|
||||
/proc/AVerbsDefault()
|
||||
return list(
|
||||
/client/proc/toggleadminhelpsound, /*toggles whether we hear a sound when adminhelps/PMs are used*/
|
||||
/client/proc/toggleannouncelogin, /*toggles if an admin's login is announced during a round*/
|
||||
/client/proc/deadmin, /*destroys our own admin datum so we can play as a regular player*/
|
||||
@@ -20,7 +23,10 @@ var/list/admin_verbs_default = list(
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/client/proc/stop_sounds
|
||||
)
|
||||
var/list/admin_verbs_admin = list(
|
||||
GLOBAL_PROTECT(admin_verbs_admin)
|
||||
GLOBAL_LIST_INIT(admin_verbs_admin, AVerbsAdmin())
|
||||
/proc/AVerbsAdmin()
|
||||
return list(
|
||||
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
|
||||
/client/proc/invisimin, /*allows our mob to go invisible/visible*/
|
||||
// /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage
|
||||
@@ -66,17 +72,14 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/resetSNPC, /* Resets any interactive crewmembers in the world */
|
||||
/client/proc/open_shuttle_manipulator /* Opens shuttle manipulator UI */
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
/client/proc/DB_ban_panel,
|
||||
/client/proc/stickybanpanel
|
||||
)
|
||||
var/list/admin_verbs_sounds = list(
|
||||
/client/proc/play_local_sound,
|
||||
/client/proc/play_sound,
|
||||
/client/proc/set_round_end_sound,
|
||||
)
|
||||
var/list/admin_verbs_fun = list(
|
||||
GLOBAL_PROTECT(admin_verbs_ban)
|
||||
GLOBAL_LIST_INIT(admin_verbs_ban, list(/client/proc/unban_panel,/client/proc/DB_ban_panel,/client/proc/stickybanpanel))
|
||||
GLOBAL_PROTECT(admin_verbs_sounds)
|
||||
GLOBAL_LIST_INIT(admin_verbs_sounds, list(/client/proc/play_local_sound,/client/proc/play_sound,/client/proc/set_round_end_sound))
|
||||
GLOBAL_PROTECT(admin_verbs_fun)
|
||||
GLOBAL_LIST_INIT(admin_verbs_fun, AVerbsFun())
|
||||
/proc/AVerbsFun()
|
||||
return list(
|
||||
/client/proc/cmd_admin_dress,
|
||||
/client/proc/cmd_admin_gib_self,
|
||||
/client/proc/drop_bomb,
|
||||
@@ -99,11 +102,12 @@ var/list/admin_verbs_fun = list(
|
||||
/client/proc/show_tip,
|
||||
/client/proc/smite
|
||||
)
|
||||
var/list/admin_verbs_spawn = list(
|
||||
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
||||
/client/proc/respawn_character
|
||||
)
|
||||
var/list/admin_verbs_server = list(
|
||||
GLOBAL_PROTECT(admin_verbs_spawn)
|
||||
GLOBAL_LIST_INIT(admin_verbs_spawn, list(/datum/admins/proc/spawn_atom,/client/proc/respawn_character))
|
||||
GLOBAL_PROTECT(admin_verbs_server)
|
||||
GLOBAL_LIST_INIT(admin_verbs_server, AVerbsServer())
|
||||
/proc/AVerbsServer()
|
||||
return list(
|
||||
/datum/admins/proc/startnow,
|
||||
/datum/admins/proc/restart,
|
||||
/datum/admins/proc/end_round,
|
||||
@@ -119,9 +123,11 @@ var/list/admin_verbs_server = list(
|
||||
/client/proc/adminchangemap,
|
||||
/client/proc/panicbunker,
|
||||
/client/proc/toggle_hub
|
||||
|
||||
)
|
||||
var/list/admin_verbs_debug = list(
|
||||
GLOBAL_PROTECT(admin_verbs_debug)
|
||||
GLOBAL_LIST_INIT(admin_verbs_debug, AVerbsDebug())
|
||||
/proc/AVerbsDebug()
|
||||
return list(
|
||||
/client/proc/restart_controller,
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
/client/proc/Debug2,
|
||||
@@ -155,20 +161,18 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/view_runtimes,
|
||||
/client/proc/pump_random_event
|
||||
)
|
||||
var/list/admin_verbs_possess = list(
|
||||
/proc/possess,
|
||||
/proc/release
|
||||
)
|
||||
var/list/admin_verbs_permissions = list(
|
||||
/client/proc/edit_admin_permissions,
|
||||
/client/proc/create_poll
|
||||
)
|
||||
var/list/admin_verbs_rejuv = list(
|
||||
/client/proc/respawn_character
|
||||
)
|
||||
GLOBAL_PROTECT(admin_verbs_possess)
|
||||
GLOBAL_LIST_INIT(admin_verbs_possess, list(/proc/possess,/proc/release))
|
||||
GLOBAL_PROTECT(admin_verbs_permissions)
|
||||
GLOBAL_LIST_INIT(admin_verbs_permissions, list(/client/proc/edit_admin_permissions,/client/proc/create_poll))
|
||||
GLOBAL_PROTECT(admin_verbs_rejuv)
|
||||
GLOBAL_LIST_INIT(admin_verbs_rejuv, list(/client/proc/respawn_character))
|
||||
|
||||
//verbs which can be hidden - needs work
|
||||
var/list/admin_verbs_hideable = list(
|
||||
GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
GLOBAL_LIST_INIT(admin_verbs_hideable, AVerbsHideable())
|
||||
/proc/AVerbsHideable()
|
||||
return list(
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/reset_ooc,
|
||||
/client/proc/deadmin,
|
||||
@@ -245,31 +249,31 @@ var/list/admin_verbs_hideable = list(
|
||||
control_freak = CONTROL_FREAK_SKIN | CONTROL_FREAK_MACROS
|
||||
|
||||
var/rights = holder.rank.rights
|
||||
verbs += admin_verbs_default
|
||||
verbs += GLOB.admin_verbs_default
|
||||
if(rights & R_BUILDMODE)
|
||||
verbs += /client/proc/togglebuildmodeself
|
||||
if(rights & R_ADMIN)
|
||||
verbs += admin_verbs_admin
|
||||
verbs += GLOB.admin_verbs_admin
|
||||
if(rights & R_BAN)
|
||||
verbs += admin_verbs_ban
|
||||
verbs += GLOB.admin_verbs_ban
|
||||
if(rights & R_FUN)
|
||||
verbs += admin_verbs_fun
|
||||
verbs += GLOB.admin_verbs_fun
|
||||
if(rights & R_SERVER)
|
||||
verbs += admin_verbs_server
|
||||
verbs += GLOB.admin_verbs_server
|
||||
if(rights & R_DEBUG)
|
||||
verbs += admin_verbs_debug
|
||||
verbs += GLOB.admin_verbs_debug
|
||||
if(rights & R_POSSESS)
|
||||
verbs += admin_verbs_possess
|
||||
verbs += GLOB.admin_verbs_possess
|
||||
if(rights & R_PERMISSIONS)
|
||||
verbs += admin_verbs_permissions
|
||||
verbs += GLOB.admin_verbs_permissions
|
||||
if(rights & R_STEALTH)
|
||||
verbs += /client/proc/stealth
|
||||
if(rights & R_REJUVINATE)
|
||||
verbs += admin_verbs_rejuv
|
||||
verbs += GLOB.admin_verbs_rejuv
|
||||
if(rights & R_SOUNDS)
|
||||
verbs += admin_verbs_sounds
|
||||
verbs += GLOB.admin_verbs_sounds
|
||||
if(rights & R_SPAWN)
|
||||
verbs += admin_verbs_spawn
|
||||
verbs += GLOB.admin_verbs_spawn
|
||||
|
||||
for(var/path in holder.rank.adds)
|
||||
verbs += path
|
||||
@@ -278,19 +282,19 @@ var/list/admin_verbs_hideable = list(
|
||||
|
||||
/client/proc/remove_admin_verbs()
|
||||
verbs.Remove(
|
||||
admin_verbs_default,
|
||||
GLOB.admin_verbs_default,
|
||||
/client/proc/togglebuildmodeself,
|
||||
admin_verbs_admin,
|
||||
admin_verbs_ban,
|
||||
admin_verbs_fun,
|
||||
admin_verbs_server,
|
||||
admin_verbs_debug,
|
||||
admin_verbs_possess,
|
||||
admin_verbs_permissions,
|
||||
GLOB.admin_verbs_admin,
|
||||
GLOB.admin_verbs_ban,
|
||||
GLOB.admin_verbs_fun,
|
||||
GLOB.admin_verbs_server,
|
||||
GLOB.admin_verbs_debug,
|
||||
GLOB.admin_verbs_possess,
|
||||
GLOB.admin_verbs_permissions,
|
||||
/client/proc/stealth,
|
||||
admin_verbs_rejuv,
|
||||
admin_verbs_sounds,
|
||||
admin_verbs_spawn,
|
||||
GLOB.admin_verbs_rejuv,
|
||||
GLOB.admin_verbs_sounds,
|
||||
GLOB.admin_verbs_spawn,
|
||||
/*Debug verbs added by "show debug verbs"*/
|
||||
/client/proc/Cell,
|
||||
/client/proc/do_not_use_these,
|
||||
@@ -316,7 +320,7 @@ var/list/admin_verbs_hideable = list(
|
||||
set name = "Adminverbs - Hide Most"
|
||||
set category = "Admin"
|
||||
|
||||
verbs.Remove(/client/proc/hide_most_verbs, admin_verbs_hideable)
|
||||
verbs.Remove(/client/proc/hide_most_verbs, GLOB.admin_verbs_hideable)
|
||||
verbs += /client/proc/show_verbs
|
||||
|
||||
to_chat(src, "<span class='interface'>Most of your adminverbs have been hidden.</span>")
|
||||
@@ -437,10 +441,10 @@ var/list/admin_verbs_hideable = list(
|
||||
|
||||
/client/proc/findStealthKey(txt)
|
||||
if(txt)
|
||||
for(var/P in stealthminID)
|
||||
if(stealthminID[P] == txt)
|
||||
for(var/P in GLOB.stealthminID)
|
||||
if(GLOB.stealthminID[P] == txt)
|
||||
return P
|
||||
txt = stealthminID[ckey]
|
||||
txt = GLOB.stealthminID[ckey]
|
||||
return txt
|
||||
|
||||
/client/proc/createStealthKey()
|
||||
@@ -448,11 +452,11 @@ var/list/admin_verbs_hideable = list(
|
||||
var/i = 0
|
||||
while(i == 0)
|
||||
i = 1
|
||||
for(var/P in stealthminID)
|
||||
if(num == stealthminID[P])
|
||||
for(var/P in GLOB.stealthminID)
|
||||
if(num == GLOB.stealthminID[P])
|
||||
num++
|
||||
i = 0
|
||||
stealthminID["[ckey]"] = "@[num2text(num)]"
|
||||
GLOB.stealthminID["[ckey]"] = "@[num2text(num)]"
|
||||
|
||||
/client/proc/stealth()
|
||||
set category = "Admin"
|
||||
@@ -501,7 +505,7 @@ var/list/admin_verbs_hideable = list(
|
||||
if("Big Bomb (3, 5, 7, 5)")
|
||||
explosion(epicenter, 3, 5, 7, 5, TRUE, TRUE)
|
||||
if("Maxcap")
|
||||
explosion(epicenter, MAX_EX_DEVESTATION_RANGE, MAX_EX_HEAVY_RANGE, MAX_EX_LIGHT_RANGE, MAX_EX_FLASH_RANGE)
|
||||
explosion(epicenter, GLOB.MAX_EX_DEVESTATION_RANGE, GLOB.MAX_EX_HEAVY_RANGE, GLOB.MAX_EX_LIGHT_RANGE, GLOB.MAX_EX_FLASH_RANGE)
|
||||
if("Custom Bomb")
|
||||
var/devastation_range = input("Devastation range (in tiles):") as null|num
|
||||
if(devastation_range == null)
|
||||
@@ -515,7 +519,7 @@ var/list/admin_verbs_hideable = list(
|
||||
var/flash_range = input("Flash range (in tiles):") as null|num
|
||||
if(flash_range == null)
|
||||
return
|
||||
if(devastation_range > MAX_EX_DEVESTATION_RANGE || heavy_impact_range > MAX_EX_HEAVY_RANGE || light_impact_range > MAX_EX_LIGHT_RANGE || flash_range > MAX_EX_FLASH_RANGE)
|
||||
if(devastation_range > GLOB.MAX_EX_DEVESTATION_RANGE || heavy_impact_range > GLOB.MAX_EX_HEAVY_RANGE || light_impact_range > GLOB.MAX_EX_LIGHT_RANGE || flash_range > GLOB.MAX_EX_FLASH_RANGE)
|
||||
if(alert("Bomb is bigger than the maxcap. Continue?",,"Yes","No") != "Yes")
|
||||
return
|
||||
epicenter = mob.loc //We need to reupdate as they may have moved again
|
||||
@@ -543,7 +547,7 @@ var/list/admin_verbs_hideable = list(
|
||||
set desc = "Get the estimated range of a bomb, using explosive power."
|
||||
|
||||
var/ex_power = input("Explosive Power:") as null|num
|
||||
var/range = round((2 * ex_power)**DYN_EX_SCALE)
|
||||
var/range = round((2 * ex_power)**GLOB.DYN_EX_SCALE)
|
||||
to_chat(usr, "Estimated Explosive Range: (Devestation: [round(range*0.25)], Heavy: [round(range*0.5)], Light: [round(range)])")
|
||||
|
||||
/client/proc/get_dynex_power()
|
||||
@@ -552,7 +556,7 @@ var/list/admin_verbs_hideable = list(
|
||||
set desc = "Get the estimated required power of a bomb, to reach a specific range."
|
||||
|
||||
var/ex_range = input("Light Explosion Range:") as null|num
|
||||
var/power = (0.5 * ex_range)**(1/DYN_EX_SCALE)
|
||||
var/power = (0.5 * ex_range)**(1/GLOB.DYN_EX_SCALE)
|
||||
to_chat(usr, "Estimated Explosive Power: [power]")
|
||||
|
||||
/client/proc/set_dynex_scale()
|
||||
@@ -563,18 +567,18 @@ var/list/admin_verbs_hideable = list(
|
||||
var/ex_scale = input("New DynEx Scale:") as null|num
|
||||
if(!ex_scale)
|
||||
return
|
||||
DYN_EX_SCALE = ex_scale
|
||||
GLOB.DYN_EX_SCALE = ex_scale
|
||||
log_admin("[key_name(usr)] has modified Dynamic Explosion Scale: [ex_scale]")
|
||||
message_admins("[key_name_admin(usr)] has modified Dynamic Explosion Scale: [ex_scale]")
|
||||
|
||||
/client/proc/give_spell(mob/T in mob_list)
|
||||
/client/proc/give_spell(mob/T in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Give Spell"
|
||||
set desc = "Gives a spell to a mob."
|
||||
|
||||
var/list/spell_list = list()
|
||||
var/type_length = length("/obj/effect/proc_holder/spell") + 2
|
||||
for(var/A in spells)
|
||||
for(var/A in GLOB.spells)
|
||||
spell_list[copytext("[A]", type_length)] = A
|
||||
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spell_list
|
||||
if(!S)
|
||||
@@ -591,7 +595,7 @@ var/list/admin_verbs_hideable = list(
|
||||
T.AddSpell(new S)
|
||||
message_admins("<span class='danger'>Spells given to mindless mobs will not be transferred in mindswap or cloning!</span>")
|
||||
|
||||
/client/proc/remove_spell(mob/T in mob_list)
|
||||
/client/proc/remove_spell(mob/T in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Remove Spell"
|
||||
set desc = "Remove a spell from the selected mob."
|
||||
@@ -604,11 +608,11 @@ var/list/admin_verbs_hideable = list(
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] removed the spell [S] from [key_name(T)].</span>")
|
||||
feedback_add_details("admin_verb","RS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/give_disease(mob/T in mob_list)
|
||||
/client/proc/give_disease(mob/T in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Give Disease"
|
||||
set desc = "Gives a Disease to a mob."
|
||||
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in diseases
|
||||
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in SSdisease.diseases
|
||||
if(!D) return
|
||||
T.ForceContractDisease(new D)
|
||||
feedback_add_details("admin_verb","GD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -666,8 +670,8 @@ var/list/admin_verbs_hideable = list(
|
||||
holder.disassociate()
|
||||
qdel(holder)
|
||||
|
||||
deadmins += ckey
|
||||
admin_datums -= ckey
|
||||
GLOB.deadmins += ckey
|
||||
GLOB.admin_datums -= ckey
|
||||
verbs += /client/proc/readmin
|
||||
|
||||
to_chat(src, "<span class='interface'>You are now a normal player.</span>")
|
||||
@@ -685,7 +689,7 @@ var/list/admin_verbs_hideable = list(
|
||||
if(!holder) // Something went wrong...
|
||||
return
|
||||
|
||||
deadmins -= ckey
|
||||
GLOB.deadmins -= ckey
|
||||
verbs -= /client/proc/readmin
|
||||
|
||||
to_chat(src, "<span class='interface'>You are now an admin.</span>")
|
||||
@@ -708,7 +712,7 @@ var/list/admin_verbs_hideable = list(
|
||||
j = 100
|
||||
|
||||
do
|
||||
area = pick(the_station_areas)
|
||||
area = pick(GLOB.the_station_areas)
|
||||
|
||||
if (area)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
return 0
|
||||
|
||||
if(!M.client) //no cache. fallback to a DBQuery
|
||||
var/DBQuery/query_jobban_check_ban = dbcon.NewQuery("SELECT reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(M.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[sanitizeSQL(rank)]'")
|
||||
var/DBQuery/query_jobban_check_ban = GLOB.dbcon.NewQuery("SELECT reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(M.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[sanitizeSQL(rank)]'")
|
||||
if(!query_jobban_check_ban.warn_execute())
|
||||
return
|
||||
if(query_jobban_check_ban.NextRow())
|
||||
@@ -24,7 +24,7 @@
|
||||
/proc/jobban_buildcache(client/C)
|
||||
if(C && istype(C))
|
||||
C.jobbancache = list()
|
||||
var/DBQuery/query_jobban_build_cache = dbcon.NewQuery("SELECT job, reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(C.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
var/DBQuery/query_jobban_build_cache = GLOB.dbcon.NewQuery("SELECT job, reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(C.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
if(!query_jobban_build_cache.warn_execute())
|
||||
return
|
||||
while(query_jobban_build_cache.NextRow())
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/var/create_mob_html = null
|
||||
|
||||
/datum/admins/proc/create_mob(mob/user)
|
||||
var/static/create_mob_html
|
||||
if (!create_mob_html)
|
||||
var/mobjs = null
|
||||
mobjs = jointext(typesof(/mob), ";")
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
var/create_object_html = null
|
||||
var/list/create_object_forms = list(
|
||||
/obj, /obj/structure, /obj/machinery, /obj/effect,
|
||||
/obj/item, /obj/item/clothing, /obj/item/stack, /obj/item/device,
|
||||
/obj/item/weapon, /obj/item/weapon/reagent_containers, /obj/item/weapon/gun)
|
||||
|
||||
/datum/admins/proc/create_object(mob/user)
|
||||
var/static/create_object_html = null
|
||||
if (!create_object_html)
|
||||
var/objectjs = null
|
||||
objectjs = jointext(typesof(/obj), ";")
|
||||
@@ -13,8 +8,12 @@ var/list/create_object_forms = list(
|
||||
|
||||
user << browse(replacetext(create_object_html, "/* ref src */", "\ref[src]"), "window=create_object;size=425x475")
|
||||
|
||||
|
||||
/datum/admins/proc/quick_create_object(mob/user)
|
||||
var/static/list/create_object_forms = list(
|
||||
/obj, /obj/structure, /obj/machinery, /obj/effect,
|
||||
/obj/item, /obj/item/clothing, /obj/item/stack, /obj/item/device,
|
||||
/obj/item/weapon, /obj/item/weapon/reagent_containers, /obj/item/weapon/gun)
|
||||
|
||||
var/path = input("Select the path of the object you wish to create.", "Path", /obj) in create_object_forms
|
||||
var/html_form = create_object_forms[path]
|
||||
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
set category = "Special Verbs"
|
||||
if(!check_rights(R_PERMISSIONS))
|
||||
return
|
||||
if(!dbcon.IsConnected())
|
||||
if(!GLOB.dbcon.IsConnected())
|
||||
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
var/returned = create_poll_function()
|
||||
if(returned)
|
||||
var/DBQuery/query_check_option = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE pollid = [returned]")
|
||||
var/DBQuery/query_check_option = GLOB.dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE pollid = [returned]")
|
||||
if(!query_check_option.warn_execute())
|
||||
return
|
||||
if(query_check_option.NextRow())
|
||||
var/DBQuery/query_log_get = dbcon.NewQuery("SELECT polltype, question, adminonly FROM [format_table_name("poll_question")] WHERE id = [returned]")
|
||||
var/DBQuery/query_log_get = GLOB.dbcon.NewQuery("SELECT polltype, question, adminonly FROM [format_table_name("poll_question")] WHERE id = [returned]")
|
||||
if(!query_log_get.warn_execute())
|
||||
return
|
||||
if(query_log_get.NextRow())
|
||||
@@ -23,7 +23,7 @@
|
||||
message_admins("[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]<br>Question: [question]")
|
||||
else
|
||||
to_chat(src, "Poll question created without any options, poll will be deleted.")
|
||||
var/DBQuery/query_del_poll = dbcon.NewQuery("DELETE FROM [format_table_name("poll_question")] WHERE id = [returned]")
|
||||
var/DBQuery/query_del_poll = GLOB.dbcon.NewQuery("DELETE FROM [format_table_name("poll_question")] WHERE id = [returned]")
|
||||
if(!query_del_poll.warn_execute())
|
||||
return
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
if(!endtime)
|
||||
return
|
||||
endtime = sanitizeSQL(endtime)
|
||||
var/DBQuery/query_validate_time = dbcon.NewQuery("SELECT STR_TO_DATE('[endtime]','%Y-%c-%d %T')")
|
||||
var/DBQuery/query_validate_time = GLOB.dbcon.NewQuery("SELECT STR_TO_DATE('[endtime]','%Y-%c-%d %T')")
|
||||
if(!query_validate_time.warn_execute())
|
||||
return
|
||||
if(query_validate_time.NextRow())
|
||||
@@ -59,7 +59,7 @@
|
||||
if(!endtime)
|
||||
to_chat(src, "Datetime entered is invalid.")
|
||||
return
|
||||
var/DBQuery/query_time_later = dbcon.NewQuery("SELECT TIMESTAMP('[endtime]') < NOW()")
|
||||
var/DBQuery/query_time_later = GLOB.dbcon.NewQuery("SELECT TIMESTAMP('[endtime]') < NOW()")
|
||||
if(!query_time_later.warn_execute())
|
||||
return
|
||||
if(query_time_later.NextRow())
|
||||
@@ -88,7 +88,7 @@
|
||||
if(!question)
|
||||
return
|
||||
question = sanitizeSQL(question)
|
||||
var/DBQuery/query_polladd_question = dbcon.NewQuery("INSERT INTO [format_table_name("poll_question")] (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, dontshow) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', INET_ATON('[address]'), '[dontshow]')")
|
||||
var/DBQuery/query_polladd_question = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("poll_question")] (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, dontshow) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', INET_ATON('[address]'), '[dontshow]')")
|
||||
if(!query_polladd_question.warn_execute())
|
||||
return
|
||||
if(polltype == POLLTYPE_TEXT)
|
||||
@@ -96,7 +96,7 @@
|
||||
message_admins("[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]<br>Question: [question]")
|
||||
return
|
||||
var/pollid = 0
|
||||
var/DBQuery/query_get_id = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE question = '[question]' AND starttime = '[starttime]' AND endtime = '[endtime]' AND createdby_ckey = '[sql_ckey]' AND createdby_ip = INET_ATON('[address]')")
|
||||
var/DBQuery/query_get_id = GLOB.dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE question = '[question]' AND starttime = '[starttime]' AND endtime = '[endtime]' AND createdby_ckey = '[sql_ckey]' AND createdby_ip = INET_ATON('[address]')")
|
||||
if(!query_get_id.warn_execute())
|
||||
return
|
||||
if(query_get_id.NextRow())
|
||||
@@ -146,7 +146,7 @@
|
||||
descmax = sanitizeSQL(descmax)
|
||||
else if(descmax == null)
|
||||
return pollid
|
||||
var/DBQuery/query_polladd_option = dbcon.NewQuery("INSERT INTO [format_table_name("poll_option")] (pollid, text, percentagecalc, minval, maxval, descmin, descmid, descmax) VALUES ('[pollid]', '[option]', '[percentagecalc]', '[minval]', '[maxval]', '[descmin]', '[descmid]', '[descmax]')")
|
||||
var/DBQuery/query_polladd_option = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("poll_option")] (pollid, text, percentagecalc, minval, maxval, descmin, descmid, descmax) VALUES ('[pollid]', '[option]', '[percentagecalc]', '[minval]', '[maxval]', '[descmin]', '[descmid]', '[descmax]')")
|
||||
if(!query_polladd_option.warn_execute())
|
||||
return pollid
|
||||
switch(alert(" ",,"Add option","Finish", "Cancel"))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/var/create_turf_html = null
|
||||
/datum/admins/proc/create_turf(mob/user)
|
||||
var/static/create_turf_html
|
||||
if (!create_turf_html)
|
||||
var/turfjs = null
|
||||
turfjs = jointext(typesof(/turf), ";")
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
/obj/effect/forcefield/arena_shuttle_entrance/Bumped(mob/M as mob|obj)
|
||||
if(!warp_points.len)
|
||||
for(var/obj/effect/landmark/shuttle_arena_entrance/S in landmarks_list)
|
||||
for(var/obj/effect/landmark/shuttle_arena_entrance/S in GLOB.landmarks_list)
|
||||
warp_points |= S
|
||||
if(!isliving(M))
|
||||
return
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
var/list/admin_datums = list()
|
||||
GLOBAL_LIST_EMPTY(admin_datums)
|
||||
GLOBAL_PROTECT(admin_datums)
|
||||
|
||||
/datum/admins
|
||||
var/datum/admin_rank/rank
|
||||
@@ -27,7 +28,7 @@ var/list/admin_datums = list()
|
||||
return
|
||||
rank = R
|
||||
admin_signature = "Nanotrasen Officer #[rand(0,9)][rand(0,9)][rand(0,9)]"
|
||||
admin_datums[ckey] = src
|
||||
GLOB.admin_datums[ckey] = src
|
||||
|
||||
/datum/admins/proc/associate(client/C)
|
||||
if(istype(C))
|
||||
@@ -35,11 +36,11 @@ var/list/admin_datums = list()
|
||||
owner.holder = src
|
||||
owner.add_admin_verbs() //TODO
|
||||
owner.verbs -= /client/proc/readmin
|
||||
admins |= C
|
||||
GLOB.admins |= C
|
||||
|
||||
/datum/admins/proc/disassociate()
|
||||
if(owner)
|
||||
admins -= owner
|
||||
GLOB.admins -= owner
|
||||
owner.remove_admin_verbs()
|
||||
owner.holder = null
|
||||
owner = null
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
cachedintel.cache = TRUE
|
||||
return cachedintel
|
||||
|
||||
if(dbcon.Connect())
|
||||
var/DBQuery/query_get_ip_intel = dbcon.NewQuery({"
|
||||
if(GLOB.dbcon.Connect())
|
||||
var/DBQuery/query_get_ip_intel = GLOB.dbcon.NewQuery({"
|
||||
SELECT date, intel, TIMESTAMPDIFF(MINUTE,date,NOW())
|
||||
FROM [format_table_name("ipintel")]
|
||||
WHERE
|
||||
@@ -62,8 +62,8 @@
|
||||
res.intel = ip_intel_query(ip)
|
||||
if (updatecache && res.intel >= 0)
|
||||
SSipintel.cache[ip] = res
|
||||
if(dbcon.Connect())
|
||||
var/DBQuery/query_add_ip_intel = dbcon.NewQuery("INSERT INTO [format_table_name("ipintel")] (ip, intel) VALUES (INET_ATON('[ip]'), [res.intel]) ON DUPLICATE KEY UPDATE intel = VALUES(intel), date = NOW()")
|
||||
if(GLOB.dbcon.Connect())
|
||||
var/DBQuery/query_add_ip_intel = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("ipintel")] (ip, intel) VALUES (INET_ATON('[ip]'), [res.intel]) ON DUPLICATE KEY UPDATE intel = VALUES(intel), date = NOW()")
|
||||
query_add_ip_intel.Execute()
|
||||
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
</tr>
|
||||
"}
|
||||
|
||||
for(var/adm_ckey in admin_datums)
|
||||
var/datum/admins/D = admin_datums[adm_ckey]
|
||||
for(var/adm_ckey in GLOB.admin_datums)
|
||||
var/datum/admins/D = GLOB.admin_datums[adm_ckey]
|
||||
if(!D)
|
||||
continue
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if (!check_rights(R_PERMISSIONS))
|
||||
return
|
||||
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
if(!istext(adm_ckey) || !istext(new_rank))
|
||||
return
|
||||
|
||||
var/DBQuery/query_get_admin = dbcon.NewQuery("SELECT id FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
|
||||
var/DBQuery/query_get_admin = GLOB.dbcon.NewQuery("SELECT id FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
|
||||
if(!query_get_admin.warn_execute())
|
||||
return
|
||||
|
||||
@@ -86,19 +86,19 @@
|
||||
admin_id = text2num(query_get_admin.item[1])
|
||||
|
||||
if(new_admin)
|
||||
var/DBQuery/query_add_admin = dbcon.NewQuery("INSERT INTO `[format_table_name("admin")]` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
|
||||
var/DBQuery/query_add_admin = GLOB.dbcon.NewQuery("INSERT INTO `[format_table_name("admin")]` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
|
||||
if(!query_add_admin.warn_execute())
|
||||
return
|
||||
var/DBQuery/query_add_admin_log = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
|
||||
var/DBQuery/query_add_admin_log = GLOB.dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
|
||||
if(!query_add_admin_log.warn_execute())
|
||||
return
|
||||
to_chat(usr, "<span class='adminnotice'>New admin added.</span>")
|
||||
else
|
||||
if(!isnull(admin_id) && isnum(admin_id))
|
||||
var/DBQuery/query_change_admin = dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET rank = '[new_rank]' WHERE id = [admin_id]")
|
||||
var/DBQuery/query_change_admin = GLOB.dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET rank = '[new_rank]' WHERE id = [admin_id]")
|
||||
if(!query_change_admin.warn_execute())
|
||||
return
|
||||
var/DBQuery/query_change_admin_log = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
|
||||
var/DBQuery/query_change_admin_log = GLOB.dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
|
||||
if(!query_change_admin_log.warn_execute())
|
||||
return
|
||||
to_chat(usr, "<span class='adminnnotice'>Admin rank changed.</span>")
|
||||
@@ -112,14 +112,14 @@
|
||||
if(check_rights(R_PERMISSIONS))
|
||||
return
|
||||
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
|
||||
if(!adm_ckey || !istext(adm_ckey) || !isnum(new_permission))
|
||||
return
|
||||
|
||||
var/DBQuery/query_get_perms = dbcon.NewQuery("SELECT id, flags FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
|
||||
var/DBQuery/query_get_perms = GLOB.dbcon.NewQuery("SELECT id, flags FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
|
||||
if(!query_get_perms.warn_execute())
|
||||
return
|
||||
|
||||
@@ -130,8 +130,8 @@
|
||||
if(!admin_id)
|
||||
return
|
||||
|
||||
var/DBQuery/query_change_perms = dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET flags = [new_permission] WHERE id = [admin_id]")
|
||||
var/DBQuery/query_change_perms = GLOB.dbcon.NewQuery("UPDATE `[format_table_name("admin")]` SET flags = [new_permission] WHERE id = [admin_id]")
|
||||
if(!query_change_perms.warn_execute())
|
||||
return
|
||||
var/DBQuery/query_change_perms_log = dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edit permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
|
||||
var/DBQuery/query_change_perms_log = GLOB.dbcon.NewQuery("INSERT INTO `[format_table_name("admin_log")]` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edit permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
|
||||
query_change_perms_log.warn_execute()
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
dat += "If limits past: <a href='?_src_=holder;toggle_noncontinuous_behavior=1'>[SSticker.mode.round_ends_with_antag_death ? "End The Round" : "Continue As Extended"]</a><BR>"
|
||||
dat += "<a href='?_src_=holder;end_round=\ref[usr]'>End Round Now</a><br>"
|
||||
dat += "<a href='?_src_=holder;delay_round_end=1'>[SSticker.delay_end ? "End Round Normally" : "Delay Round End"]</a>"
|
||||
var/connected_players = clients.len
|
||||
var/connected_players = GLOB.clients.len
|
||||
var/lobby_players = 0
|
||||
var/observers = 0
|
||||
var/observers_connected = 0
|
||||
@@ -350,7 +350,7 @@
|
||||
var/other_players = 0
|
||||
var/living_skipped = 0
|
||||
var/drones = 0
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(M.ckey)
|
||||
if(isnewplayer(M))
|
||||
lobby_players++
|
||||
@@ -395,7 +395,7 @@
|
||||
dat += "<tr><td><i><a href='?_src_=vars;Vars=\ref[N]'>[N.name]([N.key])</a> Nuclear Operative Body destroyed!</i></td>"
|
||||
dat += "<td><A href='?priv_msg=[N.key]'>PM</A></td></tr>"
|
||||
dat += "</table><br><table><tr><td><B>Nuclear Disk(s)</B></td></tr>"
|
||||
for(var/obj/item/weapon/disk/nuclear/N in poi_list)
|
||||
for(var/obj/item/weapon/disk/nuclear/N in GLOB.poi_list)
|
||||
dat += "<tr><td>[N.name], "
|
||||
var/atom/disk_loc = N.loc
|
||||
while(!isturf(disk_loc))
|
||||
@@ -441,7 +441,7 @@
|
||||
dat += "</table>"
|
||||
|
||||
for(var/datum/gang/G in SSticker.mode.gangs)
|
||||
dat += "<br><table cellspacing=5><tr><td><B>[G.name] Gang: <a href='?_src_=holder;gangpoints=\ref[G]'>[G.points] Influence</a> | [round((G.territory.len/start_state.num_territories)*100, 1)]% Control</B></td><td></td></tr>"
|
||||
dat += "<br><table cellspacing=5><tr><td><B>[G.name] Gang: <a href='?_src_=holder;gangpoints=\ref[G]'>[G.points] Influence</a> | [round((G.territory.len/GLOB.start_state.num_territories)*100, 1)]% Control</B></td><td></td></tr>"
|
||||
for(var/datum/mind/N in G.bosses)
|
||||
var/mob/M = N.current
|
||||
if(!M)
|
||||
@@ -548,7 +548,7 @@
|
||||
dat += "<td><A href='?priv_msg=[abductor.key]'>PM</A></td>"
|
||||
dat += "</table>"
|
||||
dat += "<br><table cellspacing=5><tr><td><B>Abductees</B></td><td></td><td></td></tr>"
|
||||
for(var/obj/machinery/abductor/experiment/E in machines)
|
||||
for(var/obj/machinery/abductor/experiment/E in GLOB.machines)
|
||||
for(var/datum/mind/abductee in E.abductee_minds)
|
||||
var/mob/M = abductee.current
|
||||
if(M)
|
||||
@@ -591,7 +591,7 @@
|
||||
dat += "</table>"
|
||||
|
||||
var/list/blob_minds = list()
|
||||
for(var/mob/camera/blob/B in mob_list)
|
||||
for(var/mob/camera/blob/B in GLOB.mob_list)
|
||||
blob_minds |= B.mind
|
||||
|
||||
if(istype(SSticker.mode, /datum/game_mode/blob) || blob_minds.len)
|
||||
@@ -599,7 +599,7 @@
|
||||
if(istype(SSticker.mode,/datum/game_mode/blob))
|
||||
var/datum/game_mode/blob/mode = SSticker.mode
|
||||
blob_minds |= mode.blob_overminds
|
||||
dat += "<tr><td><i>Progress: [blobs_legit.len]/[mode.blobwincount]</i></td></tr>"
|
||||
dat += "<tr><td><i>Progress: [GLOB.blobs_legit.len]/[mode.blobwincount]</i></td></tr>"
|
||||
|
||||
for(var/datum/mind/blob in blob_minds)
|
||||
var/mob/M = blob.current
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<A href='?src=\ref[src];secrets=clear_virus'>Cure all diseases currently in existence</A><BR>
|
||||
<A href='?src=\ref[src];secrets=list_bombers'>Bombing List</A><BR>
|
||||
<A href='?src=\ref[src];secrets=check_antagonist'>Show current traitors and objectives</A><BR>
|
||||
<A href='?src=\ref[src];secrets=list_signalers'>Show last [length(lastsignalers)] signalers</A><BR>
|
||||
<A href='?src=\ref[src];secrets=list_lawchanges'>Show last [length(lawchanges)] law changes</A><BR>
|
||||
<A href='?src=\ref[src];secrets=list_signalers'>Show last [length(GLOB.lastsignalers)] signalers</A><BR>
|
||||
<A href='?src=\ref[src];secrets=list_lawchanges'>Show last [length(GLOB.lawchanges)] law changes</A><BR>
|
||||
<A href='?src=\ref[src];secrets=showailaws'>Show AI Laws</A><BR>
|
||||
<A href='?src=\ref[src];secrets=showgm'>Show Game Mode</A><BR>
|
||||
<A href='?src=\ref[src];secrets=manifest'>Show Crew Manifest</A><BR>
|
||||
@@ -96,9 +96,9 @@
|
||||
switch(item)
|
||||
if("admin_log")
|
||||
var/dat = "<B>Admin Log<HR></B>"
|
||||
for(var/l in admin_log)
|
||||
for(var/l in GLOB.admin_log)
|
||||
dat += "<li>[l]</li>"
|
||||
if(!admin_log.len)
|
||||
if(!GLOB.admin_log.len)
|
||||
dat += "No-one has done anything this round!"
|
||||
usr << browse(dat, "window=admin_log")
|
||||
|
||||
@@ -116,9 +116,9 @@
|
||||
|
||||
if("show_admins")
|
||||
var/dat = "<B>Current admins:</B><HR>"
|
||||
if(admin_datums)
|
||||
for(var/ckey in admin_datums)
|
||||
var/datum/admins/D = admin_datums[ckey]
|
||||
if(GLOB.admin_datums)
|
||||
for(var/ckey in GLOB.admin_datums)
|
||||
var/datum/admins/D = GLOB.admin_datums[ckey]
|
||||
dat += "[ckey] - [D.rank.name]<br>"
|
||||
usr << browse(dat, "window=showadmins;size=600x500")
|
||||
|
||||
@@ -174,23 +174,23 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/dat = "<B>Bombing List<HR>"
|
||||
for(var/l in bombers)
|
||||
for(var/l in GLOB.bombers)
|
||||
dat += text("[l]<BR>")
|
||||
usr << browse(dat, "window=bombers")
|
||||
|
||||
if("list_signalers")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/dat = "<B>Showing last [length(lastsignalers)] signalers.</B><HR>"
|
||||
for(var/sig in lastsignalers)
|
||||
var/dat = "<B>Showing last [length(GLOB.lastsignalers)] signalers.</B><HR>"
|
||||
for(var/sig in GLOB.lastsignalers)
|
||||
dat += "[sig]<BR>"
|
||||
usr << browse(dat, "window=lastsignalers;size=800x500")
|
||||
|
||||
if("list_lawchanges")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/dat = "<B>Showing last [length(lawchanges)] law changes.</B><HR>"
|
||||
for(var/sig in lawchanges)
|
||||
var/dat = "<B>Showing last [length(GLOB.lawchanges)] law changes.</B><HR>"
|
||||
for(var/sig in GLOB.lawchanges)
|
||||
dat += "[sig]<BR>"
|
||||
usr << browse(dat, "window=lawchanges;size=800x500")
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
return
|
||||
var/dat = "<B>Showing Crew Manifest.</B><HR>"
|
||||
dat += "<table cellspacing=5><tr><th>Name</th><th>Position</th></tr>"
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
for(var/datum/data/record/t in GLOB.data_core.general)
|
||||
dat += "<tr><td>[t.fields["name"]]</td><td>[t.fields["rank"]]</td></tr>"
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=manifest;size=440x410")
|
||||
@@ -260,7 +260,7 @@
|
||||
return
|
||||
var/dat = "<B>Showing DNA from blood.</B><HR>"
|
||||
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(H.ckey)
|
||||
dat += "<tr><td>[H]</td><td>[H.dna.unique_enzymes]</td><td>[H.dna.blood_type]</td></tr>"
|
||||
dat += "</table>"
|
||||
@@ -270,7 +270,7 @@
|
||||
return
|
||||
var/dat = "<B>Showing Fingerprints.</B><HR>"
|
||||
dat += "<table cellspacing=5><tr><th>Name</th><th>Fingerprints</th></tr>"
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(H.ckey)
|
||||
dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>"
|
||||
dat += "</table>"
|
||||
@@ -281,7 +281,7 @@
|
||||
return
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","M")
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
spawn(0)
|
||||
H.monkeyize()
|
||||
ok = 1
|
||||
@@ -289,12 +289,12 @@
|
||||
if("allspecies")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
var/result = input(usr, "Please choose a new species","Species") as null|anything in species_list
|
||||
var/result = input(usr, "Please choose a new species","Species") as null|anything in GLOB.species_list
|
||||
if(result)
|
||||
log_admin("[key_name(usr)] turned all humans into [result]", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] turned all humans into [result]")
|
||||
var/newtype = species_list[result]
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
var/newtype = GLOB.species_list[result]
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
H.set_species(newtype)
|
||||
|
||||
if("corgi")
|
||||
@@ -302,7 +302,7 @@
|
||||
return
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","M")
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
spawn(0)
|
||||
H.corgize()
|
||||
ok = 1
|
||||
@@ -352,7 +352,7 @@
|
||||
return
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","TA([objective])")
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == 2 || !H.client || !H.mind) continue
|
||||
if(is_special_character(H)) continue
|
||||
//traitorize(H, objective, 0)
|
||||
@@ -365,7 +365,7 @@
|
||||
SSticker.mode.greet_traitor(H.mind)
|
||||
//SSticker.mode.forge_traitor_objectives(H.mind)
|
||||
SSticker.mode.finalize_traitor(H.mind)
|
||||
for(var/mob/living/silicon/A in player_list)
|
||||
for(var/mob/living/silicon/A in GLOB.player_list)
|
||||
if(A.stat == 2 || !A.client || !A.mind) continue
|
||||
if(ispAI(A)) continue
|
||||
else if(is_special_character(A)) continue
|
||||
@@ -386,19 +386,19 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","BC")
|
||||
|
||||
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", MAX_EX_LIGHT_RANGE) as num|null
|
||||
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE) as num|null
|
||||
if (newBombCap < 4)
|
||||
return
|
||||
|
||||
MAX_EX_DEVESTATION_RANGE = round(newBombCap/4)
|
||||
MAX_EX_HEAVY_RANGE = round(newBombCap/2)
|
||||
MAX_EX_LIGHT_RANGE = newBombCap
|
||||
GLOB.MAX_EX_DEVESTATION_RANGE = round(newBombCap/4)
|
||||
GLOB.MAX_EX_HEAVY_RANGE = round(newBombCap/2)
|
||||
GLOB.MAX_EX_LIGHT_RANGE = newBombCap
|
||||
//I don't know why these are their own variables, but fuck it, they are.
|
||||
MAX_EX_FLASH_RANGE = newBombCap
|
||||
MAX_EX_FLAME_RANGE = newBombCap
|
||||
GLOB.MAX_EX_FLASH_RANGE = newBombCap
|
||||
GLOB.MAX_EX_FLAME_RANGE = newBombCap
|
||||
|
||||
message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]</span>")
|
||||
log_admin("[key_name(usr)] changed the bomb cap to [MAX_EX_DEVESTATION_RANGE], [MAX_EX_HEAVY_RANGE], [MAX_EX_LIGHT_RANGE]")
|
||||
message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [GLOB.MAX_EX_DEVESTATION_RANGE], [GLOB.MAX_EX_HEAVY_RANGE], [GLOB.MAX_EX_LIGHT_RANGE]</span>")
|
||||
log_admin("[key_name(usr)] changed the bomb cap to [GLOB.MAX_EX_DEVESTATION_RANGE], [GLOB.MAX_EX_HEAVY_RANGE], [GLOB.MAX_EX_LIGHT_RANGE]")
|
||||
|
||||
|
||||
if("lightsout")
|
||||
@@ -415,7 +415,7 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","BO")
|
||||
message_admins("[key_name_admin(usr)] broke all lights")
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
L.break_light_tube()
|
||||
|
||||
if("anime")
|
||||
@@ -424,7 +424,7 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","CC")
|
||||
message_admins("[key_name_admin(usr)] made everything kawaii.")
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
H << sound('sound/AI/animes.ogg')
|
||||
|
||||
if(H.dna.species.id == "human")
|
||||
@@ -450,7 +450,7 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","WO")
|
||||
message_admins("[key_name_admin(usr)] fixed all lights")
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
L.fix()
|
||||
|
||||
if("floorlava")
|
||||
@@ -477,7 +477,7 @@
|
||||
return
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","RET")
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
to_chat(H, "<span class='boldannounce'>You suddenly feel stupid.</span>")
|
||||
H.setBrainLoss(60)
|
||||
message_admins("[key_name_admin(usr)] made everybody retarded")
|
||||
@@ -487,7 +487,7 @@
|
||||
return
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","EgL")
|
||||
for(var/obj/machinery/door/airlock/W in machines)
|
||||
for(var/obj/machinery/door/airlock/W in GLOB.machines)
|
||||
if(W.z == ZLEVEL_STATION && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
W.req_access = list()
|
||||
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
|
||||
@@ -545,7 +545,7 @@
|
||||
return
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","DF")
|
||||
for(var/mob/living/carbon/human/B in mob_list)
|
||||
for(var/mob/living/carbon/human/B in GLOB.mob_list)
|
||||
B.facial_hair_style = "Dward Beard"
|
||||
B.update_hair()
|
||||
message_admins("[key_name_admin(usr)] activated dorf mode")
|
||||
@@ -577,19 +577,19 @@
|
||||
if("maint_access_brig")
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in machines)
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in GLOB.machines)
|
||||
M.check_access()
|
||||
if (access_maint_tunnels in M.req_access)
|
||||
M.req_access = list(access_brig)
|
||||
if (GLOB.access_maint_tunnels in M.req_access)
|
||||
M.req_access = list(GLOB.access_brig)
|
||||
message_admins("[key_name_admin(usr)] made all maint doors brig access-only.")
|
||||
if("maint_access_engiebrig")
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in machines)
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in GLOB.machines)
|
||||
M.check_access()
|
||||
if (access_maint_tunnels in M.req_access)
|
||||
if (GLOB.access_maint_tunnels in M.req_access)
|
||||
M.req_access = list()
|
||||
M.req_one_access = list(access_brig,access_engine)
|
||||
M.req_one_access = list(GLOB.access_brig,GLOB.access_engine)
|
||||
message_admins("[key_name_admin(usr)] made all maint doors engineering and brig access-only.")
|
||||
if("infinite_sec")
|
||||
if(!check_rights(R_DEBUG))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/proc/create_message(type, target_ckey, admin_ckey, text, timestamp, server, secret, logged = 1, browse)
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
if(!type)
|
||||
@@ -9,7 +9,7 @@
|
||||
if(!new_ckey)
|
||||
return
|
||||
new_ckey = sanitizeSQL(new_ckey)
|
||||
var/DBQuery/query_find_ckey = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ckey = '[new_ckey]'")
|
||||
var/DBQuery/query_find_ckey = GLOB.dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ckey = '[new_ckey]'")
|
||||
if(!query_find_ckey.warn_execute())
|
||||
return
|
||||
if(!query_find_ckey.NextRow())
|
||||
@@ -44,7 +44,7 @@
|
||||
secret = 0
|
||||
else
|
||||
return
|
||||
var/DBQuery/query_create_message = dbcon.NewQuery("INSERT INTO [format_table_name("messages")] (type, targetckey, adminckey, text, timestamp, server, secret) VALUES ('[type]', '[target_ckey]', '[admin_ckey]', '[text]', '[timestamp]', '[server]', '[secret]')")
|
||||
var/DBQuery/query_create_message = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("messages")] (type, targetckey, adminckey, text, timestamp, server, secret) VALUES ('[type]', '[target_ckey]', '[admin_ckey]', '[text]', '[timestamp]', '[server]', '[secret]')")
|
||||
if(!query_create_message.warn_execute())
|
||||
return
|
||||
if(logged)
|
||||
@@ -56,7 +56,7 @@
|
||||
browse_messages(target_ckey = target_ckey)
|
||||
|
||||
/proc/delete_message(message_id, logged = 1, browse)
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
message_id = text2num(message_id)
|
||||
@@ -65,14 +65,14 @@
|
||||
var/type
|
||||
var/target_ckey
|
||||
var/text
|
||||
var/DBQuery/query_find_del_message = dbcon.NewQuery("SELECT type, targetckey, adminckey, text FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
var/DBQuery/query_find_del_message = GLOB.dbcon.NewQuery("SELECT type, targetckey, adminckey, text FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
if(!query_find_del_message.warn_execute())
|
||||
return
|
||||
if(query_find_del_message.NextRow())
|
||||
type = query_find_del_message.item[1]
|
||||
target_ckey = query_find_del_message.item[2]
|
||||
text = query_find_del_message.item[4]
|
||||
var/DBQuery/query_del_message = dbcon.NewQuery("DELETE FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
var/DBQuery/query_del_message = GLOB.dbcon.NewQuery("DELETE FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
if(!query_del_message.warn_execute())
|
||||
return
|
||||
if(logged)
|
||||
@@ -84,13 +84,13 @@
|
||||
browse_messages(target_ckey = target_ckey)
|
||||
|
||||
/proc/edit_message(message_id, browse)
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
message_id = text2num(message_id)
|
||||
if(!message_id)
|
||||
return
|
||||
var/DBQuery/query_find_edit_message = dbcon.NewQuery("SELECT type, targetckey, adminckey, text FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
var/DBQuery/query_find_edit_message = GLOB.dbcon.NewQuery("SELECT type, targetckey, adminckey, text FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
if(!query_find_edit_message.warn_execute())
|
||||
return
|
||||
if(query_find_edit_message.NextRow())
|
||||
@@ -104,7 +104,7 @@
|
||||
return
|
||||
new_text = sanitizeSQL(new_text)
|
||||
var/edit_text = sanitizeSQL("Edited by [editor_ckey] on [SQLtime()] from<br>[old_text]<br>to<br>[new_text]<hr>")
|
||||
var/DBQuery/query_edit_message = dbcon.NewQuery("UPDATE [format_table_name("messages")] SET text = '[new_text]', lasteditor = '[editor_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE id = [message_id]")
|
||||
var/DBQuery/query_edit_message = GLOB.dbcon.NewQuery("UPDATE [format_table_name("messages")] SET text = '[new_text]', lasteditor = '[editor_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE id = [message_id]")
|
||||
if(!query_edit_message.warn_execute())
|
||||
return
|
||||
log_admin_private("[key_name(usr)] has edited a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_ckey]" : ""] made by [admin_ckey] from [old_text] to [new_text]")
|
||||
@@ -115,13 +115,13 @@
|
||||
browse_messages(target_ckey = target_ckey)
|
||||
|
||||
/proc/toggle_message_secrecy(message_id)
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
message_id = text2num(message_id)
|
||||
if(!message_id)
|
||||
return
|
||||
var/DBQuery/query_find_message_secret = dbcon.NewQuery("SELECT type, targetckey, adminckey, secret FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
var/DBQuery/query_find_message_secret = GLOB.dbcon.NewQuery("SELECT type, targetckey, adminckey, secret FROM [format_table_name("messages")] WHERE id = [message_id]")
|
||||
if(!query_find_message_secret.warn_execute())
|
||||
return
|
||||
if(query_find_message_secret.NextRow())
|
||||
@@ -131,7 +131,7 @@
|
||||
var/secret = text2num(query_find_message_secret.item[4])
|
||||
var/editor_ckey = sanitizeSQL(usr.ckey)
|
||||
var/edit_text = "Made [secret ? "not secret" : "secret"] by [editor_ckey] on [SQLtime()]<hr>"
|
||||
var/DBQuery/query_message_secret = dbcon.NewQuery("UPDATE [format_table_name("messages")] SET secret = NOT secret, lasteditor = '[editor_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE id = [message_id]")
|
||||
var/DBQuery/query_message_secret = GLOB.dbcon.NewQuery("UPDATE [format_table_name("messages")] SET secret = NOT secret, lasteditor = '[editor_ckey]', edits = CONCAT(IFNULL(edits,''),'[edit_text]') WHERE id = [message_id]")
|
||||
if(!query_message_secret.warn_execute())
|
||||
return
|
||||
log_admin_private("[key_name(usr)] has toggled [target_ckey]'s [type] made by [admin_ckey] to [secret ? "not secret" : "secret"]")
|
||||
@@ -139,13 +139,13 @@
|
||||
browse_messages(target_ckey = target_ckey)
|
||||
|
||||
/proc/browse_messages(type, target_ckey, index, linkless = 0, filter)
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
var/output
|
||||
var/ruler = "<hr style='background:#000000; border:0; height:3px'>"
|
||||
var/navbar = "<a href='?_src_=holder;nonalpha=1'>\[All\]</a>|<a href='?_src_=holder;nonalpha=2'>\[#\]</a>"
|
||||
for(var/letter in alphabet)
|
||||
for(var/letter in GLOB.alphabet)
|
||||
navbar += "|<a href='?_src_=holder;showmessages=[letter]'>\[[letter]\]</a>"
|
||||
navbar += "|<a href='?_src_=holder;showmemo=1'>\[Memos\]</a>|<a href='?_src_=holder;showwatch=1'>\[Watchlist\]</a>"
|
||||
navbar += "<br><form method='GET' name='search' action='?'>\
|
||||
@@ -166,13 +166,13 @@
|
||||
else
|
||||
output += "|<a href='?_src_=holder;showwatchfilter=1'>\[Filter offline clients\]</a></center>"
|
||||
output += ruler
|
||||
var/DBQuery/query_get_type_messages = dbcon.NewQuery("SELECT id, targetckey, adminckey, text, timestamp, server, lasteditor FROM [format_table_name("messages")] WHERE type = '[type]'")
|
||||
var/DBQuery/query_get_type_messages = GLOB.dbcon.NewQuery("SELECT id, targetckey, adminckey, text, timestamp, server, lasteditor FROM [format_table_name("messages")] WHERE type = '[type]'")
|
||||
if(!query_get_type_messages.warn_execute())
|
||||
return
|
||||
while(query_get_type_messages.NextRow())
|
||||
var/id = query_get_type_messages.item[1]
|
||||
var/t_ckey = query_get_type_messages.item[2]
|
||||
if(type == "watchlist entry" && filter && !(t_ckey in directory))
|
||||
if(type == "watchlist entry" && filter && !(t_ckey in GLOB.directory))
|
||||
continue
|
||||
var/admin_ckey = query_get_type_messages.item[3]
|
||||
var/text = query_get_type_messages.item[4]
|
||||
@@ -190,7 +190,7 @@
|
||||
output += "<br>[text]<hr style='background:#000000; border:0; height:1px'>"
|
||||
if(target_ckey)
|
||||
target_ckey = sanitizeSQL(target_ckey)
|
||||
var/DBQuery/query_get_messages = dbcon.NewQuery("SELECT type, secret, id, adminckey, text, timestamp, server, lasteditor FROM [format_table_name("messages")] WHERE type <> 'memo' AND targetckey = '[target_ckey]' ORDER BY timestamp DESC")
|
||||
var/DBQuery/query_get_messages = GLOB.dbcon.NewQuery("SELECT type, secret, id, adminckey, text, timestamp, server, lasteditor FROM [format_table_name("messages")] WHERE type <> 'memo' AND targetckey = '[target_ckey]' ORDER BY timestamp DESC")
|
||||
if(!query_get_messages.warn_execute())
|
||||
return
|
||||
var/messagedata
|
||||
@@ -265,7 +265,7 @@
|
||||
search = "^\[^\[:alpha:\]\]"
|
||||
else
|
||||
search = "^[index]"
|
||||
var/DBQuery/query_list_messages = dbcon.NewQuery("SELECT DISTINCT targetckey FROM [format_table_name("messages")] WHERE type <> 'memo' AND targetckey REGEXP '[search]' ORDER BY targetckey")
|
||||
var/DBQuery/query_list_messages = GLOB.dbcon.NewQuery("SELECT DISTINCT targetckey FROM [format_table_name("messages")] WHERE type <> 'memo' AND targetckey REGEXP '[search]' ORDER BY targetckey")
|
||||
if(!query_list_messages.warn_execute())
|
||||
return
|
||||
while(query_list_messages.NextRow())
|
||||
@@ -277,7 +277,7 @@
|
||||
usr << browse(output, "window=browse_messages;size=900x500")
|
||||
|
||||
proc/get_message_output(type, target_ckey)
|
||||
if(!dbcon.Connect())
|
||||
if(!GLOB.dbcon.Connect())
|
||||
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
|
||||
return
|
||||
if(!type)
|
||||
@@ -288,7 +288,7 @@ proc/get_message_output(type, target_ckey)
|
||||
var/query = "SELECT id, adminckey, text, timestamp, lasteditor FROM [format_table_name("messages")] WHERE type = '[type]'"
|
||||
if(type == "message" || type == "watchlist entry")
|
||||
query += " AND targetckey = '[target_ckey]'"
|
||||
var/DBQuery/query_get_message_output = dbcon.NewQuery(query)
|
||||
var/DBQuery/query_get_message_output = GLOB.dbcon.NewQuery(query)
|
||||
if(!query_get_message_output.warn_execute())
|
||||
return
|
||||
while(query_get_message_output.NextRow())
|
||||
@@ -301,7 +301,7 @@ proc/get_message_output(type, target_ckey)
|
||||
if("message")
|
||||
output += "<font color='red' size='3'><b>Admin message left by <span class='prefix'>[admin_ckey]</span> on [timestamp]</b></font>"
|
||||
output += "<br><font color='red'>[text]</font><br>"
|
||||
var/DBQuery/query_message_read = dbcon.NewQuery("UPDATE [format_table_name("messages")] SET type = 'message sent' WHERE id = [message_id]")
|
||||
var/DBQuery/query_message_read = GLOB.dbcon.NewQuery("UPDATE [format_table_name("messages")] SET type = 'message sent' WHERE id = [message_id]")
|
||||
if(!query_message_read.warn_execute())
|
||||
return
|
||||
if("watchlist entry")
|
||||
@@ -333,7 +333,7 @@ proc/get_message_output(type, target_ckey)
|
||||
var/timestamp = note.group[1]
|
||||
notetext = note.group[2]
|
||||
var/admin_ckey = note.group[3]
|
||||
var/DBQuery/query_convert_time = dbcon.NewQuery("SELECT ADDTIME(STR_TO_DATE('[timestamp]','%d-%b-%Y'), '0')")
|
||||
var/DBQuery/query_convert_time = GLOB.dbcon.NewQuery("SELECT ADDTIME(STR_TO_DATE('[timestamp]','%d-%b-%Y'), '0')")
|
||||
if(!query_convert_time.Execute())
|
||||
return
|
||||
if(query_convert_time.NextRow())
|
||||
|
||||
+80
-80
@@ -11,7 +11,7 @@
|
||||
return
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/client/C = locate(href_list["rejectadminhelp"]) in clients
|
||||
var/client/C = locate(href_list["rejectadminhelp"]) in GLOB.clients
|
||||
if(!C)
|
||||
return
|
||||
if (deltimer(C.adminhelptimerid))
|
||||
@@ -31,7 +31,7 @@
|
||||
if(world.time && spamcooldown > world.time)
|
||||
to_chat(usr, "Please wait [max(round((spamcooldown - world.time)*0.1, 0.1), 0)] seconds.")
|
||||
return
|
||||
var/client/C = locate(href_list["icissue"]) in clients
|
||||
var/client/C = locate(href_list["icissue"]) in GLOB.clients
|
||||
if(!C)
|
||||
return
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
|
||||
var/mob/playermob
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.ckey == banckey)
|
||||
playermob = M
|
||||
break
|
||||
@@ -466,8 +466,8 @@
|
||||
return
|
||||
|
||||
var/banfolder = href_list["unbanf"]
|
||||
Banlist.cd = "/base/[banfolder]"
|
||||
var/key = Banlist["key"]
|
||||
GLOB.Banlist.cd = "/base/[banfolder]"
|
||||
var/key = GLOB.Banlist["key"]
|
||||
if(alert(usr, "Are you sure you want to unban [key]?", "Confirmation", "Yes", "No") == "Yes")
|
||||
if(RemoveBan(banfolder))
|
||||
unbanpanel()
|
||||
@@ -483,14 +483,14 @@
|
||||
var/reason
|
||||
|
||||
var/banfolder = href_list["unbane"]
|
||||
Banlist.cd = "/base/[banfolder]"
|
||||
var/reason2 = Banlist["reason"]
|
||||
var/temp = Banlist["temp"]
|
||||
GLOB.Banlist.cd = "/base/[banfolder]"
|
||||
var/reason2 = GLOB.Banlist["reason"]
|
||||
var/temp = GLOB.Banlist["temp"]
|
||||
|
||||
var/minutes = Banlist["minutes"]
|
||||
var/minutes = GLOB.Banlist["minutes"]
|
||||
|
||||
var/banned_key = Banlist["key"]
|
||||
Banlist.cd = "/base"
|
||||
var/banned_key = GLOB.Banlist["key"]
|
||||
GLOB.Banlist.cd = "/base"
|
||||
|
||||
var/duration
|
||||
|
||||
@@ -498,12 +498,12 @@
|
||||
if("Yes")
|
||||
temp = 1
|
||||
var/mins = 0
|
||||
if(minutes > CMinutes)
|
||||
mins = minutes - CMinutes
|
||||
if(minutes > GLOB.CMinutes)
|
||||
mins = minutes - GLOB.CMinutes
|
||||
mins = input(usr,"How long (in minutes)? (Default: 1440)","Ban time",mins ? mins : 1440) as num|null
|
||||
if(!mins)
|
||||
return
|
||||
minutes = CMinutes + mins
|
||||
minutes = GLOB.CMinutes + mins
|
||||
duration = GetExp(minutes)
|
||||
reason = input(usr,"Please State Reason.","Reason",reason2) as message|null
|
||||
if(!reason)
|
||||
@@ -518,12 +518,12 @@
|
||||
log_admin_private("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
|
||||
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]</span>")
|
||||
Banlist.cd = "/base/[banfolder]"
|
||||
Banlist["reason"] << reason
|
||||
Banlist["temp"] << temp
|
||||
Banlist["minutes"] << minutes
|
||||
Banlist["bannedby"] << usr.ckey
|
||||
Banlist.cd = "/base"
|
||||
GLOB.Banlist.cd = "/base/[banfolder]"
|
||||
GLOB.Banlist["reason"] << reason
|
||||
GLOB.Banlist["temp"] << temp
|
||||
GLOB.Banlist["minutes"] << minutes
|
||||
GLOB.Banlist["bannedby"] << usr.ckey
|
||||
GLOB.Banlist.cd = "/base"
|
||||
feedback_inc("ban_edit",1)
|
||||
unbanpanel()
|
||||
|
||||
@@ -599,8 +599,8 @@
|
||||
//Regular jobs
|
||||
//Command (Blue)
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<tr align='center' bgcolor='ccccff'><th colspan='[length(command_positions)]'><a href='?src=\ref[src];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in command_positions)
|
||||
dat += "<tr align='center' bgcolor='ccccff'><th colspan='[length(GLOB.command_positions)]'><a href='?src=\ref[src];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.command_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -618,8 +618,8 @@
|
||||
//Security (Red)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<tr bgcolor='ffddf0'><th colspan='[length(security_positions)]'><a href='?src=\ref[src];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in security_positions)
|
||||
dat += "<tr bgcolor='ffddf0'><th colspan='[length(GLOB.security_positions)]'><a href='?src=\ref[src];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.security_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -637,8 +637,8 @@
|
||||
//Engineering (Yellow)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<tr bgcolor='fff5cc'><th colspan='[length(engineering_positions)]'><a href='?src=\ref[src];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in engineering_positions)
|
||||
dat += "<tr bgcolor='fff5cc'><th colspan='[length(GLOB.engineering_positions)]'><a href='?src=\ref[src];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.engineering_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -656,8 +656,8 @@
|
||||
//Medical (White)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<tr bgcolor='ffeef0'><th colspan='[length(medical_positions)]'><a href='?src=\ref[src];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in medical_positions)
|
||||
dat += "<tr bgcolor='ffeef0'><th colspan='[length(GLOB.medical_positions)]'><a href='?src=\ref[src];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.medical_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -675,8 +675,8 @@
|
||||
//Science (Purple)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<tr bgcolor='e79fff'><th colspan='[length(science_positions)]'><a href='?src=\ref[src];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in science_positions)
|
||||
dat += "<tr bgcolor='e79fff'><th colspan='[length(GLOB.science_positions)]'><a href='?src=\ref[src];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.science_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -694,8 +694,8 @@
|
||||
//Supply (Brown)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<tr bgcolor='DDAA55'><th colspan='[length(supply_positions)]'><a href='?src=\ref[src];jobban3=supplydept;jobban4=\ref[M]'>Supply Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in supply_positions)
|
||||
dat += "<tr bgcolor='DDAA55'><th colspan='[length(GLOB.supply_positions)]'><a href='?src=\ref[src];jobban3=supplydept;jobban4=\ref[M]'>Supply Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.supply_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -713,8 +713,8 @@
|
||||
//Civilian (Grey)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<tr bgcolor='dddddd'><th colspan='[length(civilian_positions)]'><a href='?src=\ref[src];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in civilian_positions)
|
||||
dat += "<tr bgcolor='dddddd'><th colspan='[length(GLOB.civilian_positions)]'><a href='?src=\ref[src];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.civilian_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -732,8 +732,8 @@
|
||||
//Non-Human (Green)
|
||||
counter = 0
|
||||
dat += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
dat += "<tr bgcolor='ccffcc'><th colspan='[length(nonhuman_positions)]'><a href='?src=\ref[src];jobban3=nonhumandept;jobban4=\ref[M]'>Non-human Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in nonhuman_positions)
|
||||
dat += "<tr bgcolor='ccffcc'><th colspan='[length(GLOB.nonhuman_positions)]'><a href='?src=\ref[src];jobban3=nonhumandept;jobban4=\ref[M]'>Non-human Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in GLOB.nonhuman_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
if(jobban_isbanned(M, jobPos))
|
||||
@@ -880,42 +880,42 @@
|
||||
var/list/joblist = list()
|
||||
switch(href_list["jobban3"])
|
||||
if("commanddept")
|
||||
for(var/jobPos in command_positions)
|
||||
for(var/jobPos in GLOB.command_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("securitydept")
|
||||
for(var/jobPos in security_positions)
|
||||
for(var/jobPos in GLOB.security_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("engineeringdept")
|
||||
for(var/jobPos in engineering_positions)
|
||||
for(var/jobPos in GLOB.engineering_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("medicaldept")
|
||||
for(var/jobPos in medical_positions)
|
||||
for(var/jobPos in GLOB.medical_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("sciencedept")
|
||||
for(var/jobPos in science_positions)
|
||||
for(var/jobPos in GLOB.science_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("supplydept")
|
||||
for(var/jobPos in supply_positions)
|
||||
for(var/jobPos in GLOB.supply_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("civiliandept")
|
||||
for(var/jobPos in civilian_positions)
|
||||
for(var/jobPos in GLOB.civilian_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
if("nonhumandept")
|
||||
for(var/jobPos in nonhuman_positions)
|
||||
for(var/jobPos in GLOB.nonhuman_positions)
|
||||
if(!jobPos)
|
||||
continue
|
||||
joblist += jobPos
|
||||
@@ -1109,7 +1109,7 @@
|
||||
|
||||
else if(href_list["messageedits"])
|
||||
var/message_id = sanitizeSQL("[href_list["messageedits"]]")
|
||||
var/DBQuery/query_get_message_edits = dbcon.NewQuery("SELECT edits FROM [format_table_name("messages")] WHERE id = '[message_id]'")
|
||||
var/DBQuery/query_get_message_edits = GLOB.dbcon.NewQuery("SELECT edits FROM [format_table_name("messages")] WHERE id = '[message_id]'")
|
||||
if(!query_get_message_edits.warn_execute())
|
||||
return
|
||||
if(query_get_message_edits.NextRow())
|
||||
@@ -1196,7 +1196,7 @@
|
||||
dat += {"<A href='?src=\ref[src];c_mode2=[mode]'>[config.mode_names[mode]]</A><br>"}
|
||||
dat += {"<A href='?src=\ref[src];c_mode2=secret'>Secret</A><br>"}
|
||||
dat += {"<A href='?src=\ref[src];c_mode2=random'>Random</A><br>"}
|
||||
dat += {"Now: [master_mode]"}
|
||||
dat += {"Now: [GLOB.master_mode]"}
|
||||
usr << browse(dat, "window=c_mode")
|
||||
|
||||
else if(href_list["f_secret"])
|
||||
@@ -1205,13 +1205,13 @@
|
||||
|
||||
if(SSticker && SSticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
if(master_mode != "secret")
|
||||
if(GLOB.master_mode != "secret")
|
||||
return alert(usr, "The game mode has to be secret!", null, null, null, null)
|
||||
var/dat = {"<B>What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.</B><HR>"}
|
||||
for(var/mode in config.modes)
|
||||
dat += {"<A href='?src=\ref[src];f_secret2=[mode]'>[config.mode_names[mode]]</A><br>"}
|
||||
dat += {"<A href='?src=\ref[src];f_secret2=secret'>Random (default)</A><br>"}
|
||||
dat += {"Now: [secret_force_mode]"}
|
||||
dat += {"Now: [GLOB.secret_force_mode]"}
|
||||
usr << browse(dat, "window=f_secret")
|
||||
|
||||
else if(href_list["c_mode2"])
|
||||
@@ -1220,12 +1220,12 @@
|
||||
|
||||
if (SSticker && SSticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
master_mode = href_list["c_mode2"]
|
||||
log_admin("[key_name(usr)] set the mode as [master_mode].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the mode as [master_mode].</span>")
|
||||
to_chat(world, "<span class='adminnotice'><b>The mode is now: [master_mode]</b></span>")
|
||||
GLOB.master_mode = href_list["c_mode2"]
|
||||
log_admin("[key_name(usr)] set the mode as [GLOB.master_mode].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the mode as [GLOB.master_mode].</span>")
|
||||
to_chat(world, "<span class='adminnotice'><b>The mode is now: [GLOB.master_mode]</b></span>")
|
||||
Game() // updates the main game menu
|
||||
world.save_mode(master_mode)
|
||||
world.save_mode(GLOB.master_mode)
|
||||
.(href, list("c_mode"=1))
|
||||
|
||||
else if(href_list["f_secret2"])
|
||||
@@ -1234,11 +1234,11 @@
|
||||
|
||||
if(SSticker && SSticker.mode)
|
||||
return alert(usr, "The game has already started.", null, null, null, null)
|
||||
if(master_mode != "secret")
|
||||
if(GLOB.master_mode != "secret")
|
||||
return alert(usr, "The game mode has to be secret!", null, null, null, null)
|
||||
secret_force_mode = href_list["f_secret2"]
|
||||
log_admin("[key_name(usr)] set the forced secret mode as [secret_force_mode].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the forced secret mode as [secret_force_mode].</span>")
|
||||
GLOB.secret_force_mode = href_list["f_secret2"]
|
||||
log_admin("[key_name(usr)] set the forced secret mode as [GLOB.secret_force_mode].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] set the forced secret mode as [GLOB.secret_force_mode].</span>")
|
||||
Game() // updates the main game menu
|
||||
.(href, list("f_secret"=1))
|
||||
|
||||
@@ -1313,7 +1313,7 @@
|
||||
if(alert(usr, "Send [key_name(M)] to Prison?", "Message", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
M.loc = pick(prisonwarp)
|
||||
M.loc = pick(GLOB.prisonwarp)
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to Prison!</span>")
|
||||
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to Prison!")
|
||||
@@ -1363,7 +1363,7 @@
|
||||
|
||||
M.Paralyse(5)
|
||||
sleep(5)
|
||||
M.loc = pick(tdome1)
|
||||
M.loc = pick(GLOB.tdome1)
|
||||
spawn(50)
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)")
|
||||
@@ -1389,7 +1389,7 @@
|
||||
|
||||
M.Paralyse(5)
|
||||
sleep(5)
|
||||
M.loc = pick(tdome2)
|
||||
M.loc = pick(GLOB.tdome2)
|
||||
spawn(50)
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)")
|
||||
@@ -1412,7 +1412,7 @@
|
||||
|
||||
M.Paralyse(5)
|
||||
sleep(5)
|
||||
M.loc = pick(tdomeadmin)
|
||||
M.loc = pick(GLOB.tdomeadmin)
|
||||
spawn(50)
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)")
|
||||
@@ -1442,7 +1442,7 @@
|
||||
observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(observer), slot_shoes)
|
||||
M.Paralyse(5)
|
||||
sleep(5)
|
||||
M.loc = pick(tdomeobserve)
|
||||
M.loc = pick(GLOB.tdomeobserve)
|
||||
spawn(50)
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
|
||||
@@ -1579,7 +1579,7 @@
|
||||
output_devil_info(M)
|
||||
|
||||
else if(href_list["adminmoreinfo"])
|
||||
var/mob/M = locate(href_list["adminmoreinfo"]) in mob_list
|
||||
var/mob/M = locate(href_list["adminmoreinfo"]) in GLOB.mob_list
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
@@ -1714,7 +1714,7 @@
|
||||
if(!check_rights(R_ADMIN|R_FUN))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["adminsmite"]) in mob_list
|
||||
var/mob/living/carbon/human/H = locate(href_list["adminsmite"]) in GLOB.mob_list
|
||||
if(!H || !istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
@@ -1722,7 +1722,7 @@
|
||||
usr.client.smite(H)
|
||||
|
||||
else if(href_list["CentcommReply"])
|
||||
var/mob/living/carbon/human/H = locate(href_list["CentcommReply"]) in mob_list
|
||||
var/mob/living/carbon/human/H = locate(href_list["CentcommReply"]) in GLOB.mob_list
|
||||
if(!istype(H))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
|
||||
return
|
||||
@@ -1808,7 +1808,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/M = locate(href_list["individuallog"]) in mob_list
|
||||
var/mob/M = locate(href_list["individuallog"]) in GLOB.mob_list
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "This can only be used on instances of type /mob.")
|
||||
return
|
||||
@@ -1818,7 +1818,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/living/L = locate(href_list["languagemenu"]) in mob_list
|
||||
var/mob/living/L = locate(href_list["languagemenu"]) in GLOB.mob_list
|
||||
if(!isliving(L))
|
||||
to_chat(usr, "This can only be used on instances of type /mob/living.")
|
||||
return
|
||||
@@ -1996,7 +1996,7 @@
|
||||
|
||||
else if(href_list["ac_submit_new_channel"])
|
||||
var/check = 0
|
||||
for(var/datum/newscaster/feed_channel/FC in news_network.network_channels)
|
||||
for(var/datum/newscaster/feed_channel/FC in GLOB.news_network.network_channels)
|
||||
if(FC.channel_name == src.admincaster_feed_channel.channel_name)
|
||||
check = 1
|
||||
break
|
||||
@@ -2005,7 +2005,7 @@
|
||||
else
|
||||
var/choice = alert("Please confirm Feed channel creation.","Network Channel Handler","Confirm","Cancel")
|
||||
if(choice=="Confirm")
|
||||
news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1)
|
||||
GLOB.news_network.CreateFeedChannel(src.admincaster_feed_channel.channel_name, src.admin_signature, src.admincaster_feed_channel.locked, 1)
|
||||
feedback_inc("newscaster_channels",1)
|
||||
log_admin("[key_name(usr)] created command feed channel: [src.admincaster_feed_channel.channel_name]!")
|
||||
src.admincaster_screen=5
|
||||
@@ -2013,7 +2013,7 @@
|
||||
|
||||
else if(href_list["ac_set_channel_receiving"])
|
||||
var/list/available_channels = list()
|
||||
for(var/datum/newscaster/feed_channel/F in news_network.network_channels)
|
||||
for(var/datum/newscaster/feed_channel/F in GLOB.news_network.network_channels)
|
||||
available_channels += F.channel_name
|
||||
src.admincaster_feed_channel.channel_name = adminscrub(input(usr, "Choose receiving Feed Channel.", "Network Channel Handler") in available_channels )
|
||||
src.access_news_network()
|
||||
@@ -2028,11 +2028,11 @@
|
||||
if(src.admincaster_feed_message.returnBody(-1) =="" || src.admincaster_feed_message.returnBody(-1) =="\[REDACTED\]" || src.admincaster_feed_channel.channel_name == "" )
|
||||
src.admincaster_screen = 6
|
||||
else
|
||||
news_network.SubmitArticle(src.admincaster_feed_message.returnBody(-1), src.admin_signature, src.admincaster_feed_channel.channel_name, null, 1)
|
||||
GLOB.news_network.SubmitArticle(src.admincaster_feed_message.returnBody(-1), src.admin_signature, src.admincaster_feed_channel.channel_name, null, 1)
|
||||
feedback_inc("newscaster_stories",1)
|
||||
src.admincaster_screen=4
|
||||
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
|
||||
NEWSCASTER.newsAlert(src.admincaster_feed_channel.channel_name)
|
||||
|
||||
log_admin("[key_name(usr)] submitted a feed story to channel: [src.admincaster_feed_channel.channel_name]!")
|
||||
@@ -2056,12 +2056,12 @@
|
||||
|
||||
else if(href_list["ac_menu_wanted"])
|
||||
var/already_wanted = 0
|
||||
if(news_network.wanted_issue.active)
|
||||
if(GLOB.news_network.wanted_issue.active)
|
||||
already_wanted = 1
|
||||
|
||||
if(already_wanted)
|
||||
src.admincaster_wanted_message.criminal = news_network.wanted_issue.criminal
|
||||
src.admincaster_wanted_message.body = news_network.wanted_issue.body
|
||||
src.admincaster_wanted_message.criminal = GLOB.news_network.wanted_issue.criminal
|
||||
src.admincaster_wanted_message.body = GLOB.news_network.wanted_issue.body
|
||||
src.admincaster_screen = 14
|
||||
src.access_news_network()
|
||||
|
||||
@@ -2085,10 +2085,10 @@
|
||||
var/choice = alert("Please confirm Wanted Issue [(input_param==1) ? ("creation.") : ("edit.")]","Network Security Handler","Confirm","Cancel")
|
||||
if(choice=="Confirm")
|
||||
if(input_param==1) //If input_param == 1 we're submitting a new wanted issue. At 2 we're just editing an existing one. See the else below
|
||||
news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature, null, 1, 1)
|
||||
GLOB.news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature, null, 1, 1)
|
||||
src.admincaster_screen = 15
|
||||
else
|
||||
news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature)
|
||||
GLOB.news_network.submitWanted(admincaster_wanted_message.criminal, admincaster_wanted_message.body, admin_signature)
|
||||
src.admincaster_screen = 19
|
||||
log_admin("[key_name(usr)] issued a Station-wide Wanted Notification for [src.admincaster_wanted_message.criminal]!")
|
||||
src.access_news_network()
|
||||
@@ -2096,7 +2096,7 @@
|
||||
else if(href_list["ac_cancel_wanted"])
|
||||
var/choice = alert("Please confirm Wanted Issue removal.","Network Security Handler","Confirm","Cancel")
|
||||
if(choice=="Confirm")
|
||||
news_network.deleteWanted()
|
||||
GLOB.news_network.deleteWanted()
|
||||
src.admincaster_screen=17
|
||||
src.access_news_network()
|
||||
|
||||
@@ -2219,14 +2219,14 @@
|
||||
O.belt = text2path(href_list["outfit_belt"])
|
||||
O.ears = text2path(href_list["outfit_ears"])
|
||||
|
||||
custom_outfits.Add(O)
|
||||
GLOB.custom_outfits.Add(O)
|
||||
message_admins("[key_name(usr)] created \"[O.name]\" outfit!")
|
||||
|
||||
else if(href_list["set_selfdestruct_code"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/code = random_nukecode()
|
||||
for(var/obj/machinery/nuclearbomb/selfdestruct/SD in nuke_list)
|
||||
for(var/obj/machinery/nuclearbomb/selfdestruct/SD in GLOB.nuke_list)
|
||||
SD.r_code = code
|
||||
message_admins("[key_name_admin(usr)] has set the self-destruct \
|
||||
code to \"[code]\".")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/list/forenames = list()
|
||||
var/list/ckeys = list()
|
||||
var/founds = ""
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
var/list/indexing = list(M.real_name, M.name)
|
||||
if(M.mind)
|
||||
indexing += M.mind.name
|
||||
@@ -80,7 +80,7 @@
|
||||
set category = "Admin"
|
||||
set name = "Adminhelp"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
//send this msg to all admins
|
||||
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(X.prefs.toggles & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
window_flash(X, ignorepref = TRUE)
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
/proc/get_admin_counts(requiredflags = R_BAN)
|
||||
. = list("total" = list(), "noflags" = list(), "afk" = list(), "stealth" = list(), "present" = list())
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
.["total"] += X
|
||||
if(requiredflags != 0 && !check_rights_for(X, requiredflags))
|
||||
.["noflags"] += X
|
||||
@@ -172,7 +172,7 @@
|
||||
message["message_sender"] = source
|
||||
message["message"] = msg
|
||||
message["source"] = "([config.cross_name])"
|
||||
message["key"] = global.comms_key
|
||||
message["key"] = GLOB.comms_key
|
||||
message["crossmessage"] = type
|
||||
|
||||
world.Export("[config.cross_address]?[list2params(message)]")
|
||||
@@ -181,7 +181,7 @@
|
||||
/proc/ircadminwho()
|
||||
var/list/message = list("Admins: ")
|
||||
var/list/admin_keys = list()
|
||||
for(var/adm in admins)
|
||||
for(var/adm in GLOB.admins)
|
||||
var/client/C = adm
|
||||
admin_keys += "[C][C.holder.fakekey ? "(Stealth)" : ""][C.is_afk() ? "(AFK)" : ""]"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/client/proc/jumptoarea(area/A in sortedAreas)
|
||||
/client/proc/jumptoarea(area/A in GLOB.sortedAreas)
|
||||
set name = "Jump to Area"
|
||||
set desc = "Area to jump to"
|
||||
set category = "Admin"
|
||||
@@ -38,7 +38,7 @@
|
||||
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/jumptomob(mob/M in mob_list)
|
||||
/client/proc/jumptomob(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Jump to Mob"
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
return
|
||||
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/Getmob(mob/M in mob_list)
|
||||
/client/proc/Getmob(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
@@ -119,7 +119,7 @@
|
||||
return
|
||||
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
keys += M.client
|
||||
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
@@ -141,7 +141,7 @@
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
var/area/A = input(usr, "Pick an area.", "Pick an area") in sortedAreas|null
|
||||
var/area/A = input(usr, "Pick an area.", "Pick an area") in GLOB.sortedAreas|null
|
||||
if(A && istype(A))
|
||||
if(M.forceMove(safepick(get_area_turfs(A))))
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
//allows right clicking mobs to send an admin PM to their client, forwards the selected mob's client to cmd_admin_pm
|
||||
/client/proc/cmd_admin_pm_context(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_pm_context(mob/M in GLOB.mob_list)
|
||||
set category = null
|
||||
set name = "Admin PM Mob"
|
||||
if(!holder)
|
||||
@@ -43,7 +43,7 @@
|
||||
if(istext(whom))
|
||||
if(cmptext(copytext(whom,1,2),"@"))
|
||||
whom = findStealthKey(whom)
|
||||
C = directory[whom]
|
||||
C = GLOB.directory[whom]
|
||||
else if(istype(whom,/client))
|
||||
C = whom
|
||||
if(!C)
|
||||
@@ -72,7 +72,7 @@
|
||||
if(whom == "IRCKEY")
|
||||
irc = 1
|
||||
else
|
||||
C = directory[whom]
|
||||
C = GLOB.directory[whom]
|
||||
else if(istype(whom,/client))
|
||||
C = whom
|
||||
if(irc)
|
||||
@@ -177,13 +177,13 @@
|
||||
|
||||
if(irc)
|
||||
log_admin_private("PM: [key_name(src)]->IRC: [rawmsg]")
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
to_chat(X, "<B><font color='blue'>PM: [key_name(src, X, 0)]->IRC:</B> \blue [keywordparsedmsg]</font>" )
|
||||
else
|
||||
window_flash(C, ignorepref = TRUE)
|
||||
log_admin_private("PM: [key_name(src)]->[key_name(C)]: [rawmsg]")
|
||||
//we don't use message_admins here because the sender/receiver might get it too
|
||||
for(var/client/X in admins)
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(X.key!=key && X.key!=C.key) //check client/X is an admin and isn't the sender or recipient
|
||||
to_chat(X, "<B><font color='blue'>PM: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [keywordparsedmsg]</font>" )
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
/proc/IrcPm(target,msg,sender)
|
||||
|
||||
var/client/C = directory[target]
|
||||
var/client/C = GLOB.directory[target]
|
||||
|
||||
var/static/stealthkey
|
||||
var/adminname = config.showircname ? "[sender](IRC)" : "Administrator"
|
||||
@@ -229,12 +229,12 @@
|
||||
var/i = 0
|
||||
while(i == 0)
|
||||
i = 1
|
||||
for(var/P in stealthminID)
|
||||
if(num == stealthminID[P])
|
||||
for(var/P in GLOB.stealthminID)
|
||||
if(num == GLOB.stealthminID[P])
|
||||
num++
|
||||
i = 0
|
||||
var/stealth = "@[num2text(num)]"
|
||||
stealthminID["IRCKEY"] = stealth
|
||||
GLOB.stealthminID["IRCKEY"] = stealth
|
||||
return stealth
|
||||
|
||||
#undef IRCREPLYCOUNT
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
msg = keywords_lookup(msg)
|
||||
if(check_rights(R_ADMIN,0))
|
||||
msg = "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> (<a href='?_src_=holder;adminplayerobservefollow=\ref[mob]'>FLW</A>): <span class='message'>[msg]</span></span>"
|
||||
to_chat(admins, msg)
|
||||
to_chat(GLOB.admins, msg)
|
||||
else
|
||||
msg = "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]:</EM> <span class='message'>[msg]</span></span>"
|
||||
to_chat(admins, msg)
|
||||
to_chat(GLOB.admins, msg)
|
||||
|
||||
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
//all plumbing - yes, some things might get stated twice, doesn't matter.
|
||||
for (var/obj/machinery/atmospherics/plumbing in machines)
|
||||
for (var/obj/machinery/atmospherics/plumbing in GLOB.machines)
|
||||
if (plumbing.nodealert)
|
||||
to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")
|
||||
|
||||
//Manifolds
|
||||
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in machines)
|
||||
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in GLOB.machines)
|
||||
if (!pipe.NODE1 || !pipe.NODE2 || !pipe.NODE3)
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
|
||||
//Pipes
|
||||
for (var/obj/machinery/atmospherics/pipe/simple/pipe in machines)
|
||||
for (var/obj/machinery/atmospherics/pipe/simple/pipe in GLOB.machines)
|
||||
if (!pipe.NODE1 || !pipe.NODE2)
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
return
|
||||
feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
for (var/datum/powernet/PN in powernets)
|
||||
for (var/datum/powernet/PN in GLOB.powernets)
|
||||
if (!PN.nodes || !PN.nodes.len)
|
||||
if(PN.cables && (PN.cables.len > 1))
|
||||
var/obj/structure/cable/C = PN.cables[1]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/client/proc/bluespace_artillery(mob/M in mob_list)
|
||||
/client/proc/bluespace_artillery(mob/M in GLOB.mob_list)
|
||||
if(!holder || !check_rights(R_FUN))
|
||||
return
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
if("number")
|
||||
valueholder = input(user,"Enter variable value:" ,"Value", 123) as num
|
||||
if("mob-reference")
|
||||
valueholder = input(user,"Enter variable value:" ,"Value") as mob in mob_list
|
||||
valueholder = input(user,"Enter variable value:" ,"Value") as mob in GLOB.mob_list
|
||||
if("obj-reference")
|
||||
valueholder = input(user,"Enter variable value:" ,"Value") as obj in world
|
||||
if("turf-reference")
|
||||
@@ -218,7 +218,7 @@
|
||||
cornerA = null
|
||||
cornerB = null
|
||||
|
||||
/proc/togglebuildmode(mob/M in player_list)
|
||||
/proc/togglebuildmode(mob/M in GLOB.player_list)
|
||||
set name = "Toggle Build Mode"
|
||||
set category = "Special Verbs"
|
||||
if(M.client)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.holder.fakekey ? pick(nicknames) : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
|
||||
|
||||
for (var/mob/M in player_list)
|
||||
for (var/mob/M in GLOB.player_list)
|
||||
if(isnewplayer(M))
|
||||
continue
|
||||
if (M.stat == DEAD || (M.client && M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
if(Debug2)
|
||||
Debug2 = 0
|
||||
if(GLOB.Debug2)
|
||||
GLOB.Debug2 = 0
|
||||
message_admins("[key_name(src)] toggled debugging off.")
|
||||
log_admin("[key_name(src)] toggled debugging off.")
|
||||
else
|
||||
Debug2 = 1
|
||||
GLOB.Debug2 = 1
|
||||
message_admins("[key_name(src)] toggled debugging on.")
|
||||
log_admin("[key_name(src)] toggled debugging on.")
|
||||
|
||||
@@ -171,13 +171,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
var/t = ""
|
||||
for(var/id in env_gases)
|
||||
if(id in hardcoded_gases || env_gases[id][MOLES])
|
||||
if(id in GLOB.hardcoded_gases || env_gases[id][MOLES])
|
||||
t+= "[env_gases[id][GAS_META][META_GAS_NAME]] : [env_gases[id][MOLES]]\n"
|
||||
|
||||
to_chat(usr, t)
|
||||
feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_robotize(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_robotize(mob/M in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make Robot"
|
||||
|
||||
@@ -193,7 +193,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_blobize(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_blobize(mob/M in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make Blob"
|
||||
|
||||
@@ -211,7 +211,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
alert("Invalid mob")
|
||||
|
||||
|
||||
/client/proc/cmd_admin_animalize(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_animalize(mob/M in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make Simple Animal"
|
||||
|
||||
@@ -232,13 +232,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.Animalize()
|
||||
|
||||
|
||||
/client/proc/makepAI(turf/T in mob_list)
|
||||
/client/proc/makepAI(turf/T in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make pAI"
|
||||
set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI"
|
||||
|
||||
var/list/available = list()
|
||||
for(var/mob/C in mob_list)
|
||||
for(var/mob/C in GLOB.mob_list)
|
||||
if(C.key)
|
||||
available.Add(C)
|
||||
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
|
||||
@@ -259,7 +259,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
SSpai.candidates.Remove(candidate)
|
||||
feedback_add_details("admin_verb","MPAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_alienize(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_alienize(mob/M in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make Alien"
|
||||
|
||||
@@ -276,7 +276,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
/client/proc/cmd_admin_slimeize(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_slimeize(mob/M in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Make slime"
|
||||
|
||||
@@ -293,40 +293,39 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
var/list/TYPES_SHORTCUTS = list(
|
||||
/obj/effect/decal/cleanable = "CLEANABLE",
|
||||
/obj/item/device/radio/headset = "HEADSET",
|
||||
/obj/item/clothing/head/helmet/space = "SPESSHELMET",
|
||||
/obj/item/weapon/book/manual = "MANUAL",
|
||||
/obj/item/weapon/reagent_containers/food/drinks = "DRINK", //longest paths comes first
|
||||
/obj/item/weapon/reagent_containers/food = "FOOD",
|
||||
/obj/item/weapon/reagent_containers = "REAGENT_CONTAINERS",
|
||||
/obj/item/weapon = "WEAPON",
|
||||
/obj/machinery/atmospherics = "ATMOS_MECH",
|
||||
/obj/machinery/portable_atmospherics = "PORT_ATMOS",
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack = "MECHA_MISSILE_RACK",
|
||||
/obj/item/mecha_parts/mecha_equipment = "MECHA_EQUIP",
|
||||
/obj/item/organ = "ORGAN",
|
||||
/obj/item = "ITEM",
|
||||
/obj/machinery = "MACHINERY",
|
||||
/obj/effect = "EFFECT",
|
||||
/obj = "O",
|
||||
/datum = "D",
|
||||
/turf/open = "OPEN",
|
||||
/turf/closed = "CLOSED",
|
||||
/turf = "T",
|
||||
/mob/living/carbon = "CARBON",
|
||||
/mob/living/simple_animal = "SIMPLE",
|
||||
/mob/living = "LIVING",
|
||||
/mob = "M"
|
||||
)
|
||||
|
||||
/proc/make_types_fancy(var/list/types)
|
||||
if (ispath(types))
|
||||
types = list(types)
|
||||
. = list()
|
||||
for(var/type in types)
|
||||
var/typename = "[type]"
|
||||
var/static/list/TYPES_SHORTCUTS = list(
|
||||
/obj/effect/decal/cleanable = "CLEANABLE",
|
||||
/obj/item/device/radio/headset = "HEADSET",
|
||||
/obj/item/clothing/head/helmet/space = "SPESSHELMET",
|
||||
/obj/item/weapon/book/manual = "MANUAL",
|
||||
/obj/item/weapon/reagent_containers/food/drinks = "DRINK", //longest paths comes first
|
||||
/obj/item/weapon/reagent_containers/food = "FOOD",
|
||||
/obj/item/weapon/reagent_containers = "REAGENT_CONTAINERS",
|
||||
/obj/item/weapon = "WEAPON",
|
||||
/obj/machinery/atmospherics = "ATMOS_MECH",
|
||||
/obj/machinery/portable_atmospherics = "PORT_ATMOS",
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack = "MECHA_MISSILE_RACK",
|
||||
/obj/item/mecha_parts/mecha_equipment = "MECHA_EQUIP",
|
||||
/obj/item/organ = "ORGAN",
|
||||
/obj/item = "ITEM",
|
||||
/obj/machinery = "MACHINERY",
|
||||
/obj/effect = "EFFECT",
|
||||
/obj = "O",
|
||||
/datum = "D",
|
||||
/turf/open = "OPEN",
|
||||
/turf/closed = "CLOSED",
|
||||
/turf = "T",
|
||||
/mob/living/carbon = "CARBON",
|
||||
/mob/living/simple_animal = "SIMPLE",
|
||||
/mob/living = "LIVING",
|
||||
/mob = "M"
|
||||
)
|
||||
for (var/tn in TYPES_SHORTCUTS)
|
||||
if (copytext(typename,1, length("[tn]/")+1)=="[tn]/" /*findtextEx(typename,"[tn]/",1,2)*/ )
|
||||
typename = TYPES_SHORTCUTS[tn]+copytext(typename,length("[tn]/"))
|
||||
@@ -388,7 +387,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
message_admins("[key_name_admin(src)] has remade the powernets. makepowernets() called.", 0)
|
||||
feedback_add_details("admin_verb","MPWN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_grantfullaccess(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_grantfullaccess(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Grant Full Access"
|
||||
|
||||
@@ -428,7 +427,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
log_admin("[key_name(src)] has granted [M.key] full access.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has granted [M.key] full access.</span>")
|
||||
|
||||
/client/proc/cmd_assume_direct_control(mob/M in mob_list)
|
||||
/client/proc/cmd_assume_direct_control(mob/M in GLOB.mob_list)
|
||||
set category = "Admin"
|
||||
set name = "Assume direct control"
|
||||
set desc = "Direct intervention"
|
||||
@@ -464,37 +463,37 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
if(!(A.type in areas_all))
|
||||
areas_all.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/power/apc/APC in apcs_list)
|
||||
for(var/obj/machinery/power/apc/APC in GLOB.apcs_list)
|
||||
var/area/A = get_area(APC)
|
||||
if(!(A.type in areas_with_APC))
|
||||
areas_with_APC.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/airalarm/AA in machines)
|
||||
for(var/obj/machinery/airalarm/AA in GLOB.machines)
|
||||
var/area/A = get_area(AA)
|
||||
if(!(A.type in areas_with_air_alarm))
|
||||
areas_with_air_alarm.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/requests_console/RC in machines)
|
||||
for(var/obj/machinery/requests_console/RC in GLOB.machines)
|
||||
var/area/A = get_area(RC)
|
||||
if(!(A.type in areas_with_RC))
|
||||
areas_with_RC.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
var/area/A = get_area(L)
|
||||
if(!(A.type in areas_with_light))
|
||||
areas_with_light.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/light_switch/LS in machines)
|
||||
for(var/obj/machinery/light_switch/LS in GLOB.machines)
|
||||
var/area/A = get_area(LS)
|
||||
if(!(A.type in areas_with_LS))
|
||||
areas_with_LS.Add(A.type)
|
||||
|
||||
for(var/obj/item/device/radio/intercom/I in machines)
|
||||
for(var/obj/item/device/radio/intercom/I in GLOB.machines)
|
||||
var/area/A = get_area(I)
|
||||
if(!(A.type in areas_with_intercom))
|
||||
areas_with_intercom.Add(A.type)
|
||||
|
||||
for(var/obj/machinery/camera/C in machines)
|
||||
for(var/obj/machinery/camera/C in GLOB.machines)
|
||||
var/area/A = get_area(C)
|
||||
if(!(A.type in areas_with_camera))
|
||||
areas_with_camera.Add(A.type)
|
||||
@@ -535,7 +534,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
for(var/areatype in areas_without_camera)
|
||||
to_chat(world, "* [areatype]")
|
||||
|
||||
/client/proc/cmd_admin_dress(mob/living/carbon/human/M in mob_list)
|
||||
/client/proc/cmd_admin_dress(mob/living/carbon/human/M in GLOB.mob_list)
|
||||
set category = "Fun"
|
||||
set name = "Select equipment"
|
||||
if(!ishuman(M))
|
||||
@@ -573,7 +572,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
var/datum/outfit/custom = null
|
||||
if (dresscode == "Custom")
|
||||
var/list/custom_names = list()
|
||||
for(var/datum/outfit/D in custom_outfits)
|
||||
for(var/datum/outfit/D in GLOB.custom_outfits)
|
||||
custom_names[D.name] = D
|
||||
var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in custom_names
|
||||
custom = custom_names[selected_name]
|
||||
@@ -607,11 +606,11 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/machinery/power/emitter/E in machines)
|
||||
for(var/obj/machinery/power/emitter/E in GLOB.machines)
|
||||
if(E.anchored)
|
||||
E.active = 1
|
||||
|
||||
for(var/obj/machinery/field/generator/F in machines)
|
||||
for(var/obj/machinery/field/generator/F in GLOB.machines)
|
||||
if(F.active == 0)
|
||||
F.active = 1
|
||||
F.state = 2
|
||||
@@ -622,7 +621,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
F.update_icon()
|
||||
|
||||
spawn(30)
|
||||
for(var/obj/machinery/the_singularitygen/G in machines)
|
||||
for(var/obj/machinery/the_singularitygen/G in GLOB.machines)
|
||||
if(G.anchored)
|
||||
var/obj/singularity/S = new /obj/singularity(get_turf(G), 50)
|
||||
// qdel(G)
|
||||
@@ -639,7 +638,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
//S.dissipate_track = 0
|
||||
//S.dissipate_strength = 10
|
||||
|
||||
for(var/obj/machinery/power/rad_collector/Rad in machines)
|
||||
for(var/obj/machinery/power/rad_collector/Rad in GLOB.machines)
|
||||
if(Rad.anchored)
|
||||
if(!Rad.loaded_tank)
|
||||
var/obj/item/weapon/tank/internals/plasma/Plasma = new/obj/item/weapon/tank/internals/plasma(Rad)
|
||||
@@ -652,7 +651,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
if(!Rad.active)
|
||||
Rad.toggle_power()
|
||||
|
||||
for(var/obj/machinery/power/smes/SMES in machines)
|
||||
for(var/obj/machinery/power/smes/SMES in GLOB.machines)
|
||||
if(SMES.anchored)
|
||||
SMES.input_attempt = 1
|
||||
|
||||
@@ -663,19 +662,19 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
|
||||
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Clients","Joined Clients"))
|
||||
if("Players")
|
||||
to_chat(usr, jointext(player_list,","))
|
||||
to_chat(usr, jointext(GLOB.player_list,","))
|
||||
if("Admins")
|
||||
to_chat(usr, jointext(admins,","))
|
||||
to_chat(usr, jointext(GLOB.admins,","))
|
||||
if("Mobs")
|
||||
to_chat(usr, jointext(mob_list,","))
|
||||
to_chat(usr, jointext(GLOB.mob_list,","))
|
||||
if("Living Mobs")
|
||||
to_chat(usr, jointext(living_mob_list,","))
|
||||
to_chat(usr, jointext(GLOB.living_mob_list,","))
|
||||
if("Dead Mobs")
|
||||
to_chat(usr, jointext(dead_mob_list,","))
|
||||
to_chat(usr, jointext(GLOB.dead_mob_list,","))
|
||||
if("Clients")
|
||||
to_chat(usr, jointext(clients,","))
|
||||
to_chat(usr, jointext(GLOB.clients,","))
|
||||
if("Joined Clients")
|
||||
to_chat(usr, jointext(joined_player_list,","))
|
||||
to_chat(usr, jointext(GLOB.joined_player_list,","))
|
||||
|
||||
/client/proc/cmd_display_del_log()
|
||||
set category = "Debug"
|
||||
@@ -703,7 +702,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
debug_variables(huds[i])
|
||||
debug_variables(GLOB.huds[i])
|
||||
|
||||
/client/proc/jump_to_ruin()
|
||||
set category = "Debug"
|
||||
@@ -712,7 +711,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
if(!holder)
|
||||
return
|
||||
var/list/names = list()
|
||||
for(var/i in ruin_landmarks)
|
||||
for(var/i in GLOB.ruin_landmarks)
|
||||
var/obj/effect/landmark/ruin/ruin_landmark = i
|
||||
var/datum/map_template/ruin/template = ruin_landmark.ruin_template
|
||||
|
||||
@@ -757,11 +756,11 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
global.medals_enabled = !global.medals_enabled
|
||||
GLOB.medals_enabled = !GLOB.medals_enabled
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.</span>")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] [GLOB.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.</span>")
|
||||
feedback_add_details("admin_verb","TMH") // If...
|
||||
log_admin("[key_name(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.")
|
||||
log_admin("[key_name(src)] [GLOB.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.")
|
||||
|
||||
/client/proc/view_runtimes()
|
||||
set category = "Debug"
|
||||
@@ -771,7 +770,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
error_cache.show_to(src)
|
||||
GLOB.error_cache.show_to(src)
|
||||
|
||||
/client/proc/pump_random_event()
|
||||
set category = "Debug"
|
||||
|
||||
@@ -54,12 +54,12 @@
|
||||
set name = "Radio report"
|
||||
|
||||
var/filters = list(
|
||||
"1" = "RADIO_TO_AIRALARM",
|
||||
"2" = "RADIO_FROM_AIRALARM",
|
||||
"3" = "RADIO_CHAT",
|
||||
"4" = "RADIO_ATMOSIA",
|
||||
"5" = "RADIO_NAVBEACONS",
|
||||
"6" = "RADIO_AIRLOCK",
|
||||
"1" = "GLOB.RADIO_TO_AIRALARM",
|
||||
"2" = "GLOB.RADIO_FROM_AIRALARM",
|
||||
"3" = "GLOB.RADIO_CHAT",
|
||||
"4" = "GLOB.RADIO_ATMOSIA",
|
||||
"5" = "GLOB.RADIO_NAVBEACONS",
|
||||
"6" = "GLOB.RADIO_AIRLOCK",
|
||||
"7" = "RADIO_SECBOT",
|
||||
"8" = "RADIO_MULEBOT",
|
||||
"_default" = "NO_FILTER"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
to_chat(src, "<font color='red'>Only Admins may use this command.</font>")
|
||||
return
|
||||
|
||||
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in clients
|
||||
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in GLOB.clients
|
||||
if(!istype(target,/client))
|
||||
to_chat(src, "<font color='red'>Error: giveruntimelog(): Client not found.</font>")
|
||||
return
|
||||
@@ -85,8 +85,8 @@
|
||||
set name = "Show Server Log"
|
||||
set desc = "Shows today's server log."
|
||||
|
||||
if(fexists("[diary]"))
|
||||
src << ftp(diary)
|
||||
if(fexists("[GLOB.diary]"))
|
||||
src << ftp(GLOB.diary)
|
||||
else
|
||||
to_chat(src, "<font color='red'>Server log not found, try using .getserverlog.</font>")
|
||||
return
|
||||
@@ -99,8 +99,8 @@
|
||||
set name = "Show Server Attack Log"
|
||||
set desc = "Shows today's server attack log."
|
||||
|
||||
if(fexists("[diaryofmeanpeople]"))
|
||||
src << ftp(diaryofmeanpeople)
|
||||
if(fexists("[GLOB.diaryofmeanpeople]"))
|
||||
src << ftp(GLOB.diaryofmeanpeople)
|
||||
else
|
||||
to_chat(src, "<font color='red'>Server attack log not found, try using .getserverlog.</font>")
|
||||
return
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
//- Check for any misplaced or stacked piece of wire
|
||||
//- Identify how hard it is to break into the area and where the weak points are
|
||||
//- Check if the area has too much empty space. If so, make it smaller and replace the rest with maintenance tunnels.
|
||||
var/intercom_range_display_status = 0
|
||||
|
||||
var/list/admin_verbs_debug_mapping = list(
|
||||
GLOBAL_PROTECT(admin_verbs_debug_mapping)
|
||||
GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
|
||||
/client/proc/do_not_use_these, //-errorage
|
||||
/client/proc/camera_view, //-errorage
|
||||
/client/proc/sec_camera_report, //-errorage
|
||||
@@ -43,7 +43,7 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
/client/proc/cmd_show_at_list,
|
||||
/client/proc/cmd_show_at_list,
|
||||
/client/proc/manipulate_organs
|
||||
)
|
||||
))
|
||||
|
||||
/obj/effect/debugging/mapfix_marker
|
||||
name = "map fix marker"
|
||||
@@ -76,7 +76,7 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
|
||||
if(!on)
|
||||
var/list/seen = list()
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
for(var/turf/T in C.can_see())
|
||||
seen[T]++
|
||||
for(var/turf/T in seen)
|
||||
@@ -95,7 +95,7 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
|
||||
var/list/obj/machinery/camera/CL = list()
|
||||
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
CL += C
|
||||
|
||||
var/output = {"<B>CAMERA ANNOMALITIES REPORT</B><HR>
|
||||
@@ -129,6 +129,7 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
set category = "Mapping"
|
||||
set name = "Intercom Range Display"
|
||||
|
||||
var/static/intercom_range_display_status = 0
|
||||
if(intercom_range_display_status)
|
||||
intercom_range_display_status = 0
|
||||
else
|
||||
@@ -153,8 +154,8 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
var/dat = {"<b>Coordinate list of Active Turfs at Roundstart</b>
|
||||
<br>Real-time Active Turfs list you can see in Air Subsystem at active_turfs var<br>"}
|
||||
|
||||
for(var/i=1; i<=active_turfs_startlist.len; i++)
|
||||
dat += active_turfs_startlist[i]
|
||||
for(var/i=1; i<=GLOB.active_turfs_startlist.len; i++)
|
||||
dat += GLOB.active_turfs_startlist[i]
|
||||
dat += "<br>"
|
||||
|
||||
usr << browse(dat, "window=at_list")
|
||||
@@ -167,13 +168,13 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
verbs -= /client/proc/enable_debug_verbs
|
||||
verbs.Add(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping)
|
||||
verbs.Add(/client/proc/disable_debug_verbs, GLOB.admin_verbs_debug_mapping)
|
||||
feedback_add_details("admin_verb","mDVE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/disable_debug_verbs()
|
||||
set category = "Debug"
|
||||
set name = "Debug verbs - Disable"
|
||||
verbs.Remove(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping)
|
||||
verbs.Remove(/client/proc/disable_debug_verbs, GLOB.admin_verbs_debug_mapping)
|
||||
verbs += /client/proc/enable_debug_verbs
|
||||
feedback_add_details("admin_verb", "mDVD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -249,13 +250,13 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
|
||||
|
||||
//This proc is intended to detect lag problems relating to communication procs
|
||||
var/global/say_disabled = 0
|
||||
GLOBAL_VAR_INIT(say_disabled, FALSE)
|
||||
/client/proc/disable_communication()
|
||||
set category = "Mapping"
|
||||
set name = "Disable all communication verbs"
|
||||
|
||||
say_disabled = !say_disabled
|
||||
if(say_disabled)
|
||||
GLOB.say_disabled = !GLOB.say_disabled
|
||||
if(GLOB.say_disabled)
|
||||
message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.")
|
||||
else
|
||||
message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.")
|
||||
|
||||
@@ -37,16 +37,16 @@
|
||||
var/default
|
||||
var/var_value = O.vars[variable]
|
||||
|
||||
if(variable in VVckey_edit)
|
||||
if(variable in GLOB.VVckey_edit)
|
||||
to_chat(src, "It's forbidden to mass-modify ckeys. It'll crash everyone's client you dummy.")
|
||||
return
|
||||
if(variable in VVlocked)
|
||||
if(variable in GLOB.VVlocked)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
if(variable in VVicon_edit_lock)
|
||||
if(variable in GLOB.VVicon_edit_lock)
|
||||
if(!check_rights(R_FUN|R_DEBUG))
|
||||
return
|
||||
if(variable in VVpixelmovement)
|
||||
if(variable in GLOB.VVpixelmovement)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")
|
||||
@@ -205,19 +205,19 @@
|
||||
typecache = typecacheof(typecache)
|
||||
. = list()
|
||||
if (ispath(T, /mob))
|
||||
for(var/mob/thing in mob_list)
|
||||
for(var/mob/thing in GLOB.mob_list)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /obj/machinery/door))
|
||||
for(var/obj/machinery/door/thing in airlocks)
|
||||
for(var/obj/machinery/door/thing in GLOB.airlocks)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /obj/machinery))
|
||||
for(var/obj/machinery/thing in machines)
|
||||
for(var/obj/machinery/thing in GLOB.machines)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
@@ -247,7 +247,7 @@
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /client))
|
||||
for(var/client/thing in clients)
|
||||
for(var/client/thing in GLOB.clients)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
var/list/VVlocked = list("vars", "var_edited", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "force_ending")
|
||||
var/list/VVicon_edit_lock = list("icon", "icon_state", "overlays", "underlays", "resize")
|
||||
var/list/VVckey_edit = list("key", "ckey")
|
||||
var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width", "bound_x", "bound_y")
|
||||
GLOBAL_LIST_INIT(VVlocked, list("vars", "var_edited", "client", "virus", "viruses", "cuffed", "last_eaten", "unlock_content", "force_ending"))
|
||||
GLOBAL_PROTECT(VVlocked)
|
||||
GLOBAL_LIST_INIT(VVicon_edit_lock, list("icon", "icon_state", "overlays", "underlays", "resize"))
|
||||
GLOBAL_PROTECT(VVicon_edit_lock)
|
||||
GLOBAL_LIST_INIT(VVckey_edit, list("key", "ckey"))
|
||||
GLOBAL_PROTECT(VVckey_edit)
|
||||
GLOBAL_LIST_INIT(VVpixelmovement, list("step_x", "step_y", "bound_height", "bound_width", "bound_x", "bound_y"))
|
||||
GLOBAL_PROTECT(VVpixelmovement)
|
||||
|
||||
|
||||
/client/proc/vv_get_class(var/var_value)
|
||||
@@ -176,7 +180,7 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
|
||||
|
||||
if (VV_CLIENT)
|
||||
.["value"] = input("Select reference:", "Reference", current_value) as null|anything in clients
|
||||
.["value"] = input("Select reference:", "Reference", current_value) as null|anything in GLOB.clients
|
||||
if (.["value"] == null)
|
||||
.["class"] = null
|
||||
return
|
||||
@@ -527,16 +531,16 @@ var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width
|
||||
|
||||
var_value = O.vars[variable]
|
||||
|
||||
if(variable in VVlocked)
|
||||
if(variable in GLOB.VVlocked)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
if(variable in VVckey_edit)
|
||||
if(variable in GLOB.VVckey_edit)
|
||||
if(!check_rights(R_SPAWN|R_DEBUG))
|
||||
return
|
||||
if(variable in VVicon_edit_lock)
|
||||
if(variable in GLOB.VVicon_edit_lock)
|
||||
if(!check_rights(R_FUN|R_DEBUG))
|
||||
return
|
||||
if(variable in VVpixelmovement)
|
||||
if(variable in GLOB.VVpixelmovement)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(ROLE_TRAITOR in applicant.client.prefs.be_special)
|
||||
if(!applicant.stat)
|
||||
if(applicant.mind)
|
||||
@@ -77,7 +77,7 @@
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(ROLE_CHANGELING in applicant.client.prefs.be_special)
|
||||
var/turf/T = get_turf(applicant)
|
||||
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
|
||||
@@ -110,7 +110,7 @@
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(ROLE_REV in applicant.client.prefs.be_special)
|
||||
var/turf/T = get_turf(applicant)
|
||||
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
|
||||
@@ -152,7 +152,7 @@
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(ROLE_CULTIST in applicant.client.prefs.be_special)
|
||||
var/turf/T = get_turf(applicant)
|
||||
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
|
||||
@@ -185,7 +185,7 @@
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(ROLE_SERVANT_OF_RATVAR in applicant.client.prefs.be_special)
|
||||
var/turf/T = get_turf(applicant)
|
||||
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
|
||||
@@ -241,13 +241,13 @@
|
||||
|
||||
var/nuke_code = random_nukecode()
|
||||
|
||||
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in nuke_list
|
||||
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list
|
||||
if(nuke)
|
||||
nuke.r_code = nuke_code
|
||||
|
||||
//Let's find the spawn locations
|
||||
var/list/turf/synd_spawn = list()
|
||||
for(var/obj/effect/landmark/A in landmarks_list)
|
||||
for(var/obj/effect/landmark/A in GLOB.landmarks_list)
|
||||
if(A.name == "Syndicate-Spawn")
|
||||
synd_spawn += get_turf(A)
|
||||
continue
|
||||
@@ -294,7 +294,7 @@
|
||||
if(candidates.len >= 2) //Minimum 2 to be considered a squad
|
||||
//Pick the lucky players
|
||||
var/numagents = min(5,candidates.len) //How many commandos to spawn
|
||||
var/list/spawnpoints = emergencyresponseteamspawn
|
||||
var/list/spawnpoints = GLOB.emergencyresponseteamspawn
|
||||
while(numagents && candidates.len)
|
||||
if (numagents > spawnpoints.len)
|
||||
numagents--
|
||||
@@ -309,15 +309,15 @@
|
||||
var/mob/living/carbon/human/Commando = new(spawnloc)
|
||||
chosen_candidate.client.prefs.copy_to(Commando)
|
||||
if(numagents == 1) //If Squad Leader
|
||||
Commando.real_name = "Officer [pick(commando_names)]"
|
||||
Commando.real_name = "Officer [pick(GLOB.commando_names)]"
|
||||
Commando.equipOutfit(/datum/outfit/death_commando/officer)
|
||||
else
|
||||
Commando.real_name = "Trooper [pick(commando_names)]"
|
||||
Commando.real_name = "Trooper [pick(GLOB.commando_names)]"
|
||||
Commando.equipOutfit(/datum/outfit/death_commando)
|
||||
Commando.dna.update_dna_identity()
|
||||
Commando.key = chosen_candidate.key
|
||||
Commando.mind.assigned_role = "Death Commando"
|
||||
for(var/obj/machinery/door/poddoor/ert/door in airlocks)
|
||||
for(var/obj/machinery/door/poddoor/ert/door in GLOB.airlocks)
|
||||
spawn(0)
|
||||
door.open()
|
||||
|
||||
@@ -370,7 +370,7 @@
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in player_list)
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(ROLE_GANG in applicant.client.prefs.be_special)
|
||||
var/turf/T = get_turf(applicant)
|
||||
if(applicant.stat == CONSCIOUS && applicant.mind && !applicant.mind.special_role && T.z == ZLEVEL_STATION)
|
||||
@@ -382,7 +382,7 @@
|
||||
if(candidates.len >= 2)
|
||||
for(var/needs_assigned=2,needs_assigned>0,needs_assigned--)
|
||||
H = pick(candidates)
|
||||
if(gang_colors_pool.len)
|
||||
if(GLOB.gang_colors_pool.len)
|
||||
var/datum/gang/newgang = new()
|
||||
SSticker.mode.gangs += newgang
|
||||
H.mind.make_Gang(newgang)
|
||||
@@ -402,7 +402,7 @@
|
||||
var/mob/dead/observer/chosen_candidate = pick(candidates)
|
||||
|
||||
//Create the official
|
||||
var/mob/living/carbon/human/newmob = new (pick(emergencyresponseteamspawn))
|
||||
var/mob/living/carbon/human/newmob = new (pick(GLOB.emergencyresponseteamspawn))
|
||||
chosen_candidate.client.prefs.copy_to(newmob)
|
||||
newmob.real_name = newmob.dna.species.random_name(newmob.gender,1)
|
||||
newmob.dna.update_dna_identity()
|
||||
@@ -467,7 +467,7 @@
|
||||
if (alert == "Red")
|
||||
numagents = min(teamsize,candidates.len)
|
||||
redalert = 1
|
||||
var/list/spawnpoints = emergencyresponseteamspawn
|
||||
var/list/spawnpoints = GLOB.emergencyresponseteamspawn
|
||||
while(numagents && candidates.len)
|
||||
if (numagents > spawnpoints.len)
|
||||
numagents--
|
||||
@@ -480,7 +480,7 @@
|
||||
|
||||
//Spawn and equip the officer
|
||||
var/mob/living/carbon/human/ERTOperative = new(spawnloc)
|
||||
var/list/lastname = last_names
|
||||
var/list/lastname = GLOB.last_names
|
||||
chosen_candidate.client.prefs.copy_to(ERTOperative)
|
||||
var/ertname = pick(lastname)
|
||||
switch(numagents)
|
||||
@@ -511,7 +511,7 @@
|
||||
|
||||
//Open the Armory doors
|
||||
if(alert != "Blue")
|
||||
for(var/obj/machinery/door/poddoor/ert/door in airlocks)
|
||||
for(var/obj/machinery/door/poddoor/ert/door in GLOB.airlocks)
|
||||
spawn(0)
|
||||
door.open()
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
var/highlander = FALSE
|
||||
GLOBAL_VAR_INIT(highlander, FALSE)
|
||||
/client/proc/only_one() //Gives everyone kilts, berets, claymores, and pinpointers, with the objective to hijack the emergency shuttle.
|
||||
if(!SSticker || !SSticker.mode)
|
||||
alert("The game hasn't started yet!")
|
||||
return
|
||||
highlander = TRUE
|
||||
GLOB.highlander = TRUE
|
||||
|
||||
send_to_playing_players("<span class='boldannounce'><font size=6>THERE CAN BE ONLY ONE</font></span>")
|
||||
|
||||
for(var/obj/item/weapon/disk/nuclear/N in poi_list)
|
||||
for(var/obj/item/weapon/disk/nuclear/N in GLOB.poi_list)
|
||||
N.relocate() //Gets it out of bags and such
|
||||
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == DEAD || !(H.client))
|
||||
continue
|
||||
H.make_scottish()
|
||||
@@ -64,7 +64,7 @@ var/highlander = FALSE
|
||||
equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
var/obj/item/weapon/claymore/highlander/H1 = new(src)
|
||||
if(!highlander)
|
||||
if(!GLOB.highlander)
|
||||
H1.admin_spawned = TRUE //To prevent announcing
|
||||
put_in_hands(H1)
|
||||
H1.pickup(src) //For the stun shielding
|
||||
@@ -83,7 +83,7 @@ var/highlander = FALSE
|
||||
alert("The game hasn't started yet!")
|
||||
return
|
||||
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
if(H.stat == 2 || !(H.client)) continue
|
||||
if(is_special_character(H)) continue
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
log_admin("[key_name(usr)] has toggled the Panic Bunker, it is now [(config.panic_bunker?"on":"off")]")
|
||||
message_admins("[key_name_admin(usr)] has toggled the Panic Bunker, it is now [(config.panic_bunker?"enabled":"disabled")].")
|
||||
if (config.panic_bunker && (!dbcon || !dbcon.IsConnected()))
|
||||
if (config.panic_bunker && (!GLOB.dbcon || !GLOB.dbcon.IsConnected()))
|
||||
message_admins("The Database is not connected! Panic bunker will not work until the connection is reestablished.")
|
||||
feedback_add_details("admin_verb","PANIC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
|
||||
var/sound/admin_sound
|
||||
|
||||
/client/proc/play_sound(S as sound)
|
||||
set category = "Fun"
|
||||
set name = "Play Global Sound"
|
||||
@@ -24,7 +21,7 @@ var/sound/admin_sound
|
||||
admin_sound.repeat = 0
|
||||
admin_sound.status = SOUND_STREAM
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client.prefs.toggles & SOUND_MIDI)
|
||||
M << admin_sound
|
||||
|
||||
@@ -65,7 +62,7 @@ var/sound/admin_sound
|
||||
|
||||
log_admin("[key_name(src)] stopped all currently playing sounds.")
|
||||
message_admins("[key_name_admin(src)] stopped all currently playing sounds.")
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client)
|
||||
M << sound(null)
|
||||
feedback_add_details("admin_verb","SS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
usr.control_object = null
|
||||
feedback_add_details("admin_verb","RO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/proc/givetestverbs(mob/M in mob_list)
|
||||
/proc/givetestverbs(mob/M in GLOB.mob_list)
|
||||
set desc = "Give this guy possess/release verbs"
|
||||
set category = "Debug"
|
||||
set name = "Give Possessing Verbs"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set category = "IC"
|
||||
set name = "Pray"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
msg = "<span class='adminnotice'>\icon[cross]<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""]: </font>[ADMIN_FULLMONTY(src)] [ADMIN_SC(src)] [ADMIN_SMITE(src)]:</b> [msg]</span>"
|
||||
|
||||
for(var/client/C in admins)
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(C.prefs.chat_toggles & CHAT_PRAYER)
|
||||
to_chat(C, msg)
|
||||
if(C.prefs.toggles & SOUND_PRAYERS)
|
||||
@@ -49,20 +49,20 @@
|
||||
/proc/Centcomm_announce(text , mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
msg = "<span class='adminnotice'><b><font color=orange>CENTCOM:</font>[ADMIN_FULLMONTY(Sender)] [ADMIN_SMITE(Sender)] [ADMIN_CENTCOM_REPLY(Sender)]:</b> [msg]</span>"
|
||||
to_chat(admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
to_chat(GLOB.admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in GLOB.machines)
|
||||
C.overrideCooldown()
|
||||
|
||||
/proc/Syndicate_announce(text , mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
msg = "<span class='adminnotice'><b><font color=crimson>SYNDICATE:</font>[ADMIN_FULLMONTY(Sender)] [ADMIN_SMITE(Sender)] [ADMIN_SYNDICATE_REPLY(Sender)]:</b> [msg]</span>"
|
||||
to_chat(admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
to_chat(GLOB.admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in GLOB.machines)
|
||||
C.overrideCooldown()
|
||||
|
||||
/proc/Nuke_request(text , mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST:</font>[ADMIN_FULLMONTY(Sender)] [ADMIN_SMITE(Sender)] [ADMIN_CENTCOM_REPLY(Sender)] [ADMIN_SET_SD_CODE]:</b> [msg]</span>"
|
||||
to_chat(admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
to_chat(GLOB.admins, msg)
|
||||
for(var/obj/machinery/computer/communications/C in GLOB.machines)
|
||||
C.overrideCooldown()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/client/proc/cmd_admin_drop_everything(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_drop_everything(mob/M in GLOB.mob_list)
|
||||
set category = null
|
||||
set name = "Drop Everything"
|
||||
if(!holder)
|
||||
@@ -19,7 +19,7 @@
|
||||
feedback_add_details("admin_verb","DEVR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/cmd_admin_subtle_message(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_subtle_message(mob/M in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Subtle Message"
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
return
|
||||
|
||||
if(!M)
|
||||
M = input("Direct narrate to whom?", "Active Players") as null|anything in player_list
|
||||
M = input("Direct narrate to whom?", "Active Players") as null|anything in GLOB.player_list
|
||||
|
||||
if(!M)
|
||||
return
|
||||
@@ -107,7 +107,7 @@
|
||||
message_admins("<span class='adminnotice'><b> LocalNarrate: [key_name_admin(usr)] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[A.x];Y=[A.y];Z=[A.z]'>[get_area(A)]</a>):</b> [msg]<BR></span>")
|
||||
feedback_add_details("admin_verb","LN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_godmode(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Godmode"
|
||||
if(!holder)
|
||||
@@ -147,7 +147,7 @@
|
||||
if(istype(whom, /client))
|
||||
C = whom
|
||||
else if(istext(whom))
|
||||
C = directory[whom]
|
||||
C = GLOB.directory[whom]
|
||||
else
|
||||
return
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
if(C)
|
||||
P = C.prefs
|
||||
else
|
||||
P = preferences_datums[whom]
|
||||
P = GLOB.preferences_datums[whom]
|
||||
if(!P)
|
||||
return
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
/proc/create_xeno(ckey)
|
||||
if(!ckey)
|
||||
var/list/candidates = list()
|
||||
for(var/mob/M in player_list)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.stat != DEAD)
|
||||
continue //we are not dead!
|
||||
if(!(ROLE_ALIEN in M.client.prefs.be_special))
|
||||
@@ -212,7 +212,7 @@
|
||||
return 0
|
||||
|
||||
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 = xeno_spawn.len ? pick(xeno_spawn) : pick(latejoin)
|
||||
var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : pick(GLOB.latejoin)
|
||||
var/mob/living/carbon/alien/new_xeno
|
||||
switch(alien_caste)
|
||||
if("Queen")
|
||||
@@ -251,7 +251,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
|
||||
var/mob/dead/observer/G_found
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
if(G.ckey == input)
|
||||
G_found = G
|
||||
break
|
||||
@@ -265,10 +265,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(G_found.mind.assigned_role=="Alien")
|
||||
if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
||||
var/turf/T
|
||||
if(xeno_spawn.len)
|
||||
T = pick(xeno_spawn)
|
||||
if(GLOB.xeno_spawn.len)
|
||||
T = pick(GLOB.xeno_spawn)
|
||||
else
|
||||
T = pick(latejoin)
|
||||
T = pick(GLOB.latejoin)
|
||||
|
||||
var/mob/living/carbon/alien/new_xeno
|
||||
switch(G_found.mind.special_role)//If they have a mind, we can determine which caste they were.
|
||||
@@ -296,7 +296,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
//check if they were a monkey
|
||||
else if(findtext(G_found.real_name,"monkey"))
|
||||
if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
||||
var/mob/living/carbon/monkey/new_monkey = new(pick(latejoin))
|
||||
var/mob/living/carbon/monkey/new_monkey = new(pick(GLOB.latejoin))
|
||||
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
||||
new_monkey.key = G_found.key
|
||||
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.")
|
||||
@@ -305,15 +305,15 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
|
||||
//Ok, it's not a xeno or a monkey. So, spawn a human.
|
||||
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
|
||||
var/mob/living/carbon/human/new_character = new(pick(GLOB.latejoin))//The mob being spawned.
|
||||
|
||||
var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character.
|
||||
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
|
||||
/*Try and locate a record for the person being respawned through data_core.
|
||||
/*Try and locate a record for the person being respawned through GLOB.data_core.
|
||||
This isn't an exact science but it does the trick more often than not.*/
|
||||
var/id = md5("[G_found.real_name][G_found.mind.assigned_role]")
|
||||
|
||||
record_found = find_record("id", id, data_core.locked)
|
||||
record_found = find_record("id", id, GLOB.data_core.locked)
|
||||
|
||||
if(record_found)//If they have a record we can determine a few things.
|
||||
new_character.real_name = record_found.fields["name"]
|
||||
@@ -354,7 +354,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)
|
||||
SSticker.mode.equip_traitor(new_character)
|
||||
if("Wizard")
|
||||
new_character.loc = pick(wizardstart)
|
||||
new_character.loc = pick(GLOB.wizardstart)
|
||||
//SSticker.mode.learn_basic_spells(new_character)
|
||||
SSticker.mode.equip_wizard(new_character)
|
||||
if("Syndicate")
|
||||
@@ -364,7 +364,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
call(/datum/game_mode/proc/equip_syndicate)(new_character)
|
||||
if("Space Ninja")
|
||||
var/list/ninja_spawn = list()
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
if(L.name=="carpspawn")
|
||||
ninja_spawn += L
|
||||
new_character.equip_space_ninja()
|
||||
@@ -392,7 +392,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!record_found&&new_character.mind.assigned_role!=new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
|
||||
//Power to the user!
|
||||
if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
|
||||
data_core.manifest_inject(new_character)
|
||||
GLOB.data_core.manifest_inject(new_character)
|
||||
|
||||
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
|
||||
AnnounceArrival(new_character, new_character.mind.assigned_role)
|
||||
@@ -426,7 +426,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_admin_rejuvenate(mob/living/M in mob_list)
|
||||
/client/proc/cmd_admin_rejuvenate(mob/living/M in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Rejuvenate"
|
||||
if(!holder)
|
||||
@@ -565,7 +565,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
else
|
||||
return
|
||||
|
||||
/client/proc/cmd_admin_gib(mob/M in mob_list)
|
||||
/client/proc/cmd_admin_gib(mob/M in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Gib"
|
||||
|
||||
@@ -603,7 +603,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
feedback_add_details("admin_verb","GIBS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
mob.gib(1, 1, 1)
|
||||
|
||||
/client/proc/cmd_admin_check_contents(mob/living/M in mob_list)
|
||||
/client/proc/cmd_admin_check_contents(mob/living/M in GLOB.mob_list)
|
||||
set category = "Special Verbs"
|
||||
set name = "Check Contents"
|
||||
|
||||
@@ -731,7 +731,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("[key_name_admin(usr)] changed the security level to [level]")
|
||||
feedback_add_details("admin_verb","CSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in nuke_list)
|
||||
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in GLOB.nuke_list)
|
||||
set name = "Toggle Nuke"
|
||||
set category = "Fun"
|
||||
set popup_menu = 0
|
||||
@@ -750,7 +750,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_COORDJMP(N)].")
|
||||
feedback_add_details("admin_verb","TN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
|
||||
/client/proc/create_outfits()
|
||||
set category = "Debug"
|
||||
@@ -935,7 +935,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
|
||||
var/adding_hud = !has_antag_hud()
|
||||
|
||||
for(var/datum/atom_hud/H in huds)
|
||||
for(var/datum/atom_hud/H in GLOB.huds)
|
||||
if(istype(H, /datum/atom_hud/antag))
|
||||
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
|
||||
|
||||
@@ -949,7 +949,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
feedback_add_details("admin_verb","TAH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/has_antag_hud()
|
||||
var/datum/atom_hud/A = huds[ANTAG_HUD_TRAITOR]
|
||||
var/datum/atom_hud/A = GLOB.huds[ANTAG_HUD_TRAITOR]
|
||||
return mob in A.hudusers
|
||||
|
||||
/client/proc/open_shuttle_manipulator()
|
||||
@@ -957,7 +957,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
set name = "Shuttle Manipulator"
|
||||
set desc = "Opens the shuttle manipulator UI."
|
||||
|
||||
for(var/obj/machinery/shuttle_manipulator/M in machines)
|
||||
for(var/obj/machinery/shuttle_manipulator/M in GLOB.machines)
|
||||
M.ui_interact(usr)
|
||||
|
||||
/client/proc/mass_zombie_infection()
|
||||
@@ -973,7 +973,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
new /obj/item/organ/zombie_infection(H)
|
||||
|
||||
message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.")
|
||||
@@ -991,7 +991,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
for(var/obj/item/organ/zombie_infection/I in zombie_infection_list)
|
||||
for(var/obj/item/organ/zombie_infection/I in GLOB.zombie_infection_list)
|
||||
qdel(I)
|
||||
|
||||
message_admins("[key_name_admin(usr)] cured all zombies.")
|
||||
@@ -1010,7 +1010,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
var/list/mobs = shuffle(living_mob_list.Copy()) // might change while iterating
|
||||
var/list/mobs = shuffle(GLOB.living_mob_list.Copy()) // might change while iterating
|
||||
var/who_did_it = key_name_admin(usr)
|
||||
|
||||
message_admins("[key_name_admin(usr)] started polymorphed all living mobs.")
|
||||
@@ -1061,13 +1061,13 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
#define ON_PURRBATION(H) (!(H.dna.features["tail_human"] == "None" && H.dna.features["ears"] == "None"))
|
||||
|
||||
/proc/mass_purrbation()
|
||||
for(var/M in mob_list)
|
||||
for(var/M in GLOB.mob_list)
|
||||
if(ishumanbasic(M))
|
||||
purrbation_apply(M)
|
||||
CHECK_TICK
|
||||
|
||||
/proc/mass_remove_purrbation()
|
||||
for(var/M in mob_list)
|
||||
for(var/M in GLOB.mob_list)
|
||||
if(ishumanbasic(M))
|
||||
purrbation_remove(M)
|
||||
CHECK_TICK
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
to_chat(usr, "<span class='adminnotice'>The Database is not enabled!</span>")
|
||||
return
|
||||
|
||||
if (dbcon && dbcon.IsConnected())
|
||||
if (GLOB.dbcon && GLOB.dbcon.IsConnected())
|
||||
if (!check_rights(R_DEBUG,0))
|
||||
alert("The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
|
||||
return
|
||||
@@ -14,7 +14,7 @@
|
||||
if (reconnect != "Force Reconnect")
|
||||
return
|
||||
|
||||
dbcon.Disconnect()
|
||||
GLOB.dbcon.Disconnect()
|
||||
log_admin("[key_name(usr)] has forced the database to disconnect")
|
||||
message_admins("[key_name_admin(usr)] has <b>forced</b> the database to disconnect!")
|
||||
feedback_add_details("admin_verb","FRDB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -23,8 +23,8 @@
|
||||
message_admins("[key_name_admin(usr)] is attempting to re-established the DB Connection")
|
||||
feedback_add_details("admin_verb","RDB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
dbcon.failed_connections = 0
|
||||
if(!dbcon.Connect())
|
||||
message_admins("Database connection failed: " + dbcon.ErrorMsg())
|
||||
GLOB.dbcon.failed_connections = 0
|
||||
if(!GLOB.dbcon.Connect())
|
||||
message_admins("Database connection failed: " + GLOB.dbcon.ErrorMsg())
|
||||
else
|
||||
message_admins("Database connection re-established")
|
||||
@@ -1,22 +1,23 @@
|
||||
#define WHITELISTFILE "config/whitelist.txt"
|
||||
|
||||
var/list/whitelist
|
||||
GLOBAL_LIST(whitelist)
|
||||
GLOBAL_PROTECT(whitelist)
|
||||
|
||||
/proc/load_whitelist()
|
||||
whitelist = list()
|
||||
GLOB.whitelist = list()
|
||||
for(var/line in file2list(WHITELISTFILE))
|
||||
if(!line)
|
||||
continue
|
||||
if(findtextEx(line,"#",1,2))
|
||||
continue
|
||||
whitelist += line
|
||||
GLOB.whitelist += line
|
||||
|
||||
if(!whitelist.len)
|
||||
whitelist = null
|
||||
if(!GLOB.whitelist.len)
|
||||
GLOB.whitelist = null
|
||||
|
||||
/proc/check_whitelist(var/ckey)
|
||||
if(!whitelist)
|
||||
if(!GLOB.whitelist)
|
||||
return FALSE
|
||||
. = (ckey in whitelist)
|
||||
. = (ckey in GLOB.whitelist)
|
||||
|
||||
#undef WHITELISTFILE
|
||||
|
||||
Reference in New Issue
Block a user