mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge pull request #1766 from Markolie/adminbus
Admin jump overhaul, add watchlist functionality, other admin updates
This commit is contained in:
@@ -48,7 +48,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
computerid = bancid
|
||||
ip = banip
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_player WHERE ckey = '[ckey]'")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
|
||||
query.Execute()
|
||||
var/validckey = 0
|
||||
if(query.NextRow())
|
||||
@@ -83,7 +83,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
|
||||
|
||||
reason = sql_sanitize_text(reason)
|
||||
|
||||
var/sql = "INSERT INTO erro_ban (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)"
|
||||
var/sql = "INSERT INTO [format_table_name("ban")] (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)"
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
query_insert.Execute()
|
||||
usr << "\blue Ban saved to database."
|
||||
@@ -125,7 +125,7 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
else
|
||||
bantype_sql = "bantype = '[bantype_str]'"
|
||||
|
||||
var/sql = "SELECT id FROM erro_ban WHERE ckey = '[ckey]' AND [bantype_sql] AND (unbanned is null OR unbanned = false)"
|
||||
var/sql = "SELECT id FROM [format_table_name("ban")] WHERE ckey = '[ckey]' AND [bantype_sql] AND (unbanned is null OR unbanned = false)"
|
||||
if(job)
|
||||
sql += " AND job = '[job]'"
|
||||
|
||||
@@ -166,7 +166,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
|
||||
usr << "Cancelled"
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason FROM erro_ban WHERE id = [banid]")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason FROM [format_table_name("ban")] WHERE id = [banid]")
|
||||
query.Execute()
|
||||
|
||||
var/eckey = usr.ckey //Editing admin ckey
|
||||
@@ -194,7 +194,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
|
||||
usr << "Cancelled"
|
||||
return
|
||||
|
||||
var/DBQuery/update_query = dbcon.NewQuery("UPDATE erro_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/update_query = 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]")
|
||||
update_query.Execute()
|
||||
message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s reason from [reason] to [value]",1)
|
||||
if("duration")
|
||||
@@ -204,7 +204,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
|
||||
usr << "Cancelled"
|
||||
return
|
||||
|
||||
var/DBQuery/update_query = dbcon.NewQuery("UPDATE erro_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/update_query = 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]")
|
||||
message_admins("[key_name_admin(usr)] has edited a ban for [pckey]'s duration from [duration] to [value]",1)
|
||||
update_query.Execute()
|
||||
if("unban")
|
||||
@@ -222,7 +222,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
var/sql = "SELECT ckey FROM erro_ban WHERE id = [id]"
|
||||
var/sql = "SELECT ckey FROM [format_table_name("ban")] WHERE id = [id]"
|
||||
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
@@ -252,7 +252,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
var/unban_computerid = src.owner:computer_id
|
||||
var/unban_ip = src.owner:address
|
||||
|
||||
var/sql_update = "UPDATE erro_ban SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = '[unban_ip]' WHERE id = [id]"
|
||||
var/sql_update = "UPDATE [format_table_name("ban")] SET unbanned = 1, unbanned_datetime = Now(), unbanned_ckey = '[unban_ckey]', unbanned_computerid = '[unban_computerid]', unbanned_ip = '[unban_ip]' WHERE id = [id]"
|
||||
message_admins("[key_name_admin(usr)] has lifted [pckey]'s ban.",1)
|
||||
|
||||
var/DBQuery/query_update = dbcon.NewQuery(sql_update)
|
||||
@@ -410,7 +410,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
bantypesearch += "'PERMABAN' "
|
||||
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits, ip, computerid FROM erro_ban WHERE 1 [playersearch] [adminsearch] [ipsearch] [cidsearch] [bantypesearch] ORDER BY bantime DESC LIMIT 100")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits, ip, computerid FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] [ipsearch] [cidsearch] [bantypesearch] ORDER BY bantime DESC LIMIT 100")
|
||||
select_query.Execute()
|
||||
|
||||
while(select_query.NextRow())
|
||||
|
||||
@@ -51,7 +51,7 @@ world/IsBanned(key,address,computer_id)
|
||||
failedcid = 0
|
||||
cidquery = " OR computerid = '[computer_id]' "
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM [format_table_name("ban")] WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
|
||||
query.Execute()
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ var/global/nologevent = 0
|
||||
body += "<body>Options panel for <b>[M]</b>"
|
||||
if(M.client)
|
||||
body += " played by <b>[M.client]</b> "
|
||||
body += "\[<A href='?src=\ref[src];editrights=show'>[M.client.holder ? M.client.holder.rank : "Player"]</A>\]"
|
||||
body += "\[<A href='?src=\ref[src];editrights=rank;ckey=[M.ckey]'>[M.client.holder ? M.client.holder.rank : "Player"]</A>\]"
|
||||
|
||||
if(istype(M, /mob/new_player))
|
||||
body += " <B>Hasn't Entered Game</B> "
|
||||
@@ -64,7 +64,8 @@ var/global/nologevent = 0
|
||||
<A href='?src=\ref[src];newban=\ref[M]'>Ban</A> |
|
||||
<A href='?src=\ref[src];jobban2=\ref[M]'>Jobban</A> |
|
||||
<A href='?src=\ref[src];appearanceban=\ref[M]'>Appearance Ban</A> |
|
||||
<A href='?src=\ref[src];notes=show;mob=\ref[M]'>Notes</A>
|
||||
<A href='?src=\ref[src];notes=show;mob=\ref[M]'>Notes</A> |
|
||||
<A href='?_src_=holder;watchlist=\ref[M]'>Watchlist Flag</A>
|
||||
"}
|
||||
|
||||
if(M.client)
|
||||
@@ -121,7 +122,7 @@ var/global/nologevent = 0
|
||||
<A href='?src=\ref[src];makemask=\ref[M]'>Make Mask</A> |
|
||||
<A href='?src=\ref[src];makerobot=\ref[M]'>Make Robot</A> |
|
||||
<A href='?src=\ref[src];makealien=\ref[M]'>Make Alien</A> |
|
||||
<A href='?src=\ref[src];makeslime=\ref[M]'>Make slime</A>
|
||||
<A href='?src=\ref[src];makeslime=\ref[M]'>Make Slime</A> |
|
||||
<A href='?src=\ref[src];makesuper=\ref[M]'>Make Superhero</A>
|
||||
"}
|
||||
|
||||
@@ -1006,7 +1007,6 @@ proc/formatPlayerPanel(var/mob/U,var/text="PP")
|
||||
if (!frommob.ckey)
|
||||
return 0
|
||||
|
||||
|
||||
var/question = ""
|
||||
if (tomob.ckey)
|
||||
question = "This mob already has a user ([tomob.key]) in control of it! "
|
||||
@@ -1029,4 +1029,5 @@ proc/formatPlayerPanel(var/mob/U,var/text="PP")
|
||||
tomob.ckey = frommob.ckey
|
||||
qdel(frommob)
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
if(!message) return
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F) return
|
||||
F << "<small>[time2text(world.timeofday,"hh:mm")] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
||||
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
|
||||
|
||||
//ADMINVERBS
|
||||
/client/proc/investigate_show( subject in list("hrefs","pda","singulo","gold core","cult") )
|
||||
/client/proc/investigate_show( subject in list("hrefs","pda","singulo","atmos","ntsl","gold core","cult") )
|
||||
set name = "Investigate"
|
||||
set category = "Admin"
|
||||
if(!holder) return
|
||||
@@ -57,6 +57,20 @@
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("cult")
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("atmos")
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
|
||||
return
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("ntsl")
|
||||
var/F = investigate_subject2file(subject)
|
||||
if(!F)
|
||||
src << "<font color='red'>Error: admin_investigate: [INVESTIGATE_DIR][subject] is an invalid path or cannot be accessed.</font>"
|
||||
|
||||
@@ -61,6 +61,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
//clear the datums references
|
||||
admin_datums.Cut()
|
||||
for(var/client/C in admins)
|
||||
C.remove_admin_verbs()
|
||||
C.holder = null
|
||||
admins.Cut()
|
||||
|
||||
@@ -108,7 +109,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
load_admins()
|
||||
return
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, rank, level, flags FROM erro_admin")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, rank, level, flags FROM [format_table_name("admin")]")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
var/ckey = query.item[1]
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
var/list/admin_verbs_default = list(
|
||||
// /datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
|
||||
/client/proc/deadmin_self, /*destroys our own admin datum so we can play as a regular player*/
|
||||
/client/proc/hide_verbs, /*hides all our adminverbs*/
|
||||
// /client/proc/check_antagonists, /*shows all antags*/
|
||||
// /client/proc/deadchat /*toggles deadchat on/off*/
|
||||
/client/proc/cmd_mentor_check_new_players
|
||||
@@ -202,6 +203,48 @@ var/list/admin_verbs_mentor = list(
|
||||
if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn
|
||||
if(holder.rights & R_MOD) verbs += admin_verbs_mod
|
||||
if(holder.rights & R_MENTOR) verbs += admin_verbs_mentor
|
||||
|
||||
/client/proc/remove_admin_verbs()
|
||||
verbs.Remove(
|
||||
admin_verbs_default,
|
||||
/client/proc/togglebuildmodeself,
|
||||
admin_verbs_admin,
|
||||
admin_verbs_ban,
|
||||
admin_verbs_event,
|
||||
admin_verbs_server,
|
||||
admin_verbs_debug,
|
||||
admin_verbs_possess,
|
||||
admin_verbs_permissions,
|
||||
/client/proc/stealth,
|
||||
admin_verbs_rejuv,
|
||||
admin_verbs_sounds,
|
||||
admin_verbs_spawn,
|
||||
admin_verbs_mod,
|
||||
admin_verbs_mentor,
|
||||
admin_verbs_show_debug_verbs,
|
||||
/client/proc/readmin,
|
||||
)
|
||||
|
||||
/client/proc/hide_verbs()
|
||||
set name = "Adminverbs - Hide All"
|
||||
set category = "Admin"
|
||||
|
||||
remove_admin_verbs()
|
||||
verbs += /client/proc/show_verbs
|
||||
|
||||
src << "<span class='interface'>Almost all of your adminverbs have been hidden.</span>"
|
||||
feedback_add_details("admin_verb","TAVVH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/show_verbs()
|
||||
set name = "Adminverbs - Show"
|
||||
set category = "Admin"
|
||||
|
||||
verbs -= /client/proc/show_verbs
|
||||
add_admin_verbs()
|
||||
|
||||
src << "<span class='interface'>All of your adminverbs are now visible.</span>"
|
||||
feedback_add_details("admin_verb","TAVVS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/admin_ghost()
|
||||
set category = "Admin"
|
||||
@@ -526,12 +569,61 @@ var/list/admin_verbs_mentor = list(
|
||||
set category = "Admin"
|
||||
|
||||
if(holder)
|
||||
if(alert("Confirm self-deadmin for the round? You can't re-admin yourself without someont promoting you.",,"Yes","No") == "Yes")
|
||||
log_admin("[src] deadmined themself.")
|
||||
message_admins("[src] deadmined themself.", 1)
|
||||
deadmin()
|
||||
src << "<span class='interface'>You are now a normal player.</span>"
|
||||
log_admin("[src] deadmined themself.")
|
||||
message_admins("[src] deadmined themself.")
|
||||
deadmin()
|
||||
verbs += /client/proc/readmin
|
||||
deadmins += ckey
|
||||
src << "<span class='interface'>You are now a normal player.</span>"
|
||||
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/readmin()
|
||||
set name = "Re-admin self"
|
||||
set category = "Admin"
|
||||
set desc = "Regain your admin powers."
|
||||
var/datum/admins/D = admin_datums[ckey]
|
||||
var/rank = null
|
||||
if(config.admin_legacy_system)
|
||||
//load text from file
|
||||
var/list/Lines = file2list("config/admins.txt")
|
||||
for(var/line in Lines)
|
||||
var/list/splitline = text2list(line, " - ")
|
||||
if(n_lower(splitline[1]) == ckey)
|
||||
if(splitline.len >= 2)
|
||||
rank = ckeyEx(splitline[2])
|
||||
break
|
||||
continue
|
||||
else
|
||||
if(!dbcon.IsConnected())
|
||||
message_admins("Warning, mysql database is not connected.")
|
||||
src << "Warning, mysql database is not connected."
|
||||
return
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT rank FROM [format_table_name("admin")] WHERE ckey = '[sql_ckey]'")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
rank = ckeyEx(query.item[1])
|
||||
if(!D)
|
||||
if(admin_ranks[rank] == null)
|
||||
var/error_extra = ""
|
||||
if(!config.admin_legacy_system)
|
||||
error_extra = " Check mysql DB connection."
|
||||
error("Error while re-adminning [src], admin rank ([rank]) does not exist.[error_extra]")
|
||||
src << "Error while re-adminning, admin rank ([rank]) does not exist.[error_extra]"
|
||||
return
|
||||
D = new(rank,admin_ranks[rank],ckey)
|
||||
var/client/C = directory[ckey]
|
||||
D.associate(C)
|
||||
message_admins("[src] re-adminned themselves.")
|
||||
log_admin("[src] re-adminned themselves.")
|
||||
deadmins -= ckey
|
||||
feedback_add_details("admin_verb","RAS")
|
||||
return
|
||||
else
|
||||
src << "You are already an admin."
|
||||
verbs -= /client/proc/readmin
|
||||
deadmins -= ckey
|
||||
return
|
||||
|
||||
/client/proc/toggle_log_hrefs()
|
||||
set name = "Toggle href logging"
|
||||
|
||||
@@ -59,7 +59,7 @@ DEBUG
|
||||
return
|
||||
|
||||
//appearance bans
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM erro_ban WHERE bantype = 'APPEARANCE_BAN' AND NOT unbanned = 1")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM [format_table_name("ban")] WHERE bantype = 'APPEARANCE_BAN' AND NOT unbanned = 1")
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
@@ -101,7 +101,7 @@ proc/DB_ban_isappearancebanned(var/playerckey)
|
||||
|
||||
var/sqlplayerckey = sql_sanitize_text(ckey(playerckey))
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_ban WHERE CKEY = '[sqlplayerckey]' AND ((bantype = 'APPEARANCE_BAN') OR (bantype = 'APPEARANCE_TEMPBAN' AND expiration_time > Now())) AND unbanned != 1")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("ban")] WHERE CKEY = '[sqlplayerckey]' AND ((bantype = 'APPEARANCE_BAN') OR (bantype = 'APPEARANCE_TEMPBAN' AND expiration_time > Now())) AND unbanned != 1")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
return 1
|
||||
|
||||
@@ -71,7 +71,7 @@ DEBUG
|
||||
return
|
||||
|
||||
//Job permabans
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, job FROM erro_ban WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_PERMABAN' AND isnull(unbanned)")
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
@@ -81,7 +81,7 @@ DEBUG
|
||||
jobban_keylist.Add("[ckey] - [job]")
|
||||
|
||||
//Job tempbans
|
||||
var/DBQuery/query1 = dbcon.NewQuery("SELECT ckey, job FROM erro_ban WHERE bantype = 'JOB_TEMPBAN' AND isnull(unbanned) AND expiration_time > Now()")
|
||||
var/DBQuery/query1 = dbcon.NewQuery("SELECT ckey, job FROM [format_table_name("ban")] WHERE bantype = 'JOB_TEMPBAN' AND isnull(unbanned) AND expiration_time > Now()")
|
||||
query1.Execute()
|
||||
|
||||
while(query1.NextRow())
|
||||
|
||||
@@ -28,11 +28,13 @@ var/list/admin_datums = list()
|
||||
owner = C
|
||||
owner.holder = src
|
||||
owner.add_admin_verbs() //TODO
|
||||
owner.verbs -= /client/proc/readmin
|
||||
admins |= C
|
||||
|
||||
/datum/admins/proc/disassociate()
|
||||
if(owner)
|
||||
admins -= owner
|
||||
owner.remove_admin_verbs()
|
||||
owner.holder = null
|
||||
owner = null
|
||||
|
||||
@@ -78,11 +80,17 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
|
||||
usr << "<font color='red'>Error: Cannot proceed. They have more or equal rights to us.</font>"
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
/client/proc/deadmin()
|
||||
admin_datums -= ckey
|
||||
if(holder)
|
||||
holder.disassociate()
|
||||
del(holder)
|
||||
return 1
|
||||
|
||||
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
|
||||
/proc/check_rights_for(client/subject, rights_required)
|
||||
if(subject && subject.holder)
|
||||
if(rights_required && !(rights_required & subject.holder.rights))
|
||||
return 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
if(!istext(adm_ckey) || !istext(new_rank))
|
||||
return
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id FROM erro_admin WHERE ckey = '[adm_ckey]'")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
|
||||
select_query.Execute()
|
||||
|
||||
var/new_admin = 1
|
||||
@@ -86,16 +86,16 @@
|
||||
admin_id = text2num(select_query.item[1])
|
||||
|
||||
if(new_admin)
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO `erro_admin` (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("admin")] (`id`, `ckey`, `rank`, `level`, `flags`) VALUES (null, '[adm_ckey]', '[new_rank]', -1, 0)")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_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/log_query = dbcon.NewQuery("INSERT INTO `test`.[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]');")
|
||||
log_query.Execute()
|
||||
usr << "\blue New admin added."
|
||||
else
|
||||
if(!isnull(admin_id) && isnum(admin_id))
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET rank = '[new_rank]' WHERE id = [admin_id]")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE [format_table_name("admin")] SET rank = '[new_rank]' WHERE id = [admin_id]")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_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/log_query = dbcon.NewQuery("INSERT INTO `test`.[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]');")
|
||||
log_query.Execute()
|
||||
usr << "\blue Admin rank changed."
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
if(!istext(adm_ckey) || !isnum(new_permission))
|
||||
return
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, flags FROM erro_admin WHERE ckey = '[adm_ckey]'")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, flags FROM [format_table_name("admin")] WHERE ckey = '[adm_ckey]'")
|
||||
select_query.Execute()
|
||||
|
||||
var/admin_id
|
||||
@@ -141,14 +141,24 @@
|
||||
return
|
||||
|
||||
if(admin_rights & new_permission) //This admin already has this permission, so we are removing it.
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = [admin_rights & ~new_permission] WHERE id = [admin_id]")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE [format_table_name("admin")] SET flags = [admin_rights & ~new_permission] WHERE id = [admin_id]")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.[format_table_name("admin_log")] (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
|
||||
log_query.Execute()
|
||||
usr << "\blue Permission removed."
|
||||
else //This admin doesn't have this permission, so we are adding it.
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE [format_table_name("admin")] SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]")
|
||||
insert_query.Execute()
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')")
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.[format_table_name("admin_log")] (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')")
|
||||
log_query.Execute()
|
||||
usr << "\blue Permission added."
|
||||
usr << "\blue Permission added."
|
||||
|
||||
/datum/admins/proc/updateranktodb(ckey,newrank)
|
||||
establish_db_connection()
|
||||
if (!dbcon.IsConnected())
|
||||
return
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
var/sql_admin_rank = sanitizeSQL(newrank)
|
||||
|
||||
var/DBQuery/query_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'")
|
||||
query_update.Execute()
|
||||
@@ -81,9 +81,9 @@
|
||||
body += "<a href='?src=\ref[src];traitor="+ref+"'>TP</a> - "
|
||||
body += "<a href='?src=\ref[usr];priv_msg=\ref"+ref+"'>PM</a> - "
|
||||
body += "<a href='?src=\ref[src];subtlemessage="+ref+"'>SM</a> - "
|
||||
body += "<a href='?src=\ref[src];adminplayerobservejump="+ref+"'>JMP</a>"
|
||||
body += "<a href='?src=\ref[src];adminplayerobservefollow="+ref+"'>FLW</a>"
|
||||
if(eyeref)
|
||||
body += "|<a href='?src=\ref[src];adminplayerobservejump="+eyeref+"'>EYE</a>"
|
||||
body += "|<a href='?src=\ref[src];adminplayerobservefollow="+eyeref+"'>EYE</a>"
|
||||
body += "<br>"
|
||||
if(antagonist > 0)
|
||||
body += "<font size='2'><a href='?src=\ref[src];check_antagonist=1'><font color='red'><b>Antagonist</b></font></a></font>";
|
||||
|
||||
@@ -160,6 +160,7 @@
|
||||
admin_datums -= adm_ckey
|
||||
D.disassociate()
|
||||
|
||||
updateranktodb(adm_ckey, "player")
|
||||
message_admins("[key_name_admin(usr)] removed [adm_ckey] from the admins list")
|
||||
log_admin("[key_name(usr)] removed [adm_ckey] from the admins list")
|
||||
log_admin_rank_modification(adm_ckey, "Removed")
|
||||
@@ -204,6 +205,7 @@
|
||||
var/client/C = 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)
|
||||
message_admins("[key_name_admin(usr)] edited the admin rank of [adm_ckey] to [new_rank]")
|
||||
log_admin("[key_name(usr)] edited the admin rank of [adm_ckey] to [new_rank]")
|
||||
log_admin_rank_modification(adm_ckey, new_rank)
|
||||
@@ -1032,6 +1034,63 @@
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
//Watchlist
|
||||
else if(href_list["watchlist"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
var/mob/M = locate(href_list["watchlist"])
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "<span class='danger'>Failed to establish database connection.</span>"
|
||||
return
|
||||
if(!ismob(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
if(!M.ckey)
|
||||
usr << "This mob has no ckey"
|
||||
return
|
||||
var/sql_ckey = sanitizeSQL(M.ckey)
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')")
|
||||
query.Execute()
|
||||
if(query.NextRow())
|
||||
switch(alert(usr, "Ckey already flagged", "[sql_ckey] is already on the watchlist, do you want to:", "Remove", "Edit reason", "Cancel"))
|
||||
if("Cancel")
|
||||
return
|
||||
if("Remove")
|
||||
var/DBQuery/query_watchdel = dbcon.NewQuery("DELETE FROM [format_table_name("watch")] WHERE ckey = '[sql_ckey]'")
|
||||
if(!query_watchdel.Execute())
|
||||
var/err = query_watchdel.ErrorMsg()
|
||||
log_game("SQL ERROR during removing watch entry. Error : \[[err]\]\n")
|
||||
return
|
||||
log_admin("[key_name_admin(usr)] has removed [key_name_admin(M)] from the watchlist")
|
||||
message_admins("[key_name_admin(usr)] has removed [key_name_admin(M)] from the watchlist", 1)
|
||||
if("Edit reason")
|
||||
var/DBQuery/query_reason = dbcon.NewQuery("SELECT ckey, reason FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')")
|
||||
query_reason.Execute()
|
||||
if(query_reason.NextRow())
|
||||
var/watch_reason = query_reason.item[2]
|
||||
var/new_reason = input("Insert new reason", "New Reason", "[watch_reason]", null) as null|text
|
||||
new_reason = sanitizeSQL(new_reason)
|
||||
if(!new_reason)
|
||||
return
|
||||
var/DBQuery/update_query = dbcon.NewQuery("UPDATE [format_table_name("watch")] SET reason = '[new_reason]' WHERE (ckey = '[sql_ckey]')")
|
||||
if(!update_query.Execute())
|
||||
var/err = update_query.ErrorMsg()
|
||||
log_game("SQL ERROR during edit watch entry reason. Error : \[[err]\]\n")
|
||||
return
|
||||
log_admin("[key_name_admin(usr)] has edited [sql_ckey]'s reason from [watch_reason] to [new_reason]",1)
|
||||
message_admins("[key_name_admin(usr)] has edited [sql_ckey]'s reason from [watch_reason] to [new_reason]",1)
|
||||
else
|
||||
var/reason = input(usr,"Reason?","reason","Metagaming") as text|null
|
||||
if(!reason)
|
||||
return
|
||||
reason = sanitizeSQL(reason)
|
||||
var/DBQuery/query_watchadd = dbcon.NewQuery("INSERT INTO [format_table_name("watch")] (ckey, reason) VALUES ('[sql_ckey]', '[reason]')")
|
||||
if(!query_watchadd.Execute())
|
||||
var/err = query_watchadd.ErrorMsg()
|
||||
log_game("SQL ERROR during adding new watch entry. Error : \[[err]\]\n")
|
||||
return
|
||||
log_admin("[key_name_admin(usr)] has added [key_name_admin(M)] to the watchlist - Reason: [reason]")
|
||||
message_admins("[key_name_admin(usr)] has added [key_name_admin(M)] to the watchlist - Reason: [reason]", 1)
|
||||
|
||||
else if(href_list["mute"])
|
||||
if(!check_rights(R_MOD))
|
||||
return
|
||||
@@ -1452,6 +1511,17 @@
|
||||
if(!isobserver(usr)) C.admin_ghost()
|
||||
sleep(2)
|
||||
C.jumptomob(M)
|
||||
|
||||
else if(href_list["adminplayerobservefollow"])
|
||||
if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN)) return
|
||||
|
||||
var/mob/M = locate(href_list["adminplayerobservefollow"])
|
||||
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr)) C.admin_ghost()
|
||||
var/mob/dead/observer/A = C.mob
|
||||
sleep(2)
|
||||
A.ManualFollow(M)
|
||||
|
||||
else if(href_list["check_antagonist"])
|
||||
check_antagonists()
|
||||
@@ -1519,7 +1589,7 @@
|
||||
src.owner << "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;"
|
||||
src.owner << "Location = [location_description];"
|
||||
src.owner << "[special_role_description]"
|
||||
src.owner << "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) ([admin_jump_link(M, src)]) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"
|
||||
src.owner << "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) (<A HREF='?src=\ref[src];adminplayerobservefollow=\ref[M]'>FLW</A>) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"
|
||||
|
||||
else if(href_list["adminspawncookie"])
|
||||
if(!check_rights(R_ADMIN|R_EVENT)) return
|
||||
@@ -2981,15 +3051,15 @@
|
||||
|
||||
if(isAI(target)) // AI core/eye follow links
|
||||
var/mob/living/silicon/ai/A = target
|
||||
. = "<A HREF='?[source];adminplayerobservejump=\ref[target]'>JMP</A>"
|
||||
. = "<A HREF='?[source];adminplayerobservefollow=\ref[target]'>FLW</A>"
|
||||
if(A.client && A.eyeobj) // No point following clientless AI eyes
|
||||
. += "|<A HREF='?[source];adminplayerobservejump=\ref[A.eyeobj]'>EYE</A>"
|
||||
. += "|<A HREF='?[source];adminplayerobservefollow=\ref[A.eyeobj]'>EYE</A>"
|
||||
return
|
||||
else if(istype(target, /mob/dead/observer))
|
||||
var/mob/dead/observer/O = target
|
||||
. = "<A HREF='?[source];adminplayerobservejump=\ref[target]'>JMP</A>"
|
||||
. = "<A HREF='?[source];adminplayerobservefollow=\ref[target]'>FLW</A>"
|
||||
if(O.mind && O.mind.current)
|
||||
. += "|<A HREF='?[source];adminplayerobservejump=\ref[O.mind.current]'>BDY</A>"
|
||||
. += "|<A HREF='?[source];adminplayerobservefollow=\ref[O.mind.current]'>BDY</A>"
|
||||
return
|
||||
else
|
||||
return "<A HREF='?[source];adminplayerobservejump=\ref[target]'>JMP</A>"
|
||||
return "<A HREF='?[source];adminplayerobservefollow=\ref[target]'>FLW</A>"
|
||||
|
||||
@@ -87,7 +87,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
mobs_found += found
|
||||
if(!ai_found && isAI(found))
|
||||
ai_found = 1
|
||||
msg += "<b><font color='black'>[original_word] (<A HREF='?_src_=holder;adminmoreinfo=\ref[found]'>?</A>)</font></b> "
|
||||
msg += "<b><font color='black'>[original_word] </font></b> "
|
||||
continue
|
||||
msg += "[original_word] "
|
||||
|
||||
@@ -147,3 +147,31 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
send2adminirc("[selected_type] from [key_name(src)]: [original_msg]")
|
||||
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/proc/send2irc_adminless_only(source, msg, requiredflags = R_BAN)
|
||||
var/admin_number_total = 0 //Total number of admins
|
||||
var/admin_number_afk = 0 //Holds the number of admins who are afk
|
||||
var/admin_number_ignored = 0 //Holds the number of admins without +BAN (so admins who are not really admins)
|
||||
var/admin_number_decrease = 0 //Holds the number of admins with are afk, ignored or both
|
||||
for(var/client/X in admins)
|
||||
admin_number_total++;
|
||||
var/invalid = 0
|
||||
if(requiredflags != 0 && !check_rights_for(X, requiredflags))
|
||||
admin_number_ignored++
|
||||
invalid = 1
|
||||
if(X.is_afk())
|
||||
admin_number_afk++
|
||||
invalid = 1
|
||||
if(X.holder.fakekey)
|
||||
admin_number_ignored++
|
||||
invalid = 1
|
||||
if(invalid)
|
||||
admin_number_decrease++
|
||||
var/admin_number_present = admin_number_total - admin_number_decrease //Number of admins who are neither afk nor invalid
|
||||
if(admin_number_present <= 0)
|
||||
if(!admin_number_afk && !admin_number_ignored)
|
||||
send2irc(source, "[msg] - No admins online")
|
||||
else
|
||||
send2irc(source, "[msg] - All admins AFK ([admin_number_afk]/[admin_number_total]) or skipped ([admin_number_ignored]/[admin_number_total])")
|
||||
return admin_number_present
|
||||
|
||||
@@ -55,7 +55,7 @@ var/inactive_keys = "None<br>"
|
||||
//run a query to get all ckeys inactive for over 2 months
|
||||
var/list/inactive_ckeys = list()
|
||||
if(ckeys_with_customitems.len)
|
||||
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM erro_player WHERE datediff(Now(), lastseen) > 60")
|
||||
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey, lastseen FROM [format_table_name("player")] WHERE datediff(Now(), lastseen) > 60")
|
||||
query_inactive.Execute()
|
||||
while(query_inactive.NextRow())
|
||||
var/cur_ckey = query_inactive.item[1]
|
||||
@@ -67,7 +67,7 @@ var/inactive_keys = "None<br>"
|
||||
//if there are ckeys left over, check whether they have a database entry at all
|
||||
if(ckeys_with_customitems.len)
|
||||
for(var/cur_ckey in ckeys_with_customitems)
|
||||
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE ckey = '[cur_ckey]'")
|
||||
var/DBQuery/query_inactive = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ckey = '[cur_ckey]'")
|
||||
query_inactive.Execute()
|
||||
if(!query_inactive.RowCount())
|
||||
inactive_ckeys += cur_ckey
|
||||
|
||||
@@ -118,33 +118,37 @@ var/intercom_range_display_status = 0
|
||||
del(F)
|
||||
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
var/list/admin_verbs_show_debug_verbs = list(
|
||||
/client/proc/camera_view, //-errorage
|
||||
/client/proc/sec_camera_report, //-errorage
|
||||
/client/proc/intercom_view, //-errorage
|
||||
/client/proc/Cell, //More air things
|
||||
/client/proc/atmosscan, //check plumbing
|
||||
/client/proc/powerdebug, //check power
|
||||
/client/proc/count_objects_on_z_level,
|
||||
/client/proc/count_objects_all,
|
||||
/client/proc/cmd_assume_direct_control, //-errorage
|
||||
/client/proc/startSinglo,
|
||||
/client/proc/ticklag,
|
||||
/client/proc/cmd_admin_grantfullaccess,
|
||||
// /client/proc/splash,
|
||||
/client/proc/cmd_admin_areatest,
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
/datum/admins/proc/show_traitor_panel,
|
||||
/client/proc/print_jobban_old,
|
||||
/client/proc/print_jobban_old_filter,
|
||||
/client/proc/forceEvent,
|
||||
///client/proc/cmd_admin_rejuvenate,
|
||||
/client/proc/nanomapgen_DumpImage
|
||||
)
|
||||
|
||||
/client/proc/enable_debug_verbs()
|
||||
set category = "Debug"
|
||||
set name = "Debug verbs"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
src.verbs += /client/proc/camera_view //-errorage
|
||||
src.verbs += /client/proc/sec_camera_report //-errorage
|
||||
src.verbs += /client/proc/intercom_view //-errorage
|
||||
src.verbs += /client/proc/Cell //More air things
|
||||
src.verbs += /client/proc/atmosscan //check plumbing
|
||||
src.verbs += /client/proc/powerdebug //check power
|
||||
src.verbs += /client/proc/count_objects_on_z_level
|
||||
src.verbs += /client/proc/count_objects_all
|
||||
src.verbs += /client/proc/cmd_assume_direct_control //-errorage
|
||||
src.verbs += /client/proc/startSinglo
|
||||
src.verbs += /client/proc/ticklag
|
||||
src.verbs += /client/proc/cmd_admin_grantfullaccess
|
||||
// src.verbs += /client/proc/splash
|
||||
src.verbs += /client/proc/cmd_admin_areatest
|
||||
src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
src.verbs += /datum/admins/proc/show_traitor_panel
|
||||
src.verbs += /client/proc/print_jobban_old
|
||||
src.verbs += /client/proc/print_jobban_old_filter
|
||||
src.verbs += /client/proc/forceEvent
|
||||
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
src.verbs += /client/proc/nanomapgen_DumpImage
|
||||
verbs += admin_verbs_show_debug_verbs
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -110,6 +110,10 @@
|
||||
|
||||
if(href_list["time"])
|
||||
timing = !timing
|
||||
if(timing && istype(holder, /obj/item/device/transfer_valve))
|
||||
message_admins("[key_name_admin(usr)] activated [src] attachment on [holder].")
|
||||
bombers += "[key_name(usr)] activated [src] attachment for [loc]"
|
||||
log_game("[key_name(usr)] activated [src] attachment for [loc]")
|
||||
update_icon()
|
||||
if(href_list["reset"])
|
||||
time = set_time
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
|
||||
var/sql_ckey = sql_sanitize_text(src.ckey)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM erro_player WHERE ckey = '[sql_ckey]'")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
|
||||
query.Execute()
|
||||
var/sql_id = 0
|
||||
player_age = 0 // New players won't have an entry so knowing we have a connection we set this to zero to be updated if their is a record.
|
||||
@@ -312,24 +312,30 @@
|
||||
player_age = text2num(query.item[2])
|
||||
break
|
||||
|
||||
var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE ip = '[address]'")
|
||||
var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = '[address]'")
|
||||
query_ip.Execute()
|
||||
related_accounts_ip = list()
|
||||
while(query_ip.NextRow())
|
||||
if(ckey != query_ip.item[1])
|
||||
related_accounts_ip.Add("[query_ip.item[1]]")
|
||||
|
||||
var/DBQuery/query_cid = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE computerid = '[computer_id]'")
|
||||
var/DBQuery/query_cid = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid = '[computer_id]'")
|
||||
query_cid.Execute()
|
||||
related_accounts_cid = list()
|
||||
while(query_cid.NextRow())
|
||||
if(ckey != query_cid.item[1])
|
||||
related_accounts_cid.Add("[query_cid.item[1]]")
|
||||
|
||||
related_accounts_cid.Add("[query_cid.item[1]]")
|
||||
|
||||
//Log all the alts
|
||||
if(related_accounts_cid.len)
|
||||
log_access("Alts: [key_name(src)]:[list2text(related_accounts_cid, " - ")]")
|
||||
|
||||
var/DBQuery/query_watch = dbcon.NewQuery("SELECT ckey, reason FROM [format_table_name("watch")] WHERE (ckey = '[sql_ckey]')")
|
||||
query_watch.Execute()
|
||||
if(query_watch.NextRow())
|
||||
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'>[key_name_admin(src)] is flagged for watching and has just connected - Reason: [query_watch.item[2]]</font>")
|
||||
send2irc_adminless_only("Watchlist", "[key_name_admin(src)] is flagged for watching and has just connected - Reason: [query_watch.item[2]]")
|
||||
|
||||
//Just the standard check to see if it's actually a number
|
||||
if(sql_id)
|
||||
if(istext(sql_id))
|
||||
@@ -348,16 +354,16 @@
|
||||
|
||||
if(sql_id)
|
||||
//Player already identified previously, we need to just update the 'lastseen', 'ip' and 'computer_id' variables
|
||||
var/DBQuery/query_update = dbcon.NewQuery("UPDATE erro_player SET lastseen = Now(), ip = '[sql_ip]', computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]' WHERE id = [sql_id]")
|
||||
var/DBQuery/query_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastseen = Now(), ip = '[sql_ip]', computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]' WHERE id = [sql_id]")
|
||||
query_update.Execute()
|
||||
else
|
||||
//New player!! Need to insert all the stuff
|
||||
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO erro_player (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')")
|
||||
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')")
|
||||
query_insert.Execute()
|
||||
|
||||
//Logging player access
|
||||
var/serverip = "[world.internet_address]:[world.port]"
|
||||
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `erro_connection_log`(`id`,`datetime`,`serverip`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),'[serverip]','[sql_ckey]','[sql_ip]','[sql_computerid]');")
|
||||
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]`(`id`,`datetime`,`serverip`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),'[serverip]','[sql_ckey]','[sql_ip]','[sql_computerid]');")
|
||||
query_accesslog.Execute()
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/preferences/proc/load_preferences(client/C)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ooccolor,UI_style,UI_style_color,UI_style_alpha,be_special,default_slot,toggles,sound,randomslot,volume FROM erro_player WHERE ckey='[C.ckey]'")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ooccolor,UI_style,UI_style_color,UI_style_alpha,be_special,default_slot,toggles,sound,randomslot,volume FROM [format_table_name("player")] WHERE ckey='[C.ckey]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during loading player preferences. Error : \[[err]\]\n")
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/datum/preferences/proc/save_preferences(client/C)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("UPDATE erro_player SET ooccolor='[ooccolor]',UI_style='[UI_style]',UI_style_color='[UI_style_color]',UI_style_alpha='[UI_style_alpha]',be_special='[be_special]',default_slot='[default_slot]',toggles='[toggles]',sound='[sound]',randomslot='[randomslot]',volume='[volume]' WHERE ckey='[C.ckey]'")
|
||||
var/DBQuery/query = dbcon.NewQuery("UPDATE [format_table_name("player")] SET ooccolor='[ooccolor]',UI_style='[UI_style]',UI_style_color='[UI_style_color]',UI_style_alpha='[UI_style_alpha]',be_special='[be_special]',default_slot='[default_slot]',toggles='[toggles]',sound='[sound]',randomslot='[randomslot]',volume='[volume]' WHERE ckey='[C.ckey]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during saving player preferences. Error : \[[err]\]\n")
|
||||
@@ -51,7 +51,7 @@
|
||||
slot = sanitize_integer(slot, 1, MAX_SAVE_SLOTS, initial(default_slot))
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
var/DBQuery/firstquery = dbcon.NewQuery("UPDATE erro_player SET default_slot=[slot] WHERE ckey='[C.ckey]'")
|
||||
var/DBQuery/firstquery = dbcon.NewQuery("UPDATE [format_table_name("player")] SET default_slot=[slot] WHERE ckey='[C.ckey]'")
|
||||
firstquery.Execute()
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM characters WHERE ckey='[C.ckey]' AND slot='[slot]'")
|
||||
|
||||
@@ -287,7 +287,7 @@ var/global/list/rockTurfEdgeCache
|
||||
if(z != 5)
|
||||
notify_admins = 1
|
||||
if(!triggered_by_explosion)
|
||||
message_admins("[key_name_admin(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has triggered a gibtonite deposit reaction at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
message_admins("[key_name_admin(user)] has triggered a gibtonite deposit reaction at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
else
|
||||
message_admins("An explosion has triggered a gibtonite deposit reaction at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
|
||||
|
||||
@@ -174,9 +174,9 @@
|
||||
if(triggered_by == 1)
|
||||
message_admins("An explosion has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
else if(triggered_by == 2)
|
||||
message_admins("A signal has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>. Igniter attacher: [key_name_admin(attacher)]<A HREF='?_src_=holder;adminmoreinfo=\ref[attacher]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[attacher]'>FLW</A>)")
|
||||
message_admins("A signal has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>. Igniter attacher: [key_name_admin(attacher)]")
|
||||
else
|
||||
message_admins("[key_name_admin(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
message_admins("[key_name_admin(user)] has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
if(triggered_by == 1)
|
||||
log_game("An explosion has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
|
||||
else if(triggered_by == 2)
|
||||
|
||||
@@ -311,13 +311,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(jobban_isbanned(M, "AntagHUD"))
|
||||
src << "\red <B>You have been banned from using this feature</B>"
|
||||
return
|
||||
if(config.antag_hud_restricted && !M.has_enabled_antagHUD &&!client.holder)
|
||||
if(config.antag_hud_restricted && !M.has_enabled_antagHUD && !check_rights(R_MOD,0))
|
||||
var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No")
|
||||
if(response == "No") return
|
||||
M.can_reenter_corpse = 0
|
||||
if(M in respawnable_list)
|
||||
respawnable_list -= M
|
||||
if(!M.has_enabled_antagHUD && !client.holder)
|
||||
if(!M.has_enabled_antagHUD && !check_rights(R_MOD,0))
|
||||
M.has_enabled_antagHUD = 1
|
||||
if(M.antagHUD)
|
||||
M.antagHUD = 0
|
||||
@@ -598,4 +598,5 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
//add images for the 60inv things ghosts can normally see when darkness is enabled so they can see them now
|
||||
client.images |= ghost_darkness_images
|
||||
if (ghostimage)
|
||||
client.images -= ghostimage //remove ourself
|
||||
client.images -= ghostimage //remove ourself
|
||||
|
||||
@@ -452,9 +452,9 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
var/start_T_descriptor = "<font color='#6b5d00'>tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]</font>"
|
||||
var/end_T_descriptor = "<font color='#6b4400'>tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]</font>"
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been thrown by [usr.name] ([usr.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
msg_admin_attack("[usr.name] ([usr.ckey])[isAntag(usr) ? "(ANTAG)" : ""] has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been thrown by [key_name(usr)] from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has thrown [key_name(M)] from [start_T_descriptor] with the target [end_T_descriptor]</font>")
|
||||
msg_admin_attack("[key_name_admin(usr)] has thrown [key_name_admin(M)] from [start_T_descriptor] with the target [end_T_descriptor]")
|
||||
|
||||
if(!iscarbon(usr))
|
||||
M.LAssailant = null
|
||||
|
||||
@@ -239,9 +239,9 @@ emp_act
|
||||
--src.meatleft
|
||||
user << "\red You hack off a chunk of meat from [src.name]"
|
||||
if(!src.meatleft)
|
||||
src.attack_log += "\[[time_stamp()]\] Was chopped up into meat by <b>[user]/[user.ckey]</b>"
|
||||
user.attack_log += "\[[time_stamp()]\] Chopped up <b>[src]/[src.ckey]</b> into meat</b>"
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] chopped up [src] ([src.ckey]) into meat (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
src.attack_log += "\[[time_stamp()]\] Was chopped up into meat by <b>[key_name(user)]</b>"
|
||||
user.attack_log += "\[[time_stamp()]\] Chopped up <b>[key_name(src)]</b> into meat</b>"
|
||||
msg_admin_attack("[key_name_admin(user)] chopped up [key_name_admin(src)] into meat")
|
||||
if(!iscarbon(user))
|
||||
LAssailant = null
|
||||
else
|
||||
@@ -394,12 +394,11 @@ emp_act
|
||||
|
||||
if(ismob(O.thrower))
|
||||
var/mob/M = O.thrower
|
||||
var/client/assailant = M.client
|
||||
if(assailant)
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [M.name] ([assailant.ckey])</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [src.name] ([src.ckey]) with a thrown [O]</font>")
|
||||
if(M)
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [key_name(M)]</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [key_name(src)] with a thrown [O]</font>")
|
||||
if(!istype(src,/mob/living/simple_animal/mouse))
|
||||
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey])[isAntag(M) ? "(ANTAG)" : ""] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(src)] was hit by a [O], thrown by [key_name_admin(M)]")
|
||||
|
||||
//thrown weapon embedded object code.
|
||||
if(dtype == BRUTE && istype(O,/obj/item))
|
||||
@@ -497,8 +496,11 @@ emp_act
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>", \
|
||||
"<span class='userdanger'>[src] has been hit by [M.name].</span>")
|
||||
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
|
||||
attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
|
||||
M.occupant.attack_log += text("\[[time_stamp()]\] <font color='red'>Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
|
||||
msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])")
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -115,12 +115,11 @@
|
||||
|
||||
if(ismob(O.thrower))
|
||||
var/mob/M = O.thrower
|
||||
var/client/assailant = M.client
|
||||
if(assailant)
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [M.name] ([assailant.ckey])</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [src.name] ([src.ckey]) with a thrown [O]</font>")
|
||||
if(M)
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [key_name(M)]</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [key_name(src)] with a thrown [O]</font>")
|
||||
if(!istype(src,/mob/living/simple_animal/mouse))
|
||||
msg_admin_attack("[src.name] ([src.ckey]) was hit by a [O], thrown by [M.name] ([assailant.ckey])[isAntag(M) ? "(ANTAG)" : ""] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(src)] was hit by a [O], thrown by [key_name_admin(M)]")
|
||||
|
||||
// Begin BS12 momentum-transfer code.
|
||||
if(O.throw_source && speed >= 15)
|
||||
@@ -166,13 +165,16 @@
|
||||
M.occupant_message("<span class='danger'>You hit [src].</span>")
|
||||
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>", \
|
||||
"<span class='userdanger'>[src] has been hit by [M.name].</span>")
|
||||
add_logs(M.occupant, src, "attacked", object=M, addition="(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
|
||||
attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
|
||||
M.occupant.attack_log += text("\[[time_stamp()]\] <font color='red'>Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
|
||||
msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])")
|
||||
|
||||
else
|
||||
|
||||
step_away(src,M)
|
||||
add_logs(M.occupant, src, "pushed", object=M, admin=0)
|
||||
M.occupant_message("<span class='warning'>You push [src] out of the way.</span>")
|
||||
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>")
|
||||
|
||||
return
|
||||
|
||||
//Mobs on Fire
|
||||
|
||||
@@ -196,8 +196,8 @@
|
||||
src << "\red <B>You plunge your probosci deep into the cortex of the host brain, interfacing directly with their nervous system.</B>"
|
||||
host << "\red <B>You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours.</B>"
|
||||
var/borer_key = src.key
|
||||
host.attack_log += text("\[[time_stamp()]\] <font color='blue'>[src.name] ([src.ckey]) has assumed control of [host.name] ([host.ckey])</font>")
|
||||
msg_admin_attack("[src.name] ([src.ckey]) has assumed control of [host.name] ([host.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[host.x];Y=[host.y];Z=[host.z]'>JMP</a>)")
|
||||
host.attack_log += text("\[[time_stamp()]\] <font color='blue'>[key_name(src)] has assumed control of [key_name(host)]</font>")
|
||||
msg_admin_attack("[key_name_admin(src)] has assumed control of [key_name_admin(host)]")
|
||||
// host -> brain
|
||||
var/h2b_id = host.computer_id
|
||||
var/h2b_ip= host.lastKnownIP
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
|
||||
if(ckey in deadmins)
|
||||
verbs += /client/proc/readmin
|
||||
|
||||
//Clear ability list and update from mob.
|
||||
client.verbs -= ability_verbs
|
||||
|
||||
@@ -57,27 +60,3 @@
|
||||
client.verbs |= H.species.abilities
|
||||
|
||||
CallHook("Login", list("client" = src.client, "mob" = src))
|
||||
|
||||
//Update morgues on login/logout
|
||||
if (stat == DEAD)
|
||||
var/obj/structure/morgue/Morgue = null
|
||||
var/mob/living/carbon/human/C = null
|
||||
if (istype(src,/mob/dead/observer)) //We're a ghost, let's find our corpse
|
||||
var/mob/dead/observer/G = src
|
||||
if(!G.mind) //This'll probably break morgue sprites, but the line under the next If statement causes runtimes with Assume Direct Control.
|
||||
return
|
||||
if (G.can_reenter_corpse && G.mind.current)
|
||||
C = G.mind.current
|
||||
else if (istype(src,/mob/living/carbon/human))
|
||||
C = src
|
||||
|
||||
if (C) //We found our corpse, is it inside a morgue?
|
||||
if (istype(C.loc,/obj/structure/morgue))
|
||||
Morgue = C.loc
|
||||
else if (istype(C.loc,/obj/structure/closet/body_bag))
|
||||
var/obj/structure/closet/body_bag/B = C.loc
|
||||
if (istype(B.loc,/obj/structure/morgue))
|
||||
Morgue = B.loc
|
||||
if (Morgue)
|
||||
Morgue.update()
|
||||
|
||||
|
||||
@@ -10,28 +10,7 @@
|
||||
if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell.
|
||||
send2adminirc("[key_name(src)] logged out - no more admins online.")
|
||||
..()
|
||||
|
||||
//Update morgues on login/logout
|
||||
if (stat == DEAD)
|
||||
var/obj/structure/morgue/Morgue = null
|
||||
var/mob/living/carbon/human/C = null
|
||||
if (istype(src,/mob/dead/observer)) //We're a ghost, let's find our corpse
|
||||
var/mob/dead/observer/G = src
|
||||
if(!G.mind) //This'll probably break morgue sprites, but the line under the next If statement causes runtimes with Assume Direct Control.
|
||||
return 1
|
||||
if (G.can_reenter_corpse && G.mind.current)
|
||||
C = G.mind.current
|
||||
else if (istype(src,/mob/living/carbon/human))
|
||||
C = src
|
||||
|
||||
if (C) //We found our corpse, is it inside a morgue?
|
||||
if (istype(C.loc,/obj/structure/morgue))
|
||||
Morgue = C.loc
|
||||
else if (istype(C.loc,/obj/structure/closet/body_bag))
|
||||
var/obj/structure/closet/body_bag/B = C.loc
|
||||
if (istype(B.loc,/obj/structure/morgue))
|
||||
Morgue = B.loc
|
||||
if (Morgue)
|
||||
Morgue.update()
|
||||
|
||||
|
||||
CallHook("Logout", list("client" = src.client, "mob" = src))
|
||||
|
||||
return 1
|
||||
@@ -470,7 +470,7 @@ var/list/intents = list("help","disarm","grab","harm")
|
||||
name = realname
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && (M.client.holder.rights & R_MOD))) && (M.client.prefs.toggles & CHAT_DEAD))
|
||||
if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || check_rights(R_MOD,0)) && (M.client.prefs.toggles & CHAT_DEAD))
|
||||
var/follow
|
||||
var/lname
|
||||
if(subject)
|
||||
@@ -481,7 +481,7 @@ var/list/intents = list("help","disarm","grab","harm")
|
||||
var/mob/dead/observer/DM
|
||||
if(istype(subject, /mob/dead/observer))
|
||||
DM = subject
|
||||
if(M.client.holder) // What admins see
|
||||
if(check_rights(R_MOD,0)) // What admins see
|
||||
lname = "[keyname][(DM && DM.anonsay) ? "*" : (DM ? "" : "^")] ([name])"
|
||||
else
|
||||
if(DM && DM.anonsay) // If the person is actually observer they have the option to be anonymous
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
CallHook("Login", list("client" = src.client, "mob" = src))
|
||||
|
||||
new_player_panel()
|
||||
if(ckey in deadmins)
|
||||
verbs += /client/proc/readmin
|
||||
spawn(40)
|
||||
if(client)
|
||||
handle_privacy_poll()
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
var/isadmin = 0
|
||||
if(src.client && src.client.holder)
|
||||
isadmin = 1
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM erro_poll_vote WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM erro_poll_textreply WHERE ckey = \"[ckey]\")")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[ckey]\")")
|
||||
query.Execute()
|
||||
var/newpoll = 0
|
||||
while(query.NextRow())
|
||||
@@ -178,7 +178,7 @@
|
||||
var/voted = 0
|
||||
|
||||
//First check if the person has not voted yet.
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM erro_privacy WHERE ckey='[src.ckey]'")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM [format_table_name("privacy")] WHERE ckey='[src.ckey]'")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
voted = 1
|
||||
@@ -203,7 +203,7 @@
|
||||
return
|
||||
|
||||
if(!voted)
|
||||
var/sql = "INSERT INTO erro_privacy VALUES (null, Now(), '[src.ckey]', '[option]')"
|
||||
var/sql = "INSERT INTO [format_table_name("privacy")] VALUES (null, Now(), '[src.ckey]', '[option]')"
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
query_insert.Execute()
|
||||
usr << "<b>Thank you for your vote!</b>"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
return
|
||||
var/voted = 0
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM erro_privacy WHERE ckey='[src.ckey]'")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT * FROM [format_table_name("privacy")] WHERE ckey='[src.ckey]'")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
voted = 1
|
||||
@@ -53,7 +53,7 @@
|
||||
if(src.client && src.client.holder)
|
||||
isadmin = 1
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, question FROM erro_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, question FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime")
|
||||
select_query.Execute()
|
||||
|
||||
var/output = "<div align='center'><B>Player polls</B>"
|
||||
@@ -84,7 +84,7 @@
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM erro_poll_question WHERE id = [pollid]")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid]")
|
||||
select_query.Execute()
|
||||
|
||||
var/pollstarttime = ""
|
||||
@@ -109,7 +109,7 @@
|
||||
switch(polltype)
|
||||
//Polls that have enumerated options
|
||||
if("OPTION")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
var/voted = 0
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
var/list/datum/polloption/options = list()
|
||||
|
||||
var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM erro_poll_option WHERE pollid = [pollid]")
|
||||
var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
|
||||
options_query.Execute()
|
||||
while(options_query.NextRow())
|
||||
var/datum/polloption/PO = new()
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
//Polls with a text input
|
||||
if("TEXT")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM erro_poll_textreply WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
var/voted = 0
|
||||
@@ -204,7 +204,7 @@
|
||||
|
||||
//Polls with a text input
|
||||
if("NUMVAL")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM erro_poll_option o, erro_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[usr.ckey]' AND o.id = v.optionid")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM [format_table_name("poll_option")] o, erro_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[usr.ckey]' AND o.id = v.optionid")
|
||||
voted_query.Execute()
|
||||
|
||||
var/output = "<div align='center'><B>Player poll</B>"
|
||||
@@ -230,7 +230,7 @@
|
||||
var/minid = 999999
|
||||
var/maxid = 0
|
||||
|
||||
var/DBQuery/option_query = dbcon.NewQuery("SELECT id, text, minval, maxval, descmin, descmid, descmax FROM erro_poll_option WHERE pollid = [pollid]")
|
||||
var/DBQuery/option_query = dbcon.NewQuery("SELECT id, text, minval, maxval, descmin, descmid, descmax FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
|
||||
option_query.Execute()
|
||||
while(option_query.NextRow())
|
||||
var/optionid = text2num(option_query.item[1])
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
src << browse(output,"window=playerpoll;size=500x500")
|
||||
if("MULTICHOICE")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
var/list/votedfor = list()
|
||||
@@ -286,7 +286,7 @@
|
||||
var/maxoptionid = 0
|
||||
var/minoptionid = 0
|
||||
|
||||
var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM erro_poll_option WHERE pollid = [pollid]")
|
||||
var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
|
||||
options_query.Execute()
|
||||
while(options_query.NextRow())
|
||||
var/datum/polloption/PO = new()
|
||||
@@ -345,7 +345,7 @@
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
select_query.Execute()
|
||||
|
||||
var/validpoll = 0
|
||||
@@ -363,7 +363,7 @@
|
||||
usr << "\red Poll is not valid."
|
||||
return
|
||||
|
||||
var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM erro_poll_option WHERE id = [optionid] AND pollid = [pollid]")
|
||||
var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE id = [optionid] AND pollid = [pollid]")
|
||||
select_query2.Execute()
|
||||
|
||||
var/validoption = 0
|
||||
@@ -378,7 +378,7 @@
|
||||
|
||||
var/alreadyvoted = 0
|
||||
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
while(voted_query.NextRow())
|
||||
@@ -399,7 +399,7 @@
|
||||
adminrank = usr.client.holder.rank
|
||||
|
||||
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]')")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]')")
|
||||
insert_query.Execute()
|
||||
|
||||
usr << "\blue Vote successful."
|
||||
@@ -415,7 +415,7 @@
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
select_query.Execute()
|
||||
|
||||
var/validpoll = 0
|
||||
@@ -432,7 +432,7 @@
|
||||
|
||||
var/alreadyvoted = 0
|
||||
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_textreply WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
while(voted_query.NextRow())
|
||||
@@ -457,7 +457,7 @@
|
||||
usr << "The text you entered was blank, contained illegal characters or was too long. Please correct the text and submit again."
|
||||
return
|
||||
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_textreply (id ,datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (null, Now(), [pollid], '[usr.ckey]', '[usr.client.address]', '[replytext]', '[adminrank]')")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_textreply")] (id ,datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (null, Now(), [pollid], '[usr.ckey]', '[usr.client.address]', '[replytext]', '[adminrank]')")
|
||||
insert_query.Execute()
|
||||
|
||||
usr << "\blue Feedback logging successful."
|
||||
@@ -473,7 +473,7 @@
|
||||
establish_db_connection()
|
||||
if(dbcon.IsConnected())
|
||||
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
|
||||
select_query.Execute()
|
||||
|
||||
var/validpoll = 0
|
||||
@@ -488,7 +488,7 @@
|
||||
usr << "\red Poll is not valid."
|
||||
return
|
||||
|
||||
var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM erro_poll_option WHERE id = [optionid] AND pollid = [pollid]")
|
||||
var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE id = [optionid] AND pollid = [pollid]")
|
||||
select_query2.Execute()
|
||||
|
||||
var/validoption = 0
|
||||
@@ -503,7 +503,7 @@
|
||||
|
||||
var/alreadyvoted = 0
|
||||
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_vote WHERE optionid = [optionid] AND ckey = '[usr.ckey]'")
|
||||
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE optionid = [optionid] AND ckey = '[usr.ckey]'")
|
||||
voted_query.Execute()
|
||||
|
||||
while(voted_query.NextRow())
|
||||
@@ -519,7 +519,7 @@
|
||||
adminrank = usr.client.holder.rank
|
||||
|
||||
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])")
|
||||
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])")
|
||||
insert_query.Execute()
|
||||
|
||||
usr << "\blue Vote successful."
|
||||
|
||||
@@ -236,9 +236,9 @@ var/list/organ_cache = list()
|
||||
|
||||
if(owner && vital)
|
||||
if(user)
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
owner.attack_log += "\[[time_stamp()]\]<font color='orange'> had a vital organ ([src]) removed by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [key_name(owner)] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
owner.attack_log += "\[[time_stamp()]\]<font color='orange'> had a vital organ ([src]) removed by [key_name(user)] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[key_name_admin(user)] removed a vital organ ([src]) from [key_name_admin(owner)]")
|
||||
owner.death()
|
||||
owner = null
|
||||
|
||||
|
||||
@@ -107,17 +107,17 @@
|
||||
if(src.active==1)
|
||||
src.active = 0
|
||||
user << "You turn off the [src]."
|
||||
msg_admin_attack("Emitter turned off by [key_name(user, user.client)][isAntag(user) ? "(ANTAG)" : ""](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter turned off by [user.ckey]([user]) in ([x],[y],[z])")
|
||||
investigate_log("turned <font color='red'>off</font> by [user.key]","singulo")
|
||||
message_admins("Emitter turned off by [key_name_admin(user)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter turned off by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("turned <font color='red'>off</font> by [key_name(usr)]","singulo")
|
||||
else
|
||||
src.active = 1
|
||||
user << "You turn on the [src]."
|
||||
src.shot_number = 0
|
||||
src.fire_delay = 100
|
||||
msg_admin_attack("Emitter turned on by [key_name(user, user.client)][isAntag(user) ? "(ANTAG)" : ""](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter turned on by [user.ckey]([user]) in ([x],[y],[z])")
|
||||
investigate_log("turned <font color='green'>on</font> by [user.key]","singulo")
|
||||
message_admins("Emitter turned on by [key_name_admin(user)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter turned on by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("turned <font color='green'>on</font> by [key_name(usr)]","singulo")
|
||||
update_icon()
|
||||
else
|
||||
user << "\red The controls are locked!"
|
||||
|
||||
@@ -122,9 +122,11 @@
|
||||
if(strength > strength_upper_limit)
|
||||
strength = strength_upper_limit
|
||||
else
|
||||
msg_admin_attack("PA Control Computer increased to [strength] by [key_name(usr, usr.client)][isAntag(usr) ? "(ANTAG)" : ""](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer increased to [strength] by [usr.ckey]([usr]) in ([x],[y],[z])")
|
||||
use_log += text("\[[time_stamp()]\] <font color='red'>[usr.name] ([usr.ckey]) has increased the PA Control Computer to [strength].</font>")
|
||||
message_admins("PA Control Computer increased to [strength] by [key_name_admin(usr)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer increased to [strength] by [key_name(usr)] in ([x],[y],[z])")
|
||||
investigate_log("increased to <font color='red'>[strength]</font> by [key_name(usr)]","singulo")
|
||||
use_log += text("\[[time_stamp()]\] <font color='red'>[usr.name] ([key_name(usr)]) has increased the PA Control Computer to [strength].</font>")
|
||||
|
||||
investigate_log("increased to <font color='red'>[strength]</font> by [usr.key]","singulo")
|
||||
strength_change()
|
||||
|
||||
@@ -134,8 +136,11 @@
|
||||
if(strength < 0)
|
||||
strength = 0
|
||||
else
|
||||
investigate_log("decreased to <font color='green'>[strength]</font> by [usr.key]","singulo")
|
||||
use_log += text("\[[time_stamp()]\] <font color='orange'>[usr.name] ([usr.ckey]) has decreased the PA Control Computer to [strength].</font>")
|
||||
message_admins("PA Control Computer decreased to [strength] by [key_name_admin(usr)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer decreased to [strength] by [key_name(usr)] in ([x],[y],[z])")
|
||||
investigate_log("decreased to <font color='green'>[strength]</font> by [key_name(usr)]","singulo")
|
||||
use_log += text("\[[time_stamp()]\] <font color='orange'>[usr.name] ([key_name(usr)]) has decreased the PA Control Computer to [strength].</font>")
|
||||
|
||||
strength_change()
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/power_change()
|
||||
@@ -215,7 +220,7 @@
|
||||
src.active = !src.active
|
||||
investigate_log("turned [active?"<font color='red'>ON</font>":"<font color='green'>OFF</font>"] by [usr ? usr.key : "outside forces"]","singulo")
|
||||
if (active)
|
||||
msg_admin_attack("PA Control Computer turned ON by [key_name(usr, usr.client)][isAntag(usr) ? "(ANTAG)" : ""](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
msg_admin_attack("PA Control Computer turned ON by [key_name(usr, usr.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("PA Control Computer turned ON by [usr.ckey]([usr]) in ([x],[y],[z])")
|
||||
use_log += text("\[[time_stamp()]\] <font color='red'>[usr.name] ([usr.ckey]) has turned on the PA Control Computer.</font>")
|
||||
if(src.active)
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
var/mob/living/user = AM
|
||||
user.dust()
|
||||
power += 200
|
||||
message_admins("[src] has consumed [key_name_admin(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>(JMP)</a>.")
|
||||
message_admins("[src] has consumed [key_name_admin(user)] <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>(JMP)</a>.")
|
||||
investigate_log("has consumed [key_name(user)].", "supermatter")
|
||||
else if(isobj(AM) && !istype(AM, /obj/effect))
|
||||
investigate_log("has consumed [AM].", "supermatter")
|
||||
|
||||
@@ -137,18 +137,18 @@
|
||||
playsound(loc, hitsound, 20, 1, -1)
|
||||
visible_message("\red [A.name] is hit by the [src.name] in the [parse_zone(def_zone)]!")//X has fired Y is now given by the guns so you cant tell who shot you if you could not see the shooter
|
||||
if(istype(firer, /mob))
|
||||
M.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>[reagent_note]"
|
||||
firer.attack_log += "\[[time_stamp()]\] <b>[firer]/[firer.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>[reagent_note]"
|
||||
M.attack_log += "\[[time_stamp()]\] <b>[key_name(firer)]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>[reagent_note]"
|
||||
firer.attack_log += "\[[time_stamp()]\] <b>[key_name(firer)]</b> shot <b>[M]/[M.ckey]</b> with a <b>[src.type]</b>[reagent_note]"
|
||||
if(M.ckey && chatlog_attacks)
|
||||
msg_admin_attack("[firer] ([firer.ckey])[isAntag(firer) ? "(ANTAG)" : ""] shot [M] ([M.ckey]) with a [src][reagent_note] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
|
||||
msg_admin_attack("[key_name_admin(firer)] shot [key_name_admin(M)] with a [src][reagent_note]") //BS12 EDIT ALG
|
||||
if(!iscarbon(firer))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = firer
|
||||
else
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>[src]</b>[reagent_note]"
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[key_name(M)]</b> with a <b>[src]</b>[reagent_note]"
|
||||
if(M.ckey && chatlog_attacks)
|
||||
msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a [src][reagent_note] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
|
||||
msg_admin_attack("UNKNOWN shot [key_name_admin(M)] with a [src][reagent_note] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[firer.x];Y=[firer.y];Z=[firer.z]'>JMP</a>)") //BS12 EDIT ALG
|
||||
|
||||
spawn(0)
|
||||
if(A)
|
||||
|
||||
@@ -180,15 +180,15 @@
|
||||
M.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>dartgun</b> ([R])"
|
||||
user.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>dartgun</b> ([R])"
|
||||
if(M.ckey)
|
||||
msg_admin_attack("[user] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] shot [M] ([M.ckey]) with a dartgun ([R]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(user)] shot [M] ([M.ckey]) with a dartgun ([R]).")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
else
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>dartgun</b> ([R])"
|
||||
msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a <b>dartgun</b> ([R]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[key_name_admin(M)]</b> with a <b>dartgun</b> ([R])"
|
||||
msg_admin_attack("UNKNOWN shot [key_name(M)] with a <b>dartgun</b> ([R]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
if(D.reagents)
|
||||
D.reagents.trans_to(M, 15)
|
||||
|
||||
@@ -70,10 +70,10 @@
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been squirted with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to squirt [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been squirted with [src.name] by [key_name(user)]. Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to squirt [key_name(M)]. Reagents: [contained]</font>")
|
||||
if(M.ckey)
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(user)] squirted [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
@@ -88,8 +88,8 @@
|
||||
badshit += reagents_to_log[bad_reagent]
|
||||
if(badshit.len)
|
||||
var/hl="\red <b>([english_list(badshit)])</b> \black"
|
||||
message_admins("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
log_game("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].")
|
||||
message_admins("[key_name_admin(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]")
|
||||
log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].")
|
||||
|
||||
trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "\blue You transfer [trans] units of the solution."
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
badshit += reagents_to_log[bad_reagent]
|
||||
if(badshit.len)
|
||||
var/hl="\red <b>([english_list(badshit)])</b> \black"
|
||||
message_admins("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
log_game("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].")
|
||||
message_admins("[key_name_admin(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]")
|
||||
log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].")
|
||||
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "\blue You transfer [trans] units of the solution to [target]."
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] feeds [M] [src].", 1)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [key_name(user)] Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] by [key_name(M)] Reagents: [reagentlist(src)]</font>")
|
||||
if(M.ckey)
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(user)] fed [key_name_admin(M)] with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("\red [user] feeds [M] [src].", 1)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [key_name(user)] Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [key_name(M)] Reagents: [reagentlist(src)]</font>")
|
||||
log_attack("[key_name_admin(user)] fed [key_name_admin(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
|
||||
@@ -97,10 +97,10 @@
|
||||
else O.show_message(text("\red <B>[target] has attacked himself with a bottle of [src.name]!</B>"), 1)
|
||||
|
||||
//Attack logs
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has attacked [target.name] ([target.ckey]) with a bottle!</font>")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been smashed with a bottle by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Has attacked [key_name(target)] with a bottle!</font>")
|
||||
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been smashed with a bottle by [key_name(user)]</font>")
|
||||
if(target.ckey)
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] attacked [target.name] ([target.ckey]) with a bottle. (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(target)] with a bottle. (INTENT: [uppertext(user.a_intent)])")
|
||||
if(!iscarbon(user))
|
||||
target.LAssailant = null
|
||||
else
|
||||
|
||||
@@ -85,10 +85,10 @@
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been splashed with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to splash [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been splashed with [src.name] by [key_name(user)]. Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to splash [key_name(M)]. Reagents: [contained]</font>")
|
||||
if(M.ckey)
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] splashed [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(user)] splashed [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
@@ -129,8 +129,8 @@
|
||||
badshit += reagents_to_log[bad_reagent]
|
||||
if(badshit.len)
|
||||
var/hl="\red <b>([english_list(badshit)])</b> \black"
|
||||
message_admins("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
log_game("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].")
|
||||
message_admins("[key_name_admin(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]")
|
||||
log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].")
|
||||
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "\blue You transfer [trans] units of the solution to [target]."
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [src.name] by [key_name(user)]. Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [key_name(M)]. Reagents: [contained]</font>")
|
||||
if(M.ckey)
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
for(var/mob/O in viewers(world.view, user))
|
||||
O.show_message("<span class='warning'>[user] forces [M] to [apply_method] [src].</span>", 1)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [key_name(user)] Reagents: [reagentlist(src)]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] to [key_name(M)]) Reagents: [reagentlist(src)]</font>")
|
||||
if(M.ckey)
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(user)] fed [key_name_admin(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
badshit += reagents_to_log[bad_reagent]
|
||||
if(badshit.len)
|
||||
var/hl="\red <b>([english_list(badshit)])</b> \black"
|
||||
message_admins("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
log_game("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].")
|
||||
message_admins("[key_name_admin(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl]")
|
||||
log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].")
|
||||
|
||||
else if(ismob(target))
|
||||
if(istype(target , /mob/living/carbon/human))
|
||||
@@ -78,10 +78,10 @@
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been squirted with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to squirt [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been squirted with [src.name] by [key_name(user)]. Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to squirt [key_name(M)]. Reagents: [contained]</font>")
|
||||
if(M.ckey)
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] squirted [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(user)] squirted [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
|
||||
@@ -51,10 +51,10 @@
|
||||
message_admins("[key_name_admin(user)] fired sulphuric acid from \a [src].")
|
||||
log_game("[key_name(user)] fired sulphuric acid from \a [src].")
|
||||
if(reagents.has_reagent("facid"))
|
||||
message_admins("[key_name_admin(user)] fired Fluorosulfuric Acid from \a [src].")
|
||||
message_admins("[key_name_admin(user)] fired fluorosulfuric acid from \a [src].")
|
||||
log_game("[key_name(user)] fired Fluorosulfuric Acid from \a [src].")
|
||||
if(reagents.has_reagent("lube"))
|
||||
message_admins("[key_name_admin(user)] fired Space lube from \a [src].")
|
||||
message_admins("[key_name_admin(user)] fired space lube from \a [src].")
|
||||
log_game("[key_name(user)] fired Space lube from \a [src].")
|
||||
return
|
||||
|
||||
|
||||
@@ -193,10 +193,10 @@
|
||||
for(var/datum/reagent/R in src.reagents.reagent_list)
|
||||
injected += R.name
|
||||
var/contained = english_list(injected)
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]</font>")
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [src.name] by [key_name(user)]. Reagents: [contained]</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to inject [key_name(M)]. Reagents: [contained]</font>")
|
||||
if(M.ckey)
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])")
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
@@ -215,8 +215,8 @@
|
||||
badshit += reagents_to_log[bad_reagent]
|
||||
if(badshit.len)
|
||||
var/hl="\red <b>([english_list(badshit)])</b> \black"
|
||||
message_admins("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
log_game("[user.name] ([user.ckey]) added [reagents.get_reagent_ids(1)] to \a [target] with [src].")
|
||||
message_admins("[key_name_admin(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].[hl] ")
|
||||
log_game("[key_name(user)] added [reagents.get_reagent_ids(1)] to \a [target] with [src].")
|
||||
|
||||
spawn(5)
|
||||
var/datum/reagent/blood/B
|
||||
@@ -281,7 +281,7 @@
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
if(target.ckey)
|
||||
msg_admin_attack("[user.name] ([user.ckey])[isAntag(user) ? "(ANTAG)" : ""] attacked [target.name] ([target.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(user)] attacked [key_name_admin(target)] with [src.name] (INTENT: [uppertext(user.a_intent)])")
|
||||
if(!iscarbon(user))
|
||||
target.LAssailant = null
|
||||
else
|
||||
|
||||
@@ -124,10 +124,10 @@
|
||||
for (var/mob/C in viewers(src))
|
||||
C.show_message("\red [GM.name] has been placed in the [src] by [user].", 3)
|
||||
qdel(G)
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has placed [GM.name] ([GM.ckey]) in disposals.</font>")
|
||||
GM.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been placed in disposals by [usr.name] ([usr.ckey])</font>")
|
||||
usr.attack_log += text("\[[time_stamp()]\] <font color='red'>Has placed [key_name(GM)] in disposals.</font>")
|
||||
GM.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been placed in disposals by [key_name(user)]</font>")
|
||||
if(GM.ckey)
|
||||
msg_admin_attack("[usr] ([usr.ckey])[isAntag(usr) ? "(ANTAG)" : ""] placed [GM] ([GM.ckey]) in a disposals unit. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(user)] placed [key_name_admin(GM)] in a disposals unit. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
return
|
||||
|
||||
if(!I) return
|
||||
|
||||
@@ -295,7 +295,7 @@ var/obj/machinery/blackbox_recorder/blackbox
|
||||
if(!dbcon.IsConnected()) return
|
||||
var/round_id
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT MAX(round_id) AS round_id FROM erro_feedback")
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT MAX(round_id) AS round_id FROM [format_table_name("feedback")]")
|
||||
query.Execute()
|
||||
while(query.NextRow())
|
||||
round_id = query.item[1]
|
||||
@@ -305,7 +305,7 @@ var/obj/machinery/blackbox_recorder/blackbox
|
||||
round_id++
|
||||
|
||||
for(var/datum/feedback_variable/FV in feedback)
|
||||
var/sql = "INSERT INTO erro_feedback VALUES (null, Now(), [round_id], \"[FV.get_variable()]\", [FV.get_value()], \"[FV.get_details()]\")"
|
||||
var/sql = "INSERT INTO [format_table_name("feedback")] VALUES (null, Now(), [round_id], \"[FV.get_variable()]\", [FV.get_value()], \"[FV.get_details()]\")"
|
||||
var/DBQuery/query_insert = dbcon.NewQuery(sql)
|
||||
query_insert.Execute()
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ client/verb/tcssave()
|
||||
var/tcscode=winget(src, "tcscode", "text")
|
||||
var/msg="[mob.name] is adding script to server [Server]: [tcscode]"
|
||||
diary << msg
|
||||
message_admins("[mob.name] has uploaded a NTLS script to [Machine.SelectedServer] ([mob.x],[mob.y],[mob.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[mob.x];Y=[mob.y];Z=[mob.z]'>JMP</a>)",0,1)
|
||||
Server.setcode( tcscode ) // this actually saves the code from input to the server
|
||||
src << output(null, "tcserror") // clear the errors
|
||||
else
|
||||
@@ -36,7 +35,7 @@ client/verb/tcscompile()
|
||||
if(Machine.SelectedServer)
|
||||
var/obj/machinery/telecomms/server/Server = Machine.SelectedServer
|
||||
Server.setcode( winget(src, "tcscode", "text") ) // save code first
|
||||
var/list/compileerrors = Server.compile() // then compile the code!
|
||||
var/list/compileerrors = Server.compile(usr) // then compile the code!
|
||||
|
||||
// Output all the compile-time errors
|
||||
src << output(null, "tcserror")
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
confirmed = 0
|
||||
trigger_event(event)
|
||||
log_game("[key_name(event_triggered_by)] triggered and [key_name(event_confirmed_by)] confirmed event [event]")
|
||||
message_admins("[key_name(event_triggered_by)] triggered and [key_name(event_confirmed_by)] confirmed event [event]", 1)
|
||||
message_admins("[key_name_admin(event_triggered_by)] ([admin_jump_link(event_triggered_by, "holder")]) triggered and [key_name_admin(event_confirmed_by)] ([admin_jump_link(event_confirmed_by, "holder")]) confirmed event [event]", 1)
|
||||
reset()
|
||||
|
||||
/obj/machinery/keycard_auth/proc/receive_request(var/obj/machinery/keycard_auth/source)
|
||||
|
||||
@@ -92,9 +92,9 @@
|
||||
if(borer)
|
||||
borer.detatch() //Should remove borer if the brain is removed - RR
|
||||
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [user.name] ([user.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) debrained [target.name] ([target.ckey]) with [tool.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Debrained [key_name(target)] with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
target.attack_log += "\[[time_stamp()]\]<font color='orange'> Debrained by [key_name(user)] with [tool.name] (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[key_name_admin(user)] debrained [key_name_admin(target)] with [tool.name]")
|
||||
|
||||
var/obj/item/organ/brain/B = target.internal_organs_by_name["brain"]
|
||||
if(B && istype(B))
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
if(istype(load, /mob/living/carbon/human))
|
||||
var/mob/living/D = load
|
||||
D << "\red You hit [M]!"
|
||||
msg_admin_attack("[D.name] ([D.ckey])[isAntag(D) ? "(ANTAG)" : ""] hit [M.name] ([M.ckey]) with [src]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
|
||||
msg_admin_attack("[key_name_admin(D)] hit [key_name_admin(M)] with [src].")
|
||||
|
||||
|
||||
//-------------------------------------------
|
||||
|
||||
@@ -162,10 +162,10 @@
|
||||
var/mob/living/carbon/human/D = load
|
||||
D << "\red \b You ran over [H]!"
|
||||
visible_message("<B>\red \The [src] ran over [H]!</B>")
|
||||
attack_log += text("\[[time_stamp()]\] <font color='red'>ran over [H.name] ([H.ckey]), driven by [D.name] ([D.ckey])</font>")
|
||||
msg_admin_attack("[D.name] ([D.ckey])[isAntag(D) ? "(ANTAG)" : ""] ran over [H.name] ([H.ckey]). (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
|
||||
attack_log += text("\[[time_stamp()]\] <font color='red'>ran over [key_name(H)], driven by [key_name(D)]</font>")
|
||||
msg_admin_attack("[key_name_admin(D)] ran over [key_name_admin(H)]")
|
||||
else
|
||||
attack_log += text("\[[time_stamp()]\] <font color='red'>ran over [H.name] ([H.ckey])</font>")
|
||||
attack_log += text("\[[time_stamp()]\] <font color='red'>ran over [key_name(H)]</font>")
|
||||
|
||||
|
||||
//-------------------------------------------
|
||||
|
||||
@@ -212,10 +212,10 @@
|
||||
var/mob/living/carbon/human/D = load
|
||||
D << "\red \b You ran over [H]!"
|
||||
visible_message("<B>\red \The [src] ran over [H]!</B>")
|
||||
attack_log += text("\[[time_stamp()]\] <font color='red'>ran over [H.name] ([H.ckey]), driven by [D.name] ([D.ckey])</font>")
|
||||
msg_admin_attack("[D.name] ([D.ckey])[isAntag(D) ? "(ANTAG)" : ""] ran over [H.name] ([H.ckey]). (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
|
||||
attack_log += text("\[[time_stamp()]\] <font color='red'>ran over [key_name(H)], driven by [key_name(D)]</font>")
|
||||
msg_admin_attack("[key_name_admin(D)] ran over [key_name_admin(H)]")
|
||||
else
|
||||
attack_log += text("\[[time_stamp()]\] <font color='red'>ran over [H.name] ([H.ckey])</font>")
|
||||
attack_log += text("\[[time_stamp()]\] <font color='red'>ran over [key_name(H)]</font>")
|
||||
|
||||
|
||||
//-------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user