Merge branch 'master' into upstream-merge-29690
This commit is contained in:
@@ -83,10 +83,10 @@
|
||||
var/a_computerid
|
||||
var/a_ip
|
||||
|
||||
if(src.owner && istype(src.owner, /client))
|
||||
a_ckey = src.owner:ckey
|
||||
a_computerid = src.owner:computer_id
|
||||
a_ip = src.owner:address
|
||||
if(istype(owner))
|
||||
a_ckey = owner.ckey
|
||||
a_computerid = owner.computer_id
|
||||
a_ip = owner.address
|
||||
|
||||
if(blockselfban)
|
||||
if(a_ckey == ckey)
|
||||
@@ -309,12 +309,12 @@
|
||||
to_chat(usr, "<span class='danger'>Database update failed due to multiple bans having the same ID. Contact the database admin.</span>")
|
||||
return
|
||||
|
||||
if(!src.owner || !istype(src.owner, /client))
|
||||
if(!istype(owner))
|
||||
return
|
||||
|
||||
var/unban_ckey = src.owner:ckey
|
||||
var/unban_computerid = src.owner:computer_id
|
||||
var/unban_ip = src.owner:address
|
||||
var/unban_ckey = owner.ckey
|
||||
var/unban_computerid = owner.computer_id
|
||||
var/unban_ip = 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/datum/DBQuery/query_unban = SSdbcore.NewQuery(sql_update)
|
||||
|
||||
@@ -109,14 +109,14 @@ GLOBAL_PROTECT(Banlist)
|
||||
else
|
||||
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
|
||||
WRITE_FILE(GLOB.Banlist["key"], ckey)
|
||||
WRITE_FILE(GLOB.Banlist["id"], computerid)
|
||||
WRITE_FILE(GLOB.Banlist["ip"], address)
|
||||
WRITE_FILE(GLOB.Banlist["reason"], reason)
|
||||
WRITE_FILE(GLOB.Banlist["bannedby"], bannedby)
|
||||
WRITE_FILE(GLOB.Banlist["temp"], temp)
|
||||
if (temp)
|
||||
GLOB.Banlist["minutes"] << bantimestamp
|
||||
WRITE_FILE(GLOB.Banlist["minutes"], bantimestamp)
|
||||
if(!temp)
|
||||
create_message("note", ckey, bannedby, "Permanently banned - [reason]", null, null, 0, 0)
|
||||
else
|
||||
@@ -211,17 +211,17 @@ GLOBAL_PROTECT(Banlist)
|
||||
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]"
|
||||
WRITE_FILE(GLOB.Banlist["key"], "trash[i]")
|
||||
else
|
||||
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"
|
||||
WRITE_FILE(GLOB.Banlist["key"], last)
|
||||
WRITE_FILE(GLOB.Banlist["id"], "trashid[i]")
|
||||
WRITE_FILE(GLOB.Banlist["reason"], "Trashban[i].")
|
||||
WRITE_FILE(GLOB.Banlist["temp"], a)
|
||||
WRITE_FILE(GLOB.Banlist["minutes"], GLOB.CMinutes + rand(1,2000))
|
||||
WRITE_FILE(GLOB.Banlist["bannedby"], "trashmin")
|
||||
last = "trash[i]"
|
||||
|
||||
GLOB.Banlist.cd = "/base"
|
||||
|
||||
@@ -595,7 +595,7 @@
|
||||
log_admin("[key_name(usr)] delayed the round start.")
|
||||
else
|
||||
to_chat(world, "<b>The game will start in [newtime] seconds.</b>")
|
||||
world << 'sound/ai/attention.ogg'
|
||||
SEND_SOUND(world, sound('sound/ai/attention.ogg'))
|
||||
log_admin("[key_name(usr)] set the pre-game delay to [newtime] seconds.")
|
||||
SSblackbox.add_details("admin_verb","Delay Game Start") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
||||
|
||||
|
||||
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY) )
|
||||
/client/proc/investigate_show(subject in list("hrefs","notes, memos, watchlist", INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS) )
|
||||
set name = "Investigate"
|
||||
set category = "Admin"
|
||||
if(!holder)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
garbage
|
||||
@@ -142,7 +142,7 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
else
|
||||
if(!SSdbcore.Connect())
|
||||
log_world("Failed to connect to database in load_admin_ranks(). Reverting to legacy system.")
|
||||
GLOB.world_game_log << "Failed to connect to database in load_admin_ranks(). Reverting to legacy system."
|
||||
WRITE_FILE(GLOB.world_game_log, "Failed to connect to database in load_admin_ranks(). Reverting to legacy system.")
|
||||
config.admin_legacy_system = 1
|
||||
load_admin_ranks()
|
||||
return
|
||||
@@ -220,7 +220,7 @@ GLOBAL_PROTECT(admin_ranks)
|
||||
else
|
||||
if(!SSdbcore.Connect())
|
||||
log_world("Failed to connect to database in load_admins(). Reverting to legacy system.")
|
||||
GLOB.world_game_log << "Failed to connect to database in load_admins(). Reverting to legacy system."
|
||||
WRITE_FILE(GLOB.world_game_log, "Failed to connect to database in load_admins(). Reverting to legacy system.")
|
||||
config.admin_legacy_system = 1
|
||||
load_admins()
|
||||
return
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
SSblackbox.add_details("admin_secrets_fun_used","Chinese Cartoons")
|
||||
message_admins("[key_name_admin(usr)] made everything kawaii.")
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
H << sound('sound/ai/animes.ogg')
|
||||
SEND_SOUND(H, sound('sound/ai/animes.ogg'))
|
||||
|
||||
if(H.dna.species.id == "human")
|
||||
if(H.dna.features["tail_human"] == "None" || H.dna.features["ears"] == "None")
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
log_admin("[key_name(usr)] tried to use the admin panel without authorization.")
|
||||
return
|
||||
if(href_list["ahelp"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
if(!check_rights(R_ADMIN, TRUE))
|
||||
return
|
||||
|
||||
var/ahelp_ref = href_list["ahelp"]
|
||||
@@ -506,10 +506,10 @@
|
||||
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>")
|
||||
GLOB.Banlist.cd = "/base/[banfolder]"
|
||||
GLOB.Banlist["reason"] << reason
|
||||
GLOB.Banlist["temp"] << temp
|
||||
GLOB.Banlist["minutes"] << minutes
|
||||
GLOB.Banlist["bannedby"] << usr.ckey
|
||||
WRITE_FILE(GLOB.Banlist["reason"], reason)
|
||||
WRITE_FILE(GLOB.Banlist["temp"], temp)
|
||||
WRITE_FILE(GLOB.Banlist["minutes"], minutes)
|
||||
WRITE_FILE(GLOB.Banlist["bannedby"], usr.ckey)
|
||||
GLOB.Banlist.cd = "/base"
|
||||
SSblackbox.inc("ban_edit",1)
|
||||
unbanpanel()
|
||||
@@ -1697,7 +1697,7 @@
|
||||
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)].")
|
||||
SSblackbox.inc("admin_cookies_spawned",1)
|
||||
to_chat(H, "<span class='adminnotice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>")
|
||||
H << 'sound/effects/pray_chaplain.ogg'
|
||||
SEND_SOUND(H, sound('sound/effects/pray_chaplain.ogg'))
|
||||
|
||||
else if(href_list["adminsmite"])
|
||||
if(!check_rights(R_ADMIN|R_FUN))
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
if(text)
|
||||
var/F = file("broken_icons.txt")
|
||||
fdel(F)
|
||||
F << text
|
||||
WRITE_FILE(F, text)
|
||||
to_chat(world, "Completely successfully and written to [F]")
|
||||
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
//send this msg to all admins
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(X.prefs.toggles & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
SEND_SOUND(X, sound('sound/effects/adminhelp.ogg'))
|
||||
window_flash(X, ignorepref = TRUE)
|
||||
to_chat(X, admin_msg)
|
||||
|
||||
@@ -347,7 +347,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
if(initiator)
|
||||
initiator.giveadminhelpverb()
|
||||
|
||||
initiator << 'sound/effects/adminhelp.ogg'
|
||||
SEND_SOUND(initiator, sound('sound/effects/adminhelp.ogg'))
|
||||
|
||||
to_chat(initiator, "<font color='red' size='4'><b>- AdminHelp Rejected! -</b></font>")
|
||||
to_chat(initiator, "<font color='red'><b>Your admin help was rejected.</b> The adminhelp verb has been returned to you so that you may try again.</font>")
|
||||
|
||||
@@ -84,11 +84,11 @@
|
||||
var/list/keys = 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)
|
||||
var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
|
||||
if(!selection)
|
||||
to_chat(src, "No keys found.")
|
||||
return
|
||||
var/mob/M = selection:mob
|
||||
var/mob/M = selection.mob
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]")
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
//play the recieving admin the adminhelp sound (if they have them enabled)
|
||||
if(recipient.prefs.toggles & SOUND_ADMINHELP)
|
||||
recipient << 'sound/effects/adminhelp.ogg'
|
||||
SEND_SOUND(recipient, sound('sound/effects/adminhelp.ogg'))
|
||||
|
||||
else
|
||||
if(holder) //sender is an admin but recipient is not. Do BIG RED TEXT
|
||||
@@ -182,7 +182,7 @@
|
||||
admin_ticket_log(recipient, "<font color='blue'>PM From [key_name_admin(src)]: [keywordparsedmsg]</font>")
|
||||
|
||||
//always play non-admin recipients the adminhelp sound
|
||||
recipient << 'sound/effects/adminhelp.ogg'
|
||||
SEND_SOUND(recipient, sound('sound/effects/adminhelp.ogg'))
|
||||
|
||||
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
|
||||
if(config.popup_admin_pm)
|
||||
@@ -301,7 +301,7 @@
|
||||
|
||||
window_flash(C, ignorepref = TRUE)
|
||||
//always play non-admin recipients the adminhelp sound
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
SEND_SOUND(C, 'sound/effects/adminhelp.ogg')
|
||||
|
||||
C.ircreplyamount = IRCREPLYCOUNT
|
||||
|
||||
|
||||
@@ -316,10 +316,8 @@ GLOBAL_PROTECT(AdminProcCallCount)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has alienized [M.key].")
|
||||
spawn(0)
|
||||
M:Alienize()
|
||||
SSblackbox.add_details("admin_verb","Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/Alienize)
|
||||
SSblackbox.add_details("admin_verb","Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [key_name(M)] into an alien.</span>")
|
||||
else
|
||||
@@ -333,10 +331,8 @@ GLOBAL_PROTECT(AdminProcCallCount)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] has slimeized [M.key].")
|
||||
spawn(0)
|
||||
M:slimeize()
|
||||
SSblackbox.add_details("admin_verb","Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
INVOKE_ASYNC(M, /mob/living/carbon/human/proc/slimeize)
|
||||
SSblackbox.add_details("admin_verb","Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] made [key_name(M)] into a slime.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made [key_name(M)] into a slime.</span>")
|
||||
else
|
||||
@@ -461,12 +457,14 @@ GLOBAL_PROTECT(AdminProcCallCount)
|
||||
|
||||
if(worn)
|
||||
if(istype(worn, /obj/item/device/pda))
|
||||
worn:id = id
|
||||
id.loc = worn
|
||||
var/obj/item/device/pda/PDA = worn
|
||||
PDA.id = id
|
||||
id.forceMove(PDA)
|
||||
else if(istype(worn, /obj/item/weapon/storage/wallet))
|
||||
worn:front_id = id
|
||||
id.loc = worn
|
||||
worn.update_icon()
|
||||
var/obj/item/weapon/storage/wallet/W = worn
|
||||
W.front_id = id
|
||||
id.forceMove(W)
|
||||
W.update_icon()
|
||||
else
|
||||
H.equip_to_slot(id,slot_wear_id)
|
||||
|
||||
|
||||
@@ -78,8 +78,9 @@
|
||||
continue
|
||||
output += " [filters[filter]]: [f.len]<br>"
|
||||
for (var/device in f)
|
||||
if (isobj(device))
|
||||
output += " [device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])<br>"
|
||||
if (istype(device, /atom))
|
||||
var/atom/A = device
|
||||
output += " [device] ([A.x],[A.y],[A.z] in area [get_area(device)])<br>"
|
||||
else
|
||||
output += " [device]<br>"
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client.prefs.toggles & SOUND_MIDI)
|
||||
M << admin_sound
|
||||
SEND_SOUND(M, admin_sound)
|
||||
|
||||
SSblackbox.add_details("admin_verb","Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -68,5 +68,5 @@
|
||||
message_admins("[key_name_admin(src)] stopped all currently playing sounds.")
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client)
|
||||
M << sound(null)
|
||||
SEND_SOUND(M, sound(null))
|
||||
SSblackbox.add_details("admin_verb","Stop All Playing Sounds") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
to_chat(C, msg)
|
||||
if(C.prefs.toggles & SOUND_PRAYERS)
|
||||
if(usr.job == "Chaplain")
|
||||
C << 'sound/effects/pray.ogg'
|
||||
SEND_SOUND(C, sound('sound/effects/pray.ogg'))
|
||||
to_chat(usr, "Your prayers have been received by the gods.")
|
||||
|
||||
SSblackbox.add_details("admin_verb","Prayer") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
Reference in New Issue
Block a user