mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Merge branch 'byond510'
Conflicts: .travis.yml code/game/jobs/access.dm code/game/machinery/camera/camera.dm code/game/machinery/flasher.dm code/game/machinery/vending.dm code/game/objects/items/devices/laserpointer.dm code/game/objects/items/weapons/grenades/flashbang.dm code/game/objects/items/weapons/tools.dm code/modules/mob/living/carbon/human/human.dm code/modules/mob/living/carbon/human/species/species.dm code/modules/mob/living/life.dm code/modules/mob/living/silicon/silicon.dm code/modules/mob/living/simple_animal/bees.dm code/modules/nano/modules/virus2_creator.dm code/modules/virus2/disease2.dm code/modules/virus2/diseasesplicer.dm paradise.dme
This commit is contained in:
@@ -58,9 +58,9 @@ var/global/nologevent = 0
|
||||
body += "<b>Mob type:</b> [M.type]<br>"
|
||||
if(M.client)
|
||||
if(M.client.related_accounts_cid.len)
|
||||
body += "<b>Related accounts by CID:</b> [list2text(M.client.related_accounts_cid, " - ")]<br>"
|
||||
body += "<b>Related accounts by CID:</b> [jointext(M.client.related_accounts_cid, " - ")]<br>"
|
||||
if(M.client.related_accounts_ip.len)
|
||||
body += "<b>Related accounts by IP:</b> [list2text(M.client.related_accounts_ip, " - ")]<br><br>"
|
||||
body += "<b>Related accounts by IP:</b> [jointext(M.client.related_accounts_ip, " - ")]<br><br>"
|
||||
|
||||
body += "<A href='?_src_=holder;boot2=\ref[M]'>Kick</A> | "
|
||||
body += "<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> | "
|
||||
|
||||
@@ -14,7 +14,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
if(!length(line)) continue
|
||||
if(copytext(line,1,2) == "#") continue
|
||||
|
||||
var/list/List = text2list(line,"+")
|
||||
var/list/List = splittext(line,"+")
|
||||
if(!List.len) continue
|
||||
|
||||
var/rank = ckeyEx(List[1])
|
||||
@@ -78,7 +78,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
if(copytext(line,1,2) == "#") continue
|
||||
|
||||
//Split the line at every "-"
|
||||
var/list/List = text2list(line, "-")
|
||||
var/list/List = splittext(line, "-")
|
||||
if(!List.len) continue
|
||||
|
||||
//ckey is before the first "-"
|
||||
|
||||
@@ -677,7 +677,7 @@ var/list/admin_verbs_proccall = list (
|
||||
//load text from file
|
||||
var/list/Lines = file2list("config/admins.txt")
|
||||
for(var/line in Lines)
|
||||
var/list/splitline = text2list(line, " - ")
|
||||
var/list/splitline = splittext(line, " - ")
|
||||
if(n_lower(splitline[1]) == ckey)
|
||||
if(splitline.len >= 2)
|
||||
rank = ckeyEx(splitline[2])
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/admins/proc/create_mob(var/mob/user)
|
||||
if (!create_mob_html)
|
||||
var/mobjs = null
|
||||
mobjs = list2text(typesof(/mob), ";")
|
||||
mobjs = jointext(typesof(/mob), ";")
|
||||
create_mob_html = file2text('html/create_object.html')
|
||||
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/e
|
||||
/datum/admins/proc/create_object(var/mob/user)
|
||||
if (!create_object_html)
|
||||
var/objectjs = null
|
||||
objectjs = list2text(typesof(/obj), ";")
|
||||
objectjs = jointext(typesof(/obj), ";")
|
||||
create_object_html = file2text('html/create_object.html')
|
||||
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
|
||||
|
||||
@@ -15,7 +15,7 @@ var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/e
|
||||
var/html_form = create_object_forms[path]
|
||||
|
||||
if (!html_form)
|
||||
var/objectjs = list2text(typesof(path), ";")
|
||||
var/objectjs = jointext(typesof(path), ";")
|
||||
html_form = file2text('html/create_object.html')
|
||||
html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"")
|
||||
create_object_forms[path] = html_form
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/admins/proc/create_turf(var/mob/user)
|
||||
if (!create_turf_html)
|
||||
var/turfjs = null
|
||||
turfjs = list2text(typesof(/turf), ";")
|
||||
turfjs = jointext(typesof(/turf), ";")
|
||||
create_turf_html = file2text('html/create_object.html')
|
||||
create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
|
||||
|
||||
|
||||
@@ -177,73 +177,7 @@
|
||||
output += "<center><a href='?_src_=holder;addnoteempty=1'>\[Add Note\]</a></center>"
|
||||
output += ruler
|
||||
usr << browse(output, "window=show_notes;size=900x500")
|
||||
|
||||
/proc/regex_note_sql_extract(str, exp)
|
||||
return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regEx_find")(str, exp))
|
||||
|
||||
// If the AUTOCONVERT_NOTES is turned on, any time a player connects this will be run to try and add all their notes to the database
|
||||
/proc/convert_notes_sql(ckey)
|
||||
if(!ckey)
|
||||
return 0
|
||||
|
||||
var/playerfile = "data/player_saves/[copytext(ckey, 1, 2)]/[ckey]/info.sav"
|
||||
var/savefile/info = new(playerfile)
|
||||
var/list/infos
|
||||
info >> infos
|
||||
if(!infos || !infos.len)
|
||||
fdel(playerfile)
|
||||
return 0
|
||||
|
||||
ckey = ckey
|
||||
for(var/datum/player_info/I in infos)
|
||||
var/notetext = I.content
|
||||
var/adminckey = I.author
|
||||
var/server
|
||||
if (config && config.server_name)
|
||||
server = config.server_name
|
||||
|
||||
var/timestamp = I.timestamp
|
||||
var/regex = "\[A-Za-z\]+\\, (\[A-Za-z\]+) (\[0-9\]+)\[A-Za-z\]+ of (\[0-9\]+)"
|
||||
var/datum/regex/results = regex_note_sql_extract(timestamp, regex)
|
||||
var/month = month2number(results.str(2))
|
||||
var/day = results.str(3)
|
||||
var/year = results.str(4)
|
||||
timestamp = "[year]-[month]-[day] 00:00:00"
|
||||
|
||||
add_note(ckey, notetext, timestamp, adminckey, 0, server, 0)
|
||||
|
||||
fdel(playerfile)
|
||||
return 1
|
||||
|
||||
// Using this proc causes lag - you have been warned.
|
||||
/proc/mass_convert_notes()
|
||||
if(!check_rights(R_SERVER))
|
||||
return 0
|
||||
world << "Beginning mass note conversion."
|
||||
|
||||
var/player_notes_file = "data/player_notes.sav"
|
||||
var/savefile/notesfile = new(player_notes_file)
|
||||
var/list/note_keys
|
||||
notesfile >> note_keys
|
||||
|
||||
if(!notesfile)
|
||||
log_game("Error: Cannot access player_notes.sav file.")
|
||||
return 0
|
||||
if(!note_keys || !note_keys.len)
|
||||
log_game("Error: player_notes.sav file is empty. Deleting it.")
|
||||
fdel(player_notes_file)
|
||||
return 0
|
||||
|
||||
note_keys = sortList(note_keys)
|
||||
var/i = 1
|
||||
for(i, i <= note_keys.len, i++)
|
||||
var/ckey = note_keys[i]
|
||||
convert_notes_sql(ckey)
|
||||
world << "Finished mass note conversion ([i] notes converted). Remember to turn off AUTOCONVERT_NOTES."
|
||||
world << "Deleting the player_notes.sav file."
|
||||
fdel(player_notes_file)
|
||||
return 1
|
||||
|
||||
/proc/show_player_info_irc(var/key as text)
|
||||
var/target_sql_ckey = sanitizeSQL(key)
|
||||
var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT timestamp, notetext, adminckey, server FROM [format_table_name("notes")] WHERE ckey = '[target_sql_ckey]' ORDER BY timestamp")
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
log_admin("[key_name(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]</span>")
|
||||
|
||||
|
||||
spawn(10)
|
||||
stickyban_show()
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
/datum/admins/proc/stickyban_show()
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
|
||||
var/list/bans = sortList(world.GetConfig("ban"))
|
||||
var/banhtml = ""
|
||||
for(var/key in bans)
|
||||
@@ -181,23 +181,23 @@
|
||||
if (!ban)
|
||||
return null
|
||||
. = params2list(ban)
|
||||
.["keys"] = text2list(.["keys"], ",")
|
||||
.["type"] = text2list(.["type"], ",")
|
||||
.["IP"] = text2list(.["IP"], ",")
|
||||
.["computer_id"] = text2list(.["computer_id"], ",")
|
||||
.["keys"] = splittext(.["keys"], ",")
|
||||
.["type"] = splittext(.["type"], ",")
|
||||
.["IP"] = splittext(.["IP"], ",")
|
||||
.["computer_id"] = splittext(.["computer_id"], ",")
|
||||
|
||||
/proc/list2stickyban(var/list/ban)
|
||||
if (!ban || !islist(ban))
|
||||
return null
|
||||
. = ban.Copy()
|
||||
if (.["keys"])
|
||||
.["keys"] = list2text(.["keys"], ",")
|
||||
.["keys"] = jointext(.["keys"], ",")
|
||||
if (.["type"])
|
||||
.["type"] = list2text(.["type"], ",")
|
||||
.["type"] = jointext(.["type"], ",")
|
||||
if (.["IP"])
|
||||
.["IP"] = list2text(.["IP"], ",")
|
||||
.["IP"] = jointext(.["IP"], ",")
|
||||
if (.["computer_id"])
|
||||
.["computer_id"] = list2text(.["computer_id"], ",")
|
||||
.["computer_id"] = jointext(.["computer_id"], ",")
|
||||
. = list2params(.)
|
||||
|
||||
/client/proc/stickybanpanel()
|
||||
@@ -206,6 +206,5 @@
|
||||
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
|
||||
holder.stickyban_show()
|
||||
|
||||
@@ -1019,7 +1019,7 @@
|
||||
message_admins("\blue [key_name_admin(usr)] removed [t]", 1)
|
||||
jobban_remove(t)
|
||||
href_list["ban"] = 1 // lets it fall through and refresh
|
||||
var/t_split = text2list(t, " - ")
|
||||
var/t_split = splittext(t, " - ")
|
||||
var/key = t_split[1]
|
||||
var/job = t_split[2]
|
||||
DB_ban_unban(ckey(key), BANTYPE_JOB_PERMA, job)
|
||||
@@ -2076,7 +2076,7 @@
|
||||
alert("Select fewer object types, (max 5)")
|
||||
return
|
||||
|
||||
var/list/offset = text2list(href_list["offset"],",")
|
||||
var/list/offset = splittext(href_list["offset"],",")
|
||||
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
|
||||
var/X = offset.len > 0 ? text2num(offset[1]) : 0
|
||||
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
|
||||
|
||||
@@ -32,7 +32,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
var/original_msg = msg
|
||||
|
||||
//explode the input msg into a list
|
||||
var/list/msglist = text2list(msg, " ")
|
||||
var/list/msglist = splittext(msg, " ")
|
||||
|
||||
//generate keywords lookup
|
||||
var/list/surnames = list()
|
||||
@@ -43,7 +43,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if(M.mind) indexing += M.mind.name
|
||||
|
||||
for(var/string in indexing)
|
||||
var/list/L = text2list(string, " ")
|
||||
var/list/L = splittext(string, " ")
|
||||
var/surname_found = 0
|
||||
//surnames
|
||||
for(var/i=L.len, i>=1, i--)
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
dat += "<p>[C.ckey] (Player Age: <font color = 'red'>[C.player_age]</font>) - <b>[C.computer_id]</b> / <b>[C.address]</b><br>"
|
||||
if(C.related_accounts_cid.len)
|
||||
dat += "--Accounts associated with CID: "
|
||||
dat += "<b>[list2text(C.related_accounts_cid, " - ")]</b><br>"
|
||||
dat += "<b>[jointext(C.related_accounts_cid, " - ")]</b><br>"
|
||||
if(C.related_accounts_ip.len)
|
||||
dat += "--Accounts associated with IP: "
|
||||
dat += "<b>[list2text(C.related_accounts_ip, " - ")]</b> "
|
||||
dat += "<b>[jointext(C.related_accounts_ip, " - ")]</b> "
|
||||
usr << browse(dat, "window=alt_panel;size=640x480")
|
||||
return
|
||||
|
||||
|
||||
@@ -1166,21 +1166,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Silicons","Clients","Respawnable Mobs"))
|
||||
if("Players")
|
||||
usr << list2text(player_list,",")
|
||||
usr << jointext(player_list,",")
|
||||
if("Admins")
|
||||
usr << list2text(admins,",")
|
||||
usr << jointext(admins,",")
|
||||
if("Mobs")
|
||||
usr << list2text(mob_list,",")
|
||||
usr << jointext(mob_list,",")
|
||||
if("Living Mobs")
|
||||
usr << list2text(living_mob_list,",")
|
||||
usr << jointext(living_mob_list,",")
|
||||
if("Dead Mobs")
|
||||
usr << list2text(dead_mob_list,",")
|
||||
usr << jointext(dead_mob_list,",")
|
||||
if("Silicons")
|
||||
usr << list2text(silicon_mob_list,",")
|
||||
usr << jointext(silicon_mob_list,",")
|
||||
if("Clients")
|
||||
usr << list2text(clients,",")
|
||||
usr << jointext(clients,",")
|
||||
if("Respawnable Mobs")
|
||||
usr << list2text(respawnable_list,",")
|
||||
usr << jointext(respawnable_list,",")
|
||||
|
||||
|
||||
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
|
||||
|
||||
Reference in New Issue
Block a user