Merge branch 'master' into adminbus

This commit is contained in:
monster860
2016-04-07 21:15:59 -04:00
1298 changed files with 24432 additions and 21360 deletions
+15 -15
View File
@@ -93,7 +93,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
if(blockselfban)
if(a_ckey == ckey)
usr << "<span class='danger'>You cannot apply this ban type on yourself.</span>"
to_chat(usr, "<span class='danger'>You cannot apply this ban type on yourself.</span>")
return
var/who
@@ -118,13 +118,13 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
if(adm_query.NextRow())
var/adm_bans = text2num(adm_query.item[1])
if(adm_bans >= MAX_ADMIN_BANS_PER_ADMIN)
usr << "<span class='danger'>You already logged [MAX_ADMIN_BANS_PER_ADMIN] admin ban(s) or more. Do not abuse this function!</span>"
to_chat(usr, "<span class='danger'>You already logged [MAX_ADMIN_BANS_PER_ADMIN] admin ban(s) or more. Do not abuse this function!</span>")
return
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."
to_chat(usr, "\blue Ban saved to database.")
message_admins("[key_name_admin(usr)] has added a [bantype_str] for [ckey] [(job)?"([job])":""] [(duration > 0)?"([duration] minutes)":""] with the reason: \"[reason]\" to the ban database.",1)
if(announceinirc)
@@ -192,17 +192,17 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
ban_number++;
if(ban_number == 0)
usr << "\red Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin."
to_chat(usr, "\red Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.")
return
if(ban_number > 1)
usr << "\red Database update failed due to multiple bans fitting the search criteria. Note down the ckey, job and current time and contact the database admin."
to_chat(usr, "\red Database update failed due to multiple bans fitting the search criteria. Note down the ckey, job and current time and contact the database admin.")
return
if(istext(ban_id))
ban_id = text2num(ban_id)
if(!isnum(ban_id))
usr << "\red Database update failed due to a ban ID mismatch. Contact the database admin."
to_chat(usr, "\red Database update failed due to a ban ID mismatch. Contact the database admin.")
return
DB_ban_unban_by_id(ban_id)
@@ -212,7 +212,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
if(!check_rights(R_BAN)) return
if(!isnum(banid) || !istext(param))
usr << "Cancelled"
to_chat(usr, "Cancelled")
return
var/DBQuery/query = dbcon.NewQuery("SELECT ckey, duration, reason FROM [format_table_name("ban")] WHERE id = [banid]")
@@ -228,7 +228,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
duration = query.item[2]
reason = query.item[3]
else
usr << "Invalid ban id. Contact the database admin"
to_chat(usr, "Invalid ban id. Contact the database admin")
return
reason = sql_sanitize_text(reason)
@@ -240,7 +240,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
value = input("Insert the new reason for [pckey]'s ban", "New Reason", "[reason]", null) as null|text
value = sql_sanitize_text(value)
if(!value)
usr << "Cancelled"
to_chat(usr, "Cancelled")
return
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]")
@@ -250,7 +250,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
if(!value)
value = input("Insert the new duration (in minutes) for [pckey]'s ban", "New Duration", "[duration]", null) as null|num
if(!isnum(value) || !value)
usr << "Cancelled"
to_chat(usr, "Cancelled")
return
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]")
@@ -261,10 +261,10 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null)
DB_ban_unban_by_id(banid)
return
else
usr << "Cancelled"
to_chat(usr, "Cancelled")
return
else
usr << "Cancelled"
to_chat(usr, "Cancelled")
return
datum/admins/proc/DB_ban_unban_by_id(var/id)
@@ -287,11 +287,11 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
ban_number++;
if(ban_number == 0)
usr << "\red Database update failed due to a ban id not being present in the database."
to_chat(usr, "\red Database update failed due to a ban id not being present in the database.")
return
if(ban_number > 1)
usr << "\red Database update failed due to multiple bans having the same ID. Contact the database admin."
to_chat(usr, "\red Database update failed due to multiple bans having the same ID. Contact the database admin.")
return
if(!src.owner || !istype(src.owner, /client))
@@ -328,7 +328,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
establish_db_connection()
if(!dbcon.IsConnected())
usr << "\red Failed to establish database connection"
to_chat(usr, "\red Failed to establish database connection")
return
var/output = "<div align='center'><table width='90%'><tr>"
+15 -15
View File
@@ -106,19 +106,19 @@ var/savefile/Banlist
Banlist.cd = "/base"
if ( Banlist.dir.Find("[ckey][computerid]") )
usr << text("\red Ban already exists.")
to_chat(usr, text("\red Ban already exists."))
return 0
else
Banlist.dir.Add("[ckey][computerid]")
Banlist.cd = "/base/[ckey][computerid]"
Banlist["key"] << ckey
Banlist["id"] << computerid
Banlist["ip"] << address
Banlist["reason"] << reason
Banlist["bannedby"] << bannedby
Banlist["temp"] << temp
to_chat(Banlist["key"], ckey)
to_chat(Banlist["id"], computerid)
to_chat(Banlist["ip"], address)
to_chat(Banlist["reason"], reason)
to_chat(Banlist["bannedby"], bannedby)
to_chat(Banlist["temp"], temp)
if (temp)
Banlist["minutes"] << bantimestamp
to_chat(Banlist["minutes"], bantimestamp)
if(!temp)
add_note(ckey, "Permanently banned - [reason]", null, bannedby, 0)
else
@@ -211,17 +211,17 @@ var/savefile/Banlist
Banlist.cd = "/base"
Banlist.dir.Add("trash[i]trashid[i]")
Banlist.cd = "/base/trash[i]trashid[i]"
Banlist["key"] << "trash[i]"
to_chat(Banlist["key"], "trash[i]")
else
Banlist.cd = "/base"
Banlist.dir.Add("[last]trashid[i]")
Banlist.cd = "/base/[last]trashid[i]"
Banlist["key"] << last
Banlist["id"] << "trashid[i]"
Banlist["reason"] << "Trashban[i]."
Banlist["temp"] << a
Banlist["minutes"] << CMinutes + rand(1,2000)
Banlist["bannedby"] << "trashmin"
to_chat(Banlist["key"], last)
to_chat(Banlist["id"], "trashid[i]")
to_chat(Banlist["reason"], "Trashban[i].")
to_chat(Banlist["temp"], a)
to_chat(Banlist["minutes"], CMinutes + rand(1,2000))
to_chat(Banlist["bannedby"], "trashmin")
last = "trash[i]"
Banlist.cd = "/base"
+7 -6
View File
@@ -35,9 +35,10 @@
var/cleaned = copytext(line,13,length(line)-19)
if(!cleaned) continue
F[cleaned] << 1
F["last_update"] << world.realtime
to_chat(F["last_update"], world.realtime)
diary << "ToR data updated!"
if(usr) usr << "ToRban updated."
if(usr)
to_chat(usr, "ToRban updated.")
return 1
diary << "ToR data update aborted: no data."
return 0
@@ -72,16 +73,16 @@
var/choice = input(src,"Please select an IP address to remove from the ToR banlist:","Remove ToR ban",null) as null|anything in F.dir
if(choice)
F.dir.Remove(choice)
src << "<b>Address removed</b>"
to_chat(src, "<b>Address removed</b>")
if("remove all")
src << "<b>[TORFILE] was [fdel(TORFILE)?"":"not "]removed.</b>"
to_chat(src, "<b>[TORFILE] was [fdel(TORFILE)?"":"not "]removed.</b>")
if("find")
var/input = input(src,"Please input an IP address to search for:","Find ToR ban",null) as null|text
if(input)
if(ToRban_isbanned(input))
src << "<font color='green'><b>Address is a known ToR address</b></font>"
to_chat(src, "<font color='green'><b>Address is a known ToR address</b></font>")
else
src << "<font color='red'><b>Address is not a known ToR address</b></font>"
to_chat(src, "<font color='red'><b>Address is not a known ToR address</b></font>")
return
#undef TORFILE
+36 -34
View File
@@ -9,7 +9,7 @@ var/global/nologevent = 0
log_adminwarn(msg)
for(var/client/C in admins)
if(R_SERVER & C.holder.rights)
C << msg
to_chat(C, msg)
/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
log_attack(text)
@@ -20,7 +20,7 @@ var/global/nologevent = 0
if(C.prefs.toggles & CHAT_ATTACKLOGS)
if(!istype(C, /mob/living))
var/msg = rendered
C << msg
to_chat(C, msg)
///////////////////////////////////////////////////////////////////////////////////////////////Panels
@@ -31,7 +31,7 @@ var/global/nologevent = 0
set desc="Edit player (respawn, ban, heal, etc)"
if(!M)
usr << "You seem to be selecting a mob that doesn't exist anymore."
to_chat(usr, "You seem to be selecting a mob that doesn't exist anymore.")
return
if(!check_rights(R_ADMIN|R_MOD))
@@ -58,9 +58,9 @@ var/global/nologevent = 0
body += "<b>Mob type:</b> [M.type]<br>"
if(M.client)
if(M.client.related_accounts_cid.len)
body += "<b>Related accounts by CID:</b> [list2text(M.client.related_accounts_cid, " - ")]<br>"
body += "<b>Related accounts by CID:</b> [jointext(M.client.related_accounts_cid, " - ")]<br>"
if(M.client.related_accounts_ip.len)
body += "<b>Related accounts by IP:</b> [list2text(M.client.related_accounts_ip, " - ")]<br><br>"
body += "<b>Related accounts by IP:</b> [jointext(M.client.related_accounts_ip, " - ")]<br><br>"
body += "<A href='?_src_=holder;boot2=\ref[M]'>Kick</A> | "
body += "<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> | "
@@ -470,8 +470,8 @@ var/global/nologevent = 0
else
dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com"
//world << "Channelname: [src.admincaster_feed_channel.channel_name] [src.admincaster_feed_channel.author]"
//world << "Msg: [src.admincaster_feed_message.author] [src.admincaster_feed_message.body]"
// to_chat(world, "Channelname: [src.admincaster_feed_channel.channel_name] [src.admincaster_feed_channel.author]")
// to_chat(world, "Msg: [src.admincaster_feed_message.author] [src.admincaster_feed_message.body]")
usr << browse(dat, "window=admincaster_main;size=400x600")
onclose(usr, "admincaster_main")
@@ -546,7 +546,7 @@ var/global/nologevent = 0
if(!check_rights(R_SERVER,0))
message = adminscrub(message,500)
message = replacetext(message, "\n", "<br>") // required since we're putting it in a <p> tag
world << "<span class=notice><b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b><p style='text-indent: 50px'>[message]</p></span>"
to_chat(world, "<span class=notice><b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b><p style='text-indent: 50px'>[message]</p></span>")
log_admin("Announce: [key_name(usr)] : [message]")
feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -572,9 +572,9 @@ var/global/nologevent = 0
config.looc_allowed = !(config.looc_allowed)
if (config.looc_allowed)
world << "<B>The LOOC channel has been globally enabled!</B>"
to_chat(world, "<B>The LOOC channel has been globally enabled!</B>")
else
world << "<B>The LOOC channel has been globally disabled!</B>"
to_chat(world, "<B>The LOOC channel has been globally disabled!</B>")
log_and_message_admins("toggled LOOC.")
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -588,9 +588,9 @@ var/global/nologevent = 0
config.dsay_allowed = !(config.dsay_allowed)
if (config.dsay_allowed)
world << "<B>Deadchat has been globally enabled!</B>"
to_chat(world, "<B>Deadchat has been globally enabled!</B>")
else
world << "<B>Deadchat has been globally disabled!</B>"
to_chat(world, "<B>Deadchat has been globally disabled!</B>")
log_admin("[key_name(usr)] toggled deadchat.")
message_admins("[key_name_admin(usr)] toggled deadchat.", 1)
feedback_add_details("admin_verb","TDSAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc
@@ -626,7 +626,7 @@ var/global/nologevent = 0
feedback_add_details("admin_verb","SN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return 1
else
usr << "<font color='red'>Error: Start Now: Game has already started.</font>"
to_chat(usr, "<font color='red'>Error: Start Now: Game has already started.</font>")
return 0
/datum/admins/proc/toggleenter()
@@ -639,9 +639,9 @@ var/global/nologevent = 0
enter_allowed = !( enter_allowed )
if (!( enter_allowed ))
world << "<B>New players may no longer enter the game.</B>"
to_chat(world, "<B>New players may no longer enter the game.</B>")
else
world << "<B>New players may now enter the game.</B>"
to_chat(world, "<B>New players may now enter the game.</B>")
log_admin("[key_name(usr)] toggled new player game entering.")
message_admins("[key_name_admin(usr)] toggled new player game entering.", 1)
world.update_status()
@@ -657,9 +657,9 @@ var/global/nologevent = 0
config.allow_ai = !( config.allow_ai )
if (!( config.allow_ai ))
world << "<B>The AI job is no longer chooseable.</B>"
to_chat(world, "<B>The AI job is no longer chooseable.</B>")
else
world << "<B>The AI job is chooseable now.</B>"
to_chat(world, "<B>The AI job is chooseable now.</B>")
message_admins("[key_name_admin(usr)] toggled AI allowed.")
log_admin("[key_name(usr)] toggled AI allowed.")
world.update_status()
@@ -675,9 +675,9 @@ var/global/nologevent = 0
abandon_allowed = !( abandon_allowed )
if (abandon_allowed)
world << "<B>You may now respawn.</B>"
to_chat(world, "<B>You may now respawn.</B>")
else
world << "<B>You may no longer respawn :(</B>"
to_chat(world, "<B>You may no longer respawn :(</B>")
message_admins("[key_name_admin(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].", 1)
log_admin("[key_name(usr)] toggled respawn to [abandon_allowed ? "On" : "Off"].")
world.update_status()
@@ -711,10 +711,10 @@ var/global/nologevent = 0
return //alert("Round end delayed", null, null, null, null, null)
going = !( going )
if (!( going ))
world << "<b>The game start has been delayed.</b>"
to_chat(world, "<b>The game start has been delayed.</b>")
log_admin("[key_name(usr)] delayed the game.")
else
world << "<b>The game will start soon.</b>"
to_chat(world, "<b>The game will start soon.</b>")
log_admin("[key_name(usr)] removed the delay.")
feedback_add_details("admin_verb","DELAY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -802,10 +802,10 @@ var/global/nologevent = 0
return
if(!istype(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
if(!M.mind)
usr << "This mob has no mind!"
to_chat(usr, "This mob has no mind!")
return
M.mind.edit_memory()
@@ -821,9 +821,9 @@ var/global/nologevent = 0
guests_allowed = !( guests_allowed )
if (!( guests_allowed ))
world << "<B>Guests may no longer enter the game.</B>"
to_chat(world, "<B>Guests may no longer enter the game.</B>")
else
world << "<B>Guests may now enter the game.</B>"
to_chat(world, "<B>Guests may now enter the game.</B>")
log_admin("[key_name(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.")
message_admins("\blue [key_name_admin(usr)] toggled guests game entering [guests_allowed?"":"dis"]allowed.", 1)
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -833,25 +833,27 @@ var/global/nologevent = 0
for(var/mob/living/silicon/S in mob_list)
ai_number++
if(isAI(S))
usr << "<b>AI [key_name(S, usr)]'s laws:</b>"
to_chat(usr, "<b>AI [key_name(S, usr)]'s laws:</b>")
else if(isrobot(S))
var/mob/living/silicon/robot/R = S
usr << "<b>CYBORG [key_name(S, usr)]'s [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independent)"] laws:</b>"
to_chat(usr, "<b>CYBORG [key_name(S, usr)]'s [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independent)"] laws:</b>")
else if (ispAI(S))
var/mob/living/silicon/pai/P = S
usr << "<b>pAI [key_name(S, usr)]'s laws:</b>"
usr << "[P.pai_law0]"
if(P.pai_laws) usr << "[P.pai_laws]"
to_chat(usr, "<b>pAI [key_name(S, usr)]'s laws:</b>")
to_chat(usr, "[P.pai_law0]")
if(P.pai_laws)
to_chat(usr, "[P.pai_laws]")
continue // Skip showing normal silicon laws for pAIs - they don't have any
else
usr << "<b>SILICON [key_name(S, usr)]'s laws:</b>"
to_chat(usr, "<b>SILICON [key_name(S, usr)]'s laws:</b>")
if (S.laws == null)
usr << "[key_name(S, usr)]'s laws are null. Contact a coder."
to_chat(usr, "[key_name(S, usr)]'s laws are null. Contact a coder.")
else
S.laws.show_laws(usr)
if(!ai_number)
usr << "<b>No AI's located.</b>" //Just so you know the thing is actually working and not just ignoring you.
to_chat(usr, "<b>No AI's located.</b>")//Just so you know the thing is actually working and not just ignoring you.
log_admin("[key_name(usr)] checked the AI laws")
message_admins("[key_name_admin(usr)] checked the AI laws")
@@ -932,7 +934,7 @@ var/gamma_ship_location = 1 // 0 = station , 1 = space
if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk
continue
if(message)
C << message
to_chat(C, message)
kicked_client_names.Add("[C.ckey]")
del(C)
return kicked_client_names
+10 -10
View File
@@ -23,7 +23,7 @@
if(!message) return
var/F = investigate_subject2file(subject)
if(!F) return
F << "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>"
to_chat(F, "<small>[time_stamp()] \ref[src] ([x],[y],[z])</small> || [src] [message]<br>")
//ADMINVERBS
/client/proc/investigate_show( subject in list("hrefs","notes","pda","singulo","atmos","watchlist","ntsl","gold core","cult", "experimentor", "wires") )
@@ -34,7 +34,7 @@
if("singulo") //general one-round-only stuff
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>"
to_chat(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")
@@ -43,51 +43,51 @@
if(href_logfile)
src << browse(href_logfile,"window=investigate[subject];size=800x300")
else
src << "<font color='red'>Error: admin_investigate: No href logfile found.</font>"
to_chat(src, "<font color='red'>Error: admin_investigate: No href logfile found.</font>")
return
else
src << "<font color='red'>Error: admin_investigate: Href Logging is not on.</font>"
to_chat(src, "<font color='red'>Error: admin_investigate: Href Logging is not on.</font>")
return
if("pda") //general one-round-only stuff
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>"
to_chat(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("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>"
to_chat(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>"
to_chat(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>"
to_chat(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("experimentor")
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>"
to_chat(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("wires")
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>"
to_chat(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")
+8 -9
View File
@@ -1,10 +1,10 @@
/client/proc/admin_memo()
set name = "Memo"
set category = "Server"
if(!check_rights(R_SERVER))
if(!check_rights(R_SERVER))
return
if(!dbcon.IsConnected())
src << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return
var/memotask = input(usr,"Choose task.","Memo") in list("Show","Write","Edit","Remove")
if(!memotask)
@@ -17,7 +17,7 @@
if(!task)
return
if(!dbcon.IsConnected())
src << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return
var/sql_ckey = sanitizeSQL(src.ckey)
switch(task)
@@ -28,7 +28,7 @@
log_game("SQL ERROR obtaining ckey from memo table. Error : \[[err]\]\n")
return
if(query_memocheck.NextRow())
src << "You already have set a memo."
to_chat(src, "You already have set a memo.")
return
var/memotext = input(src,"Write your Memo","Memo") as message
if(!memotext)
@@ -53,7 +53,7 @@
var/lkey = query_memolist.item[1]
memolist += "[lkey]"
if(!memolist.len)
src << "No memos found in database."
to_chat(src, "No memos found in database.")
return
var/target_ckey = input(src, "Select whose memo to edit", "Select memo") as null|anything in memolist
if(!target_ckey)
@@ -100,9 +100,9 @@
output += "<br><span class='memoedit'>Last edit by [last_editor] <A href='?_src_=holder;memoeditlist=[ckey]'>(Click here to see edit log)</A></span>"
output += "<br>[memotext]</span><br>"
if(!output && !silent)
src << "No memos found in database."
to_chat(src, "No memos found in database.")
return
src << output
to_chat(src, output)
if("Remove")
var/DBQuery/query_memodellist = dbcon.NewQuery("SELECT ckey FROM [format_table_name("memo")]")
if(!query_memodellist.Execute())
@@ -114,7 +114,7 @@
var/ckey = query_memodellist.item[1]
memolist += "[ckey]"
if(!memolist.len)
src << "No memos found in database."
to_chat(src, "No memos found in database.")
return
var/target_ckey = input(src, "Select whose memo to delete", "Select memo") as null|anything in memolist
if(!target_ckey)
@@ -131,4 +131,3 @@
else
log_admin("[key_name(src)] has removed [target_sql_ckey]'s memo.")
message_admins("[key_name_admin(src)] has removed [target_sql_ckey]'s memo.")
+2 -2
View File
@@ -14,7 +14,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(!length(line)) continue
if(copytext(line,1,2) == "#") continue
var/list/List = text2list(line,"+")
var/list/List = splittext(line,"+")
if(!List.len) continue
var/rank = ckeyEx(List[1])
@@ -78,7 +78,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(copytext(line,1,2) == "#") continue
//Split the line at every "-"
var/list/List = text2list(line, "-")
var/list/List = splittext(line, "-")
if(!List.len) continue
//ckey is before the first "-"
+36 -77
View File
@@ -70,7 +70,6 @@ var/list/admin_verbs_admin = list(
/client/proc/secrets,
/client/proc/change_human_appearance_admin, /* Allows an admin to change the basic appearance of human-based mobs */
/client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */
/client/proc/virus_2_creator,
/client/proc/debug_variables
)
var/list/admin_verbs_ban = list(
@@ -259,7 +258,7 @@ var/list/admin_verbs_proccall = list (
remove_admin_verbs()
verbs += /client/proc/show_verbs
src << "<span class='interface'>Almost all of your adminverbs have been hidden.</span>"
to_chat(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
@@ -273,7 +272,7 @@ var/list/admin_verbs_proccall = list (
verbs -= /client/proc/show_verbs
add_admin_verbs()
src << "<span class='interface'>All of your adminverbs are now visible.</span>"
to_chat(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()
@@ -291,7 +290,7 @@ var/list/admin_verbs_proccall = list (
log_admin("[key_name(usr)] re-entered their body")
feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else if(istype(mob,/mob/new_player))
src << "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or observe first.</font>"
to_chat(src, "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or observe first.</font>")
else
//ghostize
var/mob/body = mob
@@ -312,11 +311,11 @@ var/list/admin_verbs_proccall = list (
if(mob)
if(mob.invisibility == INVISIBILITY_OBSERVER)
mob.invisibility = initial(mob.invisibility)
mob << "<span class='danger'>Invisimin off. Invisibility reset.</span>"
to_chat(mob, "<span class='danger'>Invisimin off. Invisibility reset.</span>")
//TODO: Make some kind of indication for the badmin that they are currently invisible
else
mob.invisibility = INVISIBILITY_OBSERVER
mob << "<span class='notice'>Invisimin on. You are now as invisible as a ghost.</span>"
to_chat(mob, "<span class='notice'>Invisimin on. You are now as invisible as a ghost.</span>")
/client/proc/player_panel()
set name = "Player Panel"
@@ -475,7 +474,7 @@ var/list/admin_verbs_proccall = list (
if(!warned_ckey || !istext(warned_ckey)) return
if(warned_ckey in admin_datums)
usr << "<font color='red'>Error: warn(): You can't warn admins.</font>"
to_chat(usr, "<font color='red'>Error: warn(): You can't warn admins.</font>")
return
var/datum/preferences/D
@@ -484,7 +483,7 @@ var/list/admin_verbs_proccall = list (
else D = preferences_datums[warned_ckey]
if(!D)
src << "<font color='red'>Error: warn(): No such ckey found.</font>"
to_chat(src, "<font color='red'>Error: warn(): No such ckey found.</font>")
return
if(++D.warns >= MAX_WARNS) //uh ohhhh...you'reee iiiiin trouuuubble O:)
@@ -492,7 +491,7 @@ var/list/admin_verbs_proccall = list (
if(C)
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban")
log_admin("[key_name(src)] has warned [key_name(C)] resulting in a [AUTOBANTIME] minute ban")
C << "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes."
to_chat(C, "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.")
del(C)
else
message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban")
@@ -501,7 +500,7 @@ var/list/admin_verbs_proccall = list (
feedback_inc("ban_warn",1)
else
if(C)
C << "<font color='red'><BIG><B>You have been formally warned by an administrator.</B></BIG><br>Further warnings will result in an autoban.</font>"
to_chat(C, "<font color='red'><BIG><B>You have been formally warned by an administrator.</B></BIG><br>Further warnings will result in an autoban.</font>")
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)]. They have [MAX_WARNS-D.warns] strikes remaining.")
log_admin("[key_name(src)] has warned [key_name(C)]. They have [MAX_WARNS-D.warns] strikes remaining.")
else
@@ -576,43 +575,16 @@ var/list/admin_verbs_proccall = list (
log_admin("[key_name(usr)] gave [key_name(T)] the spell [S].")
message_admins("[key_name_admin(usr)] gave [key_name(T)] the spell [S].", 1)
/client/proc/give_disease2(mob/T as mob in mob_list) // -- Giacom
/client/proc/give_disease(mob/T in mob_list)
set category = "Event"
set name = "Give Disease"
set desc = "Gives a Disease to a mob."
if(!check_rights(R_EVENT))
return
var/datum/disease2/disease/D = new /datum/disease2/disease()
var/severity = 1
var/greater = input("Is this a lesser, greater, or badmin disease?", "Give Disease") in list("Lesser", "Greater", "Badmin")
switch(greater)
if ("Lesser") severity = 1
if ("Greater") severity = 2
if ("Badmin") severity = 99
D.makerandom(severity)
D.spreadtype = input("What method of contagion should the disease have?", "Give Disease") in list("Airborne","Contact","Injection")
D.infectionchance = input("How virulent is this disease? (1-100)", "Give Disease", D.infectionchance) as num
if(istype(T,/mob/living/carbon/human))
var/mob/living/carbon/human/H = T
if (H.species)
D.affected_species = list(H.species.name)
if(H.species.primitive_form)
D.affected_species |= H.species.primitive_form
if(H.species.greater_form)
D.affected_species |= H.species.greater_form
infect_virus2(T,D,1)
feedback_add_details("admin_verb","GD2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].")
message_admins("[key_name_admin(usr)] gave [key_name(T)] a [greater] disease2 with infection chance [D.infectionchance].")
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in diseases
if(!D) return
T.ForceContractDisease(new D)
feedback_add_details("admin_verb","GD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] gave [key_name(T)] the disease [D].")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] gave [key_name(T)] the disease [D].</span>")
/client/proc/make_sound(var/obj/O in view()) // -- TLE
set category = "Event"
@@ -671,10 +643,10 @@ var/list/admin_verbs_proccall = list (
if(air_processing_killed)
air_processing_killed = 0
usr << "<b>Enabled air processing.</b>"
to_chat(usr, "<b>Enabled air processing.</b>")
else
air_processing_killed = 1
usr << "<b>Disabled air processing.</b>"
to_chat(usr, "<b>Disabled air processing.</b>")
feedback_add_details("admin_verb","KA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] used 'kill air'.")
message_admins("\blue [key_name_admin(usr)] used 'kill air'.", 1)
@@ -691,7 +663,7 @@ var/list/admin_verbs_proccall = list (
deadmin()
verbs += /client/proc/readmin
deadmins += ckey
src << "<span class='interface'>You are now a normal player.</span>"
to_chat(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()
@@ -705,7 +677,7 @@ var/list/admin_verbs_proccall = list (
//load text from file
var/list/Lines = file2list("config/admins.txt")
for(var/line in Lines)
var/list/splitline = text2list(line, " - ")
var/list/splitline = splittext(line, " - ")
if(n_lower(splitline[1]) == ckey)
if(splitline.len >= 2)
rank = ckeyEx(splitline[2])
@@ -714,7 +686,7 @@ var/list/admin_verbs_proccall = list (
else
if(!dbcon.IsConnected())
message_admins("Warning, MySQL database is not connected.")
src << "Warning, MYSQL database is not connected."
to_chat(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]'")
@@ -725,7 +697,7 @@ var/list/admin_verbs_proccall = list (
if(config.admin_legacy_system)
if(admin_ranks[rank] == null)
error("Error while re-adminning [src], admin rank ([rank]) does not exist.")
src << "Error while re-adminning, admin rank ([rank]) does not exist."
to_chat(src, "Error while re-adminning, admin rank ([rank]) does not exist.")
return
D = new(rank, admin_ranks[rank], ckey)
@@ -738,10 +710,10 @@ var/list/admin_verbs_proccall = list (
var/admin_rank = query.item[2]
var/flags = query.item[3]
if(!admin_ckey)
src << "Error while re-adminning, ckey [admin_ckey] was not found in the admin database."
to_chat(src, "Error while re-adminning, ckey [admin_ckey] was not found in the admin database.")
return
if(admin_rank == "Removed") //This person was de-adminned. They are only in the admin list for archive purposes.
src << "Error while re-adminning, ckey [admin_ckey] is not an admin."
to_chat(src, "Error while re-adminning, ckey [admin_ckey] is not an admin.")
return
if(istext(flags))
@@ -756,7 +728,7 @@ var/list/admin_verbs_proccall = list (
feedback_add_details("admin_verb","RAS")
return
else
src << "You are already an admin."
to_chat(src, "You are already an admin.")
verbs -= /client/proc/readmin
deadmins -= ckey
return
@@ -771,10 +743,10 @@ var/list/admin_verbs_proccall = list (
if(config)
if(config.log_hrefs)
config.log_hrefs = 0
src << "<b>Stopped logging hrefs</b>"
to_chat(src, "<b>Stopped logging hrefs</b>")
else
config.log_hrefs = 1
src << "<b>Started logging hrefs</b>"
to_chat(src, "<b>Started logging hrefs</b>")
/client/proc/check_ai_laws()
set name = "Check AI Laws"
@@ -848,7 +820,7 @@ var/list/admin_verbs_proccall = list (
return
if(!H.client)
usr << "Only mobs with clients can alter their own appearance."
to_chat(usr, "Only mobs with clients can alter their own appearance.")
return
switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
@@ -860,19 +832,6 @@ var/list/admin_verbs_proccall = list (
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 1)
feedback_add_details("admin_verb","CMAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/virus_2_creator()
set name = "Virus2 Creator"
set desc = "Allows you to create and spread custom viruses."
set category = "Admin"
if(!check_rights(R_ADMIN))
return
var/datum/nano_module/virus2/virus2 = new()
virus2.ui_interact(usr, state = admin_state)
log_and_message_admins("has opened the virus2 creator.")
feedback_add_details("admin_verb","VS2C")
/client/proc/free_slot()
set name = "Free Job Slot"
set category = "Admin"
@@ -885,7 +844,7 @@ var/list/admin_verbs_proccall = list (
if (J.current_positions >= J.total_positions && J.total_positions != -1)
jobs += J.title
if (!jobs.len)
usr << "There are no fully staffed jobs."
to_chat(usr, "There are no fully staffed jobs.")
return
var/job = input("Please select job slot to free", "Free Job Slot") as null|anything in jobs
if (job)
@@ -903,9 +862,9 @@ var/list/admin_verbs_proccall = list (
prefs.toggles ^= CHAT_ATTACKLOGS
prefs.save_preferences(src)
if (prefs.toggles & CHAT_ATTACKLOGS)
usr << "You now will get attack log messages"
to_chat(usr, "You now will get attack log messages")
else
usr << "You now won't get attack log messages"
to_chat(usr, "You now won't get attack log messages")
/client/proc/toggledrones()
set name = "Toggle Maintenance Drones"
@@ -928,9 +887,9 @@ var/list/admin_verbs_proccall = list (
prefs.toggles ^= CHAT_DEBUGLOGS
prefs.save_preferences(src)
if (prefs.toggles & CHAT_DEBUGLOGS)
usr << "You now will get debug log messages"
to_chat(usr, "You now will get debug log messages")
else
usr << "You now won't get debug log messages"
to_chat(usr, "You now won't get debug log messages")
/client/proc/man_up(mob/T as mob in mob_list)
set category = "Admin"
@@ -940,8 +899,8 @@ var/list/admin_verbs_proccall = list (
if(!check_rights(R_ADMIN))
return
T << "<span class='notice'><b><font size=3>Man up and deal with it.</font></b></span>"
T << "<span class='notice'>Move on.</span>"
to_chat(T, "<span class='notice'><b><font size=3>Man up and deal with it.</font></b></span>")
to_chat(T, "<span class='notice'>Move on.</span>")
log_admin("[key_name(usr)] told [key_name(T)] to man up and deal with it.")
message_admins("[key_name_admin(usr)] told [key_name(T)] to man up and deal with it.")
@@ -958,7 +917,7 @@ var/list/admin_verbs_proccall = list (
if(confirm == "Yes")
for (var/mob/T as mob in mob_list)
T << "<br><center><span class='notice'><b><font size=4>Man up.<br> Deal with it.</font></b><br>Move on.</span></center><br>"
to_chat(T, "<br><center><span class='notice'><b><font size=4>Man up.<br> Deal with it.</font></b><br>Move on.</span></center><br>")
T << 'sound/voice/ManUp1.ogg'
log_admin("[key_name(usr)] told everyone to man up and deal with it.")
+2 -2
View File
@@ -32,7 +32,7 @@ DEBUG
set name = "list all appearances"
for(var/s in appearance_keylist)
world << s
to_chat(world, s)
/mob/verb/reload_appearances()
set name = "reload appearances"
@@ -69,7 +69,7 @@ DEBUG
/proc/appearance_savebanfile()
var/savefile/S=new("data/appearance_full.ban")
S["keys[0]"] << appearance_keylist
to_chat(S["keys[0]"], appearance_keylist)
/proc/appearance_unban(mob/M)
appearance_remove("[M.ckey]")
+2 -2
View File
@@ -40,7 +40,7 @@ DEBUG
set name = "list all jobbans"
for(var/s in jobban_keylist)
world << s
to_chat(world, s)
/mob/verb/reload_jobbans()
set name = "reload jobbans"
@@ -92,7 +92,7 @@ DEBUG
/proc/jobban_savebanfile()
var/savefile/S=new("data/job_full.ban")
S["keys[0]"] << jobban_keylist
to_chat(S["keys[0]"], jobban_keylist)
/proc/jobban_unban(mob/M, rank)
jobban_remove("[M.ckey] - [rank]")
+51 -51
View File
@@ -190,61 +190,61 @@
/datum/click_intercept/buildmode/proc/show_help(mob/user)
switch(mode)
if(BASIC_BUILDMODE)
user << "<span class='notice'>***********************************************************</span>"
user << "<span class='notice'>Left Mouse Button = Construct / Upgrade</span>"
user << "<span class='notice'>Right Mouse Button = Deconstruct / Delete / Downgrade</span>"
user << "<span class='notice'>Left Mouse Button + ctrl = R-Window</span>"
user << "<span class='notice'>Left Mouse Button + alt = Airlock</span>"
user << ""
user << "<span class='notice'>Use the button in the upper left corner to</span>"
user << "<span class='notice'>change the direction of built objects.</span>"
user << "<span class='notice'>***********************************************************</span>"
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Left Mouse Button = Construct / Upgrade</span>")
to_chat(user, "<span class='notice'>Right Mouse Button = Deconstruct / Delete / Downgrade</span>")
to_chat(user, "<span class='notice'>Left Mouse Button + ctrl = R-Window</span>")
to_chat(user, "<span class='notice'>Left Mouse Button + alt = Airlock</span>")
to_chat(user, "")
to_chat(user, "<span class='notice'>Use the button in the upper left corner to</span>")
to_chat(user, "<span class='notice'>change the direction of built objects.</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
if(ADV_BUILDMODE)
user << "<span class='notice'>***********************************************************</span>"
user << "<span class='notice'>Right Mouse Button on buildmode button = Set object type</span>"
user << "<span class='notice'>Left Mouse Button on turf/obj = Place objects</span>"
user << "<span class='notice'>Right Mouse Button = Delete objects</span>"
user << ""
user << "<span class='notice'>Use the button in the upper left corner to</span>"
user << "<span class='notice'>change the direction of built objects.</span>"
user << "<span class='notice'>***********************************************************</span>"
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Set object type</span>")
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj = Place objects</span>")
to_chat(user, "<span class='notice'>Right Mouse Button = Delete objects</span>")
to_chat(user, "")
to_chat(user, "<span class='notice'>Use the button in the upper left corner to</span>")
to_chat(user, "<span class='notice'>change the direction of built objects.</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
if(VAR_BUILDMODE)
user << "<span class='notice'>***********************************************************</span>"
user << "<span class='notice'>Right Mouse Button on buildmode button = Select var(type) & value</span>"
user << "<span class='notice'>Left Mouse Button on turf/obj/mob = Set var(type) & value</span>"
user << "<span class='notice'>Right Mouse Button on turf/obj/mob = Reset var's value</span>"
user << "<span class='notice'>***********************************************************</span>"
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Select var(type) & value</span>")
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Set var(type) & value</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on turf/obj/mob = Reset var's value</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
if(THROW_BUILDMODE)
user << "<span class='notice'>***********************************************************</span>"
user << "<span class='notice'>Left Mouse Button on turf/obj/mob = Select</span>"
user << "<span class='notice'>Right Mouse Button on turf/obj/mob = Throw</span>"
user << "<span class='notice'>***********************************************************</span>"
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on turf/obj/mob = Throw</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
if(AREA_BUILDMODE)
user << "<span class='notice'>***********************************************************</span>"
user << "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>"
user << "<span class='notice'>Right Mouse Button on buildmode button = Select generator</span>"
user << "<span class='notice'>***********************************************************</span>"
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Select generator</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
if(COPY_BUILDMODE)
user << "<span class='notice'>***********************************************************</span>"
user << "<span class='notice'>Left Mouse Button on obj/turf/mob = Spawn a Copy of selected target</span>"
user << "<span class='notice'>Right Mouse Button on obj/mob = Select target to copy</span>"
user << "<span class='notice'>***********************************************************</span>"
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Left Mouse Button on obj/turf/mob = Spawn a Copy of selected target</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on obj/mob = Select target to copy</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
if(AREAEDIT_BUILDMODE)
user << "<span class='notice'>***********************************************************</span>"
user << "<span class='notice'>Left Mouse Button on obj/turf/mob = Paint area</span>"
user << "<span class='notice'>Right Mouse Button on obj/turf/mob = Select area to paint</span>"
user << "<span class='notice'>Right Mouse Button on buildmode button = Create new area</span>"
user << "<span class='notice'>***********************************************************</span>"
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Left Mouse Button on obj/turf/mob = Paint area</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on obj/turf/mob = Select area to paint</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Create new area</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
if(FILL_BUILDMODE)
user << "<span class='notice'>***********************************************************</span>"
user << "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>"
user << "<span class='notice'>Right Mouse Button on buildmode button = Select object type</span>"
user << "<span class='notice'>***********************************************************</span>"
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Left Mouse Button on turf/obj/mob = Select corner</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on buildmode button = Select object type</span>")
to_chat(user, "<span class='notice'>***********************************************************</span>")
if(LINK_BUILDMODE)
user << "<span class='notice'>***********************************************************</span>"
user << "<span class='notice'>Left Mouse Button on obj = Select button to link</span>"
user << "<span class='notice'>Right Mouse Button on obj = Link/unlink to selected button"
user << "<span class='notice'>***********************************************************</span>"
to_chat(user, "<span class='notice'>***********************************************************</span>")
to_chat(user, "<span class='notice'>Left Mouse Button on obj = Select button to link</span>")
to_chat(user, "<span class='notice'>Right Mouse Button on obj = Link/unlink to selected button")
to_chat(user, "<span class='notice'>***********************************************************</span>")
/datum/click_intercept/buildmode/proc/change_settings(mob/user)
switch(mode)
@@ -442,13 +442,13 @@
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [valueholder]")
object.vars[varholder] = valueholder
else
user << "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>"
to_chat(user, "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>")
if(right_click)
if(object.vars.Find(varholder))
log_admin("Build Mode: [key_name(user)] modified [object.name]'s [varholder] to [valueholder]")
object.vars[varholder] = initial(object.vars[varholder])
else
user << "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>"
to_chat(user, "<span class='warning'>[initial(object.name)] does not have a var called '[varholder]'</span>")
if(THROW_BUILDMODE)
if(left_click)
@@ -468,7 +468,7 @@
if(left_click) //rectangular
if(cornerA && cornerB)
if(!generator_path)
user << "<span class='warning'>Select generator type first.</span>"
to_chat(user, "<span class='warning'>Select generator type first.</span>")
else
var/datum/mapGenerator/G = new generator_path
G.defineRegion(cornerA.loc,cornerB.loc,1)
@@ -485,7 +485,7 @@
DuplicateObject(stored, perfectcopy=1, sameloc=0,newloc=T)
else if(right_click)
if(ismovableatom(object)) // No copying turfs for now.
user << "<span class='notice'>[object] set as template.</span>"
to_chat(user, "<span class='notice'>[object] set as template.</span>")
stored = object
if(AREAEDIT_BUILDMODE)
if(left_click)
+1 -1
View File
@@ -2,7 +2,7 @@
/datum/admins/proc/create_mob(var/mob/user)
if (!create_mob_html)
var/mobjs = null
mobjs = list2text(typesof(/mob), ";")
mobjs = jointext(typesof(/mob), ";")
create_mob_html = file2text('html/create_object.html')
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
+2 -2
View File
@@ -4,7 +4,7 @@ var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/e
/datum/admins/proc/create_object(var/mob/user)
if (!create_object_html)
var/objectjs = null
objectjs = list2text(typesof(/obj), ";")
objectjs = jointext(typesof(/obj), ";")
create_object_html = file2text('html/create_object.html')
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
@@ -15,7 +15,7 @@ var/list/create_object_forms = list(/obj, /obj/structure, /obj/machinery, /obj/e
var/html_form = create_object_forms[path]
if (!html_form)
var/objectjs = list2text(typesof(path), ";")
var/objectjs = jointext(typesof(path), ";")
html_form = file2text('html/create_object.html')
html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"")
create_object_forms[path] = html_form
+5 -5
View File
@@ -4,7 +4,7 @@
if(!check_rights(R_PERMISSIONS))
return
if(!dbcon.IsConnected())
src << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return
var/returned = create_poll_function()
if(returned)
@@ -26,7 +26,7 @@
log_admin("[key_name(usr)] has created a new server poll. Poll Type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]")
message_admins("[key_name_admin(usr)] has created a new server poll. Poll Type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]<br>Question: [question]")
else
src << "Poll question created without any options, poll will be deleted."
to_chat(src, "Poll question created without any options, poll will be deleted.")
var/DBQuery/query_del_poll = dbcon.NewQuery("DELETE FROM [format_table_name("poll_question")] WHERE id = [returned]")
if(!query_del_poll.Execute())
var/err = query_del_poll.ErrorMsg()
@@ -63,7 +63,7 @@
if(query_validate_time.NextRow())
endtime = query_validate_time.item[1]
if(!endtime)
src << "Datetime entered is invalid."
to_chat(src, "Datetime entered is invalid.")
return
var/DBQuery/query_time_later = dbcon.NewQuery("SELECT TIMESTAMP('[endtime]') < NOW()")
if(!query_time_later.Execute())
@@ -73,7 +73,7 @@
if(query_time_later.NextRow())
var/checklate = text2num(query_time_later.item[1])
if(checklate)
src << "Datetime entered is not later than current server time."
to_chat(src, "Datetime entered is not later than current server time.")
return
var/adminonly
switch(alert("Admin only poll?",,"Yes","No","Cancel"))
@@ -132,7 +132,7 @@
if(!maxval)
return pollid
if(minval >= maxval)
src << "Minimum rating value can't be more than maximum rating value"
to_chat(src, "Minimum rating value can't be more than maximum rating value")
return pollid
descmin = input("Optional: Set description for minimum rating","Minimum rating description") as message|null
if(descmin)
+1 -1
View File
@@ -2,7 +2,7 @@
/datum/admins/proc/create_turf(var/mob/user)
if (!create_turf_html)
var/turfjs = null
turfjs = list2text(typesof(/turf), ";")
turfjs = jointext(typesof(/turf), ";")
create_turf_html = file2text('html/create_object.html')
create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
+4 -4
View File
@@ -47,7 +47,7 @@ generally it would be used like so:
proc/admin_proc()
if(!check_rights(R_ADMIN)) return
world << "you have enough rights!"
to_chat(world, "you have enough rights!")
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
@@ -60,13 +60,13 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
return 1
else
if(show_msg)
user << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
to_chat(user, "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>")
else
if(user.client.holder)
return 1
else
if(show_msg)
user << "<font color='red'>Error: You are not an admin.</font>"
to_chat(user, "<font color='red'>Error: You are not an admin.</font>")
return 0
//probably a bit iffy - will hopefully figure out a better solution
@@ -78,7 +78,7 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
if(usr.client.holder.rights != other.holder.rights)
if( (usr.client.holder.rights & other.holder.rights) == other.holder.rights )
return 1 //we have all the rights they have and more
usr << "<font color='red'>Error: Cannot proceed. They have more or equal rights to us.</font>"
to_chat(usr, "<font color='red'>Error: Cannot proceed. They have more or equal rights to us.</font>")
return 0
/client/proc/deadmin()
+1 -1
View File
@@ -6,7 +6,7 @@
return
if(!istype(M))
usr << "<span class='danger'>This can only be used on subtypes of /obj/machinery.</span>"
to_chat(usr, "<span class='danger'>This can only be used on subtypes of /obj/machinery.</span>")
return
var/new_rating = input("Enter new rating:","Num") as num
+23 -23
View File
@@ -141,19 +141,19 @@ var/savefile/Banlistjob
Banlistjob.cd = "/base"
if ( Banlistjob.dir.Find("[ckey][computerid][rank]") )
usr << text("\red Banjob already exists.")
to_chat(usr, text("\red Banjob already exists."))
return 0
else
Banlistjob.dir.Add("[ckey][computerid][rank]")
Banlistjob.cd = "/base/[ckey][computerid][rank]"
Banlistjob["key"] << ckey
Banlistjob["id"] << computerid
Banlistjob["rank"] << rank
Banlistjob["reason"] << reason
Banlistjob["bannedby"] << bannedby
Banlistjob["temp"] << temp
to_chat(Banlistjob["key"], ckey)
to_chat(Banlistjob["id"], computerid)
to_chat(Banlistjob["rank"], rank)
to_chat(Banlistjob["reason"], reason)
to_chat(Banlistjob["bannedby"], bannedby)
to_chat(Banlistjob["temp"], temp)
if (temp)
Banlistjob["minutes"] << bantimestamp
to_chat(Banlistjob["minutes"], bantimestamp)
return 1
@@ -219,22 +219,22 @@ var/savefile/Banlistjob
/*/datum/admins/proc/permjobban(ckey, computerid, reason, bannedby, temp, minutes, rank)
if(AddBanjob(ckey, computerid, reason, usr.ckey, 0, 0, job))
M << "\red<BIG><B>You have been banned from [job] by [usr.client.ckey].\nReason: [reason].</B></BIG>"
M << "\red This is a permanent ban."
to_chat(M, "\red<BIG><B>You have been banned from [job] by [usr.client.ckey].\nReason: [reason].</B></BIG>")
to_chat(M, "\red This is a permanent ban.")
if(config.banappeals)
M << "\red To try to resolve this matter head to [config.banappeals]"
to_chat(M, "\red To try to resolve this matter head to [config.banappeals]")
else
M << "\red No ban appeals URL has been set."
to_chat(M, "\red No ban appeals URL has been set.")
log_admin("[usr.client.ckey] has banned from [job] [ckey].\nReason: [reason]\nThis is a permanent ban.")
message_admins("\blue[usr.client.ckey] has banned from [job] [ckey].\nReason: [reason]\nThis is a permanent ban.")
/datum/admins/proc/timejobban(ckey, computerid, reason, bannedby, temp, minutes, rank)
if(AddBanjob(ckey, computerid, reason, usr.ckey, 1, mins, job))
M << "\red<BIG><B>You have been jobbanned from [job] by [usr.client.ckey].\nReason: [reason].</B></BIG>"
M << "\red This is a temporary ban, it will be removed in [mins] minutes."
to_chat(M, "\red<BIG><B>You have been jobbanned from [job] by [usr.client.ckey].\nReason: [reason].</B></BIG>")
to_chat(M, "\red This is a temporary ban, it will be removed in [mins] minutes.")
if(config.banappeals)
M << "\red To try to resolve this matter head to [config.banappeals]"
to_chat(M, "\red To try to resolve this matter head to [config.banappeals]")
else
M << "\red No ban appeals URL has been set."
to_chat(M, "\red No ban appeals URL has been set.")
log_admin("[usr.client.ckey] has jobbanned from [job] [ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
message_admins("\blue[usr.client.ckey] has banned from [job] [ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")*/
//////////////////////////////////// DEBUG ////////////////////////////////////
@@ -253,17 +253,17 @@ var/savefile/Banlistjob
Banlistjob.cd = "/base"
Banlistjob.dir.Add("trash[i]trashid[i]")
Banlistjob.cd = "/base/trash[i]trashid[i]"
Banlistjob["key"] << "trash[i]"
to_chat(Banlistjob["key"], "trash[i]")
else
Banlistjob.cd = "/base"
Banlistjob.dir.Add("[last]trashid[i]")
Banlistjob.cd = "/base/[last]trashid[i]"
Banlistjob["key"] << last
Banlistjob["id"] << "trashid[i]"
Banlistjob["reason"] << "Trashban[i]."
Banlistjob["temp"] << a
Banlistjob["minutes"] << CMinutes + rand(1,2000)
Banlistjob["bannedby"] << "trashmin"
to_chat(Banlistjob["key"], last)
to_chat(Banlistjob["id"], "trashid[i]")
to_chat(Banlistjob["reason"], "Trashban[i].")
to_chat(Banlistjob["temp"], a)
to_chat(Banlistjob["minutes"], CMinutes + rand(1,2000))
to_chat(Banlistjob["bannedby"], "trashmin")
last = "trash[i]"
Banlistjob.cd = "/base"
@@ -63,7 +63,7 @@
establish_db_connection()
if(!dbcon.IsConnected())
usr << "\red Failed to establish database connection"
to_chat(usr, "\red Failed to establish database connection")
return
if(!adm_ckey || !new_rank)
@@ -91,14 +91,14 @@
insert_query.Execute()
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."
to_chat(usr, "\blue New admin added.")
else
if(!isnull(admin_id) && isnum(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`.[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."
to_chat(usr, "\blue Admin rank changed.")
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
if(config.admin_legacy_system)
@@ -112,7 +112,7 @@
establish_db_connection()
if(!dbcon.IsConnected())
usr << "\red Failed to establish database connection"
to_chat(usr, "\red Failed to establish database connection")
return
if(!adm_ckey || !new_permission)
@@ -146,13 +146,13 @@
insert_query.Execute()
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."
to_chat(usr, "\blue Permission removed.")
else //This admin doesn't have this permission, so we are adding it.
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`.[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."
to_chat(usr, "\blue Permission added.")
/datum/admins/proc/updateranktodb(ckey,newrank)
establish_db_connection()
+4 -70
View File
@@ -2,7 +2,7 @@
if(checkrights && !check_rights(R_ADMIN|R_MOD))
return
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
if(!target_ckey)
var/new_ckey = ckey(input(usr,"Who would you like to add a note for?","Enter a ckey",null) as text|null)
@@ -15,7 +15,7 @@
log_game("SQL ERROR obtaining ckey from player table. Error : \[[err]\]\n")
return
if(!query_find_ckey.NextRow())
usr << "<span class='redtext'>[new_ckey] has not been seen before, you can only add notes to known players.</span>"
to_chat(usr, "<span class='redtext'>[new_ckey] has not been seen before, you can only add notes to known players.</span>")
return
else
target_ckey = new_ckey
@@ -53,7 +53,7 @@
var/notetext
var/adminckey
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
if(!note_id)
return
@@ -80,7 +80,7 @@
if(!check_rights(R_ADMIN|R_MOD))
return
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
to_chat(usr, "<span class='danger'>Failed to establish database connection.</span>")
return
if(!note_id)
return
@@ -177,73 +177,7 @@
output += "<center><a href='?_src_=holder;addnoteempty=1'>\[Add Note\]</a></center>"
output += ruler
usr << browse(output, "window=show_notes;size=900x500")
/proc/regex_note_sql_extract(str, exp)
return new /datum/regex(str, exp, call(LIBREGEX_LIBRARY, "regEx_find")(str, exp))
// If the AUTOCONVERT_NOTES is turned on, any time a player connects this will be run to try and add all their notes to the database
/proc/convert_notes_sql(ckey)
if(!ckey)
return 0
var/playerfile = "data/player_saves/[copytext(ckey, 1, 2)]/[ckey]/info.sav"
var/savefile/info = new(playerfile)
var/list/infos
info >> infos
if(!infos || !infos.len)
fdel(playerfile)
return 0
ckey = ckey
for(var/datum/player_info/I in infos)
var/notetext = I.content
var/adminckey = I.author
var/server
if (config && config.server_name)
server = config.server_name
var/timestamp = I.timestamp
var/regex = "\[A-Za-z\]+\\, (\[A-Za-z\]+) (\[0-9\]+)\[A-Za-z\]+ of (\[0-9\]+)"
var/datum/regex/results = regex_note_sql_extract(timestamp, regex)
var/month = month2number(results.str(2))
var/day = results.str(3)
var/year = results.str(4)
timestamp = "[year]-[month]-[day] 00:00:00"
add_note(ckey, notetext, timestamp, adminckey, 0, server, 0)
fdel(playerfile)
return 1
// Using this proc causes lag - you have been warned.
/proc/mass_convert_notes()
if(!check_rights(R_SERVER))
return 0
world << "Beginning mass note conversion."
var/player_notes_file = "data/player_notes.sav"
var/savefile/notesfile = new(player_notes_file)
var/list/note_keys
notesfile >> note_keys
if(!notesfile)
log_game("Error: Cannot access player_notes.sav file.")
return 0
if(!note_keys || !note_keys.len)
log_game("Error: player_notes.sav file is empty. Deleting it.")
fdel(player_notes_file)
return 0
note_keys = sortList(note_keys)
var/i = 1
for(i, i <= note_keys.len, i++)
var/ckey = note_keys[i]
convert_notes_sql(ckey)
world << "Finished mass note conversion ([i] notes converted). Remember to turn off AUTOCONVERT_NOTES."
world << "Deleting the player_notes.sav file."
fdel(player_notes_file)
return 1
/proc/show_player_info_irc(var/key as text)
var/target_sql_ckey = sanitizeSQL(key)
var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT timestamp, notetext, adminckey, server FROM [format_table_name("notes")] WHERE ckey = '[target_sql_ckey]' ORDER BY timestamp")
+20 -21
View File
@@ -21,7 +21,7 @@
return
ckey = ckey(ckey)
if (get_stickyban_from_ckey(ckey))
usr << "<span class='adminnotice'>Error: Can not add a stickyban: User already has a current sticky ban</span>"
to_chat(usr, "<span class='adminnotice'>Error: Can not add a stickyban: User already has a current sticky ban</span>")
if (data["reason"])
ban["message"] = data["reason"]
@@ -43,12 +43,12 @@
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
usr << "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>"
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>")
return
if (alert("Are you sure you want to remove the sticky ban on [ckey]?","Are you sure","Yes","No") == "No")
return
if (!get_stickyban_from_ckey(ckey))
usr << "<span class='adminnotice'>Error: The ban disappeared.</span>"
to_chat(usr, "<span class='adminnotice'>Error: The ban disappeared.</span>")
return
world.SetConfig("ban", ckey, null)
@@ -64,7 +64,7 @@
var/alt = ckey(data["alt"])
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
usr << "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>"
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!</span>")
return
var/found = 0
@@ -75,7 +75,7 @@
break
if (!found)
usr << "<span class='adminnotice'>Error: [alt] is not linked to [ckey]'s sticky ban!</span>"
to_chat(usr, "<span class='adminnotice'>Error: [alt] is not linked to [ckey]'s sticky ban!</span>")
return
if (alert("Are you sure you want to disassociate [alt] from [ckey]'s sticky ban? \nNote: Nothing stops byond from re-linking them","Are you sure","Yes","No") == "No")
@@ -84,7 +84,7 @@
//we have to do this again incase something changes
ban = get_stickyban_from_ckey(ckey)
if (!ban)
usr << "<span class='adminnotice'>Error: The ban disappeared.</span>"
to_chat(usr, "<span class='adminnotice'>Error: The ban disappeared.</span>")
return
found = 0
@@ -95,7 +95,7 @@
break
if (!found)
usr << "<span class='adminnotice'>Error: [alt] link to [ckey]'s sticky ban disappeared.</span>"
to_chat(usr, "<span class='adminnotice'>Error: [alt] link to [ckey]'s sticky ban disappeared.</span>")
return
world.SetConfig("ban",ckey,list2stickyban(ban))
@@ -109,7 +109,7 @@
var/ckey = data["ckey"]
var/ban = get_stickyban_from_ckey(ckey)
if (!ban)
usr << "<span class='adminnotice'>Error: No sticky ban for [ckey] found!"
to_chat(usr, "<span class='adminnotice'>Error: No sticky ban for [ckey] found!")
return
var/oldreason = ban["message"]
var/reason = input(usr,"Reason","Reason","[ban["message"]]") as text|null
@@ -118,7 +118,7 @@
//we have to do this again incase something changed while we waited for input
ban = get_stickyban_from_ckey(ckey)
if (!ban)
usr << "<span class='adminnotice'>Error: The ban disappeared.</span>"
to_chat(usr, "<span class='adminnotice'>Error: The ban disappeared.</span>")
return
ban["message"] = "[reason]"
@@ -126,7 +126,7 @@
log_admin("[key_name(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has edited [ckey]'s sticky ban reason from [oldreason] to [reason]</span>")
spawn(10)
stickyban_show()
@@ -147,7 +147,7 @@
/datum/admins/proc/stickyban_show()
if(!check_rights(R_BAN))
return
var/list/bans = sortList(world.GetConfig("ban"))
var/banhtml = ""
for(var/key in bans)
@@ -181,23 +181,23 @@
if (!ban)
return null
. = params2list(ban)
.["keys"] = text2list(.["keys"], ",")
.["type"] = text2list(.["type"], ",")
.["IP"] = text2list(.["IP"], ",")
.["computer_id"] = text2list(.["computer_id"], ",")
.["keys"] = splittext(.["keys"], ",")
.["type"] = splittext(.["type"], ",")
.["IP"] = splittext(.["IP"], ",")
.["computer_id"] = splittext(.["computer_id"], ",")
/proc/list2stickyban(var/list/ban)
if (!ban || !islist(ban))
return null
. = ban.Copy()
if (.["keys"])
.["keys"] = list2text(.["keys"], ",")
.["keys"] = jointext(.["keys"], ",")
if (.["type"])
.["type"] = list2text(.["type"], ",")
.["type"] = jointext(.["type"], ",")
if (.["IP"])
.["IP"] = list2text(.["IP"], ",")
.["IP"] = jointext(.["IP"], ",")
if (.["computer_id"])
.["computer_id"] = list2text(.["computer_id"], ",")
.["computer_id"] = jointext(.["computer_id"], ",")
. = list2params(.)
/client/proc/stickybanpanel()
@@ -206,6 +206,5 @@
if(!check_rights(R_BAN))
return
holder.stickyban_show()
+142 -142
View File
@@ -19,9 +19,9 @@
C << 'sound/effects/adminhelp.ogg'
C << "<font color='red' size='4'><b>- AdminHelp Rejected! -</b></font>"
C << "<font color='red'><b>Your admin help was rejected.</b></font>"
C << "Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting. If you asked a question, please ensure it was clear what you were asking."
to_chat(C, "<font color='red' size='4'><b>- AdminHelp Rejected! -</b></font>")
to_chat(C, "<font color='red'><b>Your admin help was rejected.</b></font>")
to_chat(C, "Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting. If you asked a question, please ensure it was clear what you were asking.")
message_admins("[key_name_admin(usr)] rejected [key_name_admin(C.mob)]'s admin help")
log_admin("[key_name(usr)] rejected [key_name(C.mob)]'s admin help")
@@ -34,35 +34,35 @@
if("1")
log_admin("[key_name(usr)] has spawned a traitor.")
if(!src.makeTraitors())
usr << "\red Unfortunately there weren't enough candidates available."
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("2")
log_admin("[key_name(usr)] has spawned a changeling.")
if(!src.makeChanglings())
usr << "\red Unfortunately there weren't enough candidates available."
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("3")
log_admin("[key_name(usr)] has spawned revolutionaries.")
if(!src.makeRevs())
usr << "\red Unfortunately there weren't enough candidates available."
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("4")
log_admin("[key_name(usr)] has spawned a cultists.")
if(!src.makeCult())
usr << "\red Unfortunately there weren't enough candidates available."
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("5")
log_admin("[key_name(usr)] has spawned a malf AI.")
if(!src.makeMalfAImode())
usr << "\red Unfortunately there weren't enough candidates available."
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("6")
log_admin("[key_name(usr)] has spawned a wizard.")
if(!src.makeWizard())
usr << "\red Unfortunately there weren't enough candidates available."
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("7")
log_admin("[key_name(usr)] has spawned vampires.")
if(!src.makeVampires())
usr << "\red Unfortunately there weren't enough candidates available."
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
if("8")
log_admin("[key_name(usr)] has spawned vox raiders.")
if(!src.makeVoxRaiders())
usr << "\red Unfortunately there weren't enough candidates available."
to_chat(usr, "\red Unfortunately there weren't enough candidates available.")
else if(href_list["dbsearchckey"] || href_list["dbsearchadmin"] || href_list["dbsearchip"] || href_list["dbsearchcid"] || href_list["dbsearchbantype"])
var/adminckey = href_list["dbsearchadmin"]
@@ -102,39 +102,39 @@
switch(bantype)
if(BANTYPE_PERMA)
if(!banckey || !banreason)
usr << "Not enough parameters (Requires ckey and reason)"
to_chat(usr, "Not enough parameters (Requires ckey and reason)")
return
banduration = null
banjob = null
if(BANTYPE_TEMP)
if(!banckey || !banreason || !banduration)
usr << "Not enough parameters (Requires ckey, reason and duration)"
to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)")
return
banjob = null
if(BANTYPE_JOB_PERMA)
if(!banckey || !banreason || !banjob)
usr << "Not enough parameters (Requires ckey, reason and job)"
to_chat(usr, "Not enough parameters (Requires ckey, reason and job)")
return
banduration = null
if(BANTYPE_JOB_TEMP)
if(!banckey || !banreason || !banjob || !banduration)
usr << "Not enough parameters (Requires ckey, reason and job)"
to_chat(usr, "Not enough parameters (Requires ckey, reason and job)")
return
if(BANTYPE_APPEARANCE)
if(!banckey || !banreason)
usr << "Not enough parameters (Requires ckey and reason)"
to_chat(usr, "Not enough parameters (Requires ckey and reason)")
return
banduration = null
banjob = null
if(BANTYPE_ADMIN_PERMA)
if(!banckey || !banreason)
usr << "Not enough parameters (Requires ckey and reason)"
to_chat(usr, "Not enough parameters (Requires ckey and reason)")
return
banduration = null
banjob = null
if(BANTYPE_ADMIN_TEMP)
if(!banckey || !banreason || !banduration)
usr << "Not enough parameters (Requires ckey, reason and duration)"
to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)")
return
banjob = null
@@ -172,14 +172,14 @@
var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null)
if(!new_ckey) return
if(new_ckey in admin_datums)
usr << "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>"
to_chat(usr, "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>")
return
adm_ckey = new_ckey
task = "rank"
else if(task != "show")
adm_ckey = ckey(href_list["ckey"])
if(!adm_ckey)
usr << "<font color='red'>Error: Topic 'editrights': No valid ckey</font>"
to_chat(usr, "<font color='red'>Error: Topic 'editrights': No valid ckey</font>")
return
var/datum/admins/D = admin_datums[adm_ckey]
@@ -212,7 +212,7 @@
if(config.admin_legacy_system)
new_rank = ckeyEx(new_rank)
if(!new_rank)
usr << "<font color='red'>Error: Topic 'editrights': Invalid rank</font>"
to_chat(usr, "<font color='red'>Error: Topic 'editrights': Invalid rank</font>")
return
if(config.admin_legacy_system)
if(admin_ranks.len)
@@ -306,7 +306,7 @@
var/mob/M = locate(href_list["mob"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
var/delmob = 0
@@ -400,10 +400,10 @@
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
message_admins("\blue [key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]", 1)
Banlist.cd = "/base/[banfolder]"
Banlist["reason"] << reason
Banlist["temp"] << temp
Banlist["minutes"] << minutes
Banlist["bannedby"] << usr.ckey
to_chat(Banlist["reason"], reason)
to_chat(Banlist["temp"], temp)
to_chat(Banlist["minutes"], minutes)
to_chat(Banlist["bannedby"], usr.ckey)
Banlist.cd = "/base"
feedback_inc("ban_edit",1)
unbanpanel()
@@ -415,16 +415,16 @@
return
var/mob/M = locate(href_list["appearanceban"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
if(!M.ckey) //sanity
usr << "This mob has no ckey"
to_chat(usr, "This mob has no ckey")
return
var/banreason = appearance_isbanned(M)
if(banreason)
/* if(!config.ban_legacy_system)
usr << "Unfortunately, database based unbanning cannot be done through this panel"
to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel")
DB_ban_panel(M.ckey)
return */
switch(alert("Reason: '[banreason]' Remove appearance ban?","Please Confirm","Yes","No"))
@@ -435,7 +435,7 @@
DB_ban_unban(M.ckey, BANTYPE_APPEARANCE)
appearance_unban(M)
message_admins("\blue [key_name_admin(usr)] removed [key_name_admin(M)]'s appearance ban", 1)
M << "\red<BIG><B>[usr.client.ckey] has removed your appearance ban.</B></BIG>"
to_chat(M, "\red<BIG><B>[usr.client.ckey] has removed your appearance ban.</B></BIG>")
else switch(alert("Appearance ban [M.ckey]?",,"Yes","No", "Cancel"))
if("Yes")
@@ -449,13 +449,13 @@
appearance_fullban(M, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
add_note(M.ckey, "Appearance banned - [reason]", null, usr, 0)
message_admins("\blue [key_name_admin(usr)] appearance banned [key_name_admin(M)]", 1)
M << "\red<BIG><B>You have been appearance banned by [usr.client.ckey].</B></BIG>"
M << "\red <B>The reason is: [reason]</B>"
M << "\red Appearance ban can be lifted only upon request."
to_chat(M, "\red<BIG><B>You have been appearance banned by [usr.client.ckey].</B></BIG>")
to_chat(M, "\red <B>The reason is: [reason]</B>")
to_chat(M, "\red Appearance ban can be lifted only upon request.")
if(config.banappeals)
M << "\red To try to resolve this matter head to [config.banappeals]"
to_chat(M, "\red To try to resolve this matter head to [config.banappeals]")
else
M << "\red No ban appeals URL has been set."
to_chat(M, "\red No ban appeals URL has been set.")
if("No")
return
@@ -464,14 +464,14 @@
var/mob/M = locate(href_list["jobban2"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
if(!M.ckey) //sanity
usr << "This mob has no ckey"
to_chat(usr, "This mob has no ckey")
return
if(!job_master)
usr << "Job Master has not been setup!"
to_chat(usr, "Job Master has not been setup!")
return
var/dat = ""
@@ -795,7 +795,7 @@
var/mob/M = locate(href_list["jobban4"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
if(M != usr) //we can jobban ourselves
@@ -804,7 +804,7 @@
return
if(!job_master)
usr << "Job Master has not been setup!"
to_chat(usr, "Job Master has not been setup!")
return
//get jobs for department if specified, otherwise just returnt he one job in a list.
@@ -873,7 +873,7 @@
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
if("Yes")
if(config.ban_legacy_system)
usr << "\red Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban."
to_chat(usr, "\red Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.")
return
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
if(!mins)
@@ -896,9 +896,9 @@
msg += ", [job]"
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr, 0)
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes", 1)
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>"
M << "\red <B>The reason is: [reason]</B>"
M << "\red This jobban will be lifted in [mins] minutes."
to_chat(M, "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>")
to_chat(M, "\red <B>The reason is: [reason]</B>")
to_chat(M, "\red This jobban will be lifted in [mins] minutes.")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
if("No")
@@ -916,9 +916,9 @@
else msg += ", [job]"
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr, 0)
message_admins("\blue [key_name_admin(usr)] banned [key_name_admin(M)] from [msg]", 1)
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>"
M << "\red <B>The reason is: [reason]</B>"
M << "\red Jobban can be lifted only upon request."
to_chat(M, "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG>")
to_chat(M, "\red <B>The reason is: [reason]</B>")
to_chat(M, "\red Jobban can be lifted only upon request.")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
if("Cancel")
@@ -928,7 +928,7 @@
//all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned)
if(joblist.len) //at least 1 banned job exists in joblist so we have stuff to unban.
if(!config.ban_legacy_system)
usr << "Unfortunately, database based unbanning cannot be done through this panel"
to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel")
DB_ban_panel(M.ckey)
return
var/msg
@@ -949,7 +949,7 @@
continue
if(msg)
message_admins("\blue [key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg]", 1)
M << "\red<BIG><B>You have been un-jobbanned by [usr.client.ckey] from [msg].</B></BIG>"
to_chat(M, "\red<BIG><B>You have been un-jobbanned by [usr.client.ckey] from [msg].</B></BIG>")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
return 0 //we didn't do anything!
@@ -959,7 +959,7 @@
if (ismob(M))
if(!check_if_greater_rights_than(M.client))
return
M << "\red You have been kicked from the server"
to_chat(M, "\red You have been kicked from the server")
log_admin("[key_name(usr)] booted [key_name(M)].")
message_admins("\blue [key_name_admin(usr)] booted [key_name_admin(M)].", 1)
//M.client = null
@@ -1019,7 +1019,7 @@
message_admins("\blue [key_name_admin(usr)] removed [t]", 1)
jobban_remove(t)
href_list["ban"] = 1 // lets it fall through and refresh
var/t_split = text2list(t, " - ")
var/t_split = splittext(t, " - ")
var/key = t_split[1]
var/job = t_split[2]
DB_ban_unban(ckey(key), BANTYPE_JOB_PERMA, job)
@@ -1043,15 +1043,15 @@
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.")
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>"
M << "\red This is a temporary ban, it will be removed in [mins] minutes."
to_chat(M, "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>")
to_chat(M, "\red This is a temporary ban, it will be removed in [mins] minutes.")
feedback_inc("ban_tmp",1)
DB_ban_record(BANTYPE_TEMP, M, mins, reason)
feedback_inc("ban_tmp_mins",mins)
if(config.banappeals)
M << "\red To try to resolve this matter head to [config.banappeals]"
to_chat(M, "\red To try to resolve this matter head to [config.banappeals]")
else
M << "\red No ban appeals URL has been set."
to_chat(M, "\red No ban appeals URL has been set.")
log_admin("[key_name(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
message_admins("\blue [key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
@@ -1067,12 +1067,12 @@
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
if("No")
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>"
M << "\red This is a permanent ban."
to_chat(M, "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>")
to_chat(M, "\red This is a permanent ban.")
if(config.banappeals)
M << "\red To try to resolve this matter head to [config.banappeals]"
to_chat(M, "\red To try to resolve this matter head to [config.banappeals]")
else
M << "\red No ban appeals URL has been set."
to_chat(M, "\red No ban appeals URL has been set.")
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.")
log_admin("[key_name(usr)] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
message_admins("\blue[key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
@@ -1178,7 +1178,7 @@
master_mode = href_list["c_mode2"]
log_admin("[key_name(usr)] set the mode as [master_mode].")
message_admins("\blue [key_name_admin(usr)] set the mode as [master_mode].", 1)
world << "\blue <b>The mode is now: [master_mode]</b>"
to_chat(world, "\blue <b>The mode is now: [master_mode]</b>")
Game() // updates the main game menu
world.save_mode(master_mode)
.(href, list("c_mode"=1))
@@ -1201,7 +1201,7 @@
var/mob/living/carbon/human/H = locate(href_list["monkeyone"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)]")
@@ -1214,7 +1214,7 @@
var/mob/living/carbon/human/H = locate(href_list["corgione"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
log_admin("[key_name(usr)] attempting to corgize [key_name(H)]")
@@ -1226,7 +1226,7 @@
var/mob/M = locate(href_list["forcespeech"])
if(!ismob(M))
usr << "this can only be used on instances of type /mob"
to_chat(usr, "this can only be used on instances of type /mob")
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
if(!speech) return
@@ -1243,10 +1243,10 @@
var/mob/M = locate(href_list["sendtoprison"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
usr << "This cannot be used on instances of type /mob/living/silicon/ai"
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
var/turf/prison_cell = pick(prisonwarp)
@@ -1276,7 +1276,7 @@
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(prisoner), slot_w_uniform)
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes)
M << "\red You have been sent to the prison station!"
to_chat(M, "\red You have been sent to the prison station!")
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.")
message_admins("\blue [key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1)
@@ -1287,11 +1287,11 @@
var/mob/M = locate(href_list["sendbacktolobby"])
if(!isobserver(M))
usr << "<span class='notice'>You can only send ghost players back to the Lobby.</span>"
to_chat(usr, "<span class='notice'>You can only send ghost players back to the Lobby.</span>")
return
if(!M.client)
usr << "<span class='warning'>[M] doesn't seem to have an active client.</span>"
to_chat(usr, "<span class='warning'>[M] doesn't seem to have an active client.</span>")
return
if(alert(usr, "Send [key_name(M)] back to Lobby?", "Message", "Yes", "No") != "Yes")
@@ -1312,10 +1312,10 @@
var/mob/M = locate(href_list["tdome1"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
usr << "This cannot be used on instances of type /mob/living/silicon/ai"
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
for(var/obj/item/I in M)
@@ -1329,7 +1329,7 @@
sleep(5)
M.loc = pick(tdome1)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
to_chat(M, "\blue You have been sent to the Thunderdome.")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)", 1)
@@ -1341,10 +1341,10 @@
var/mob/M = locate(href_list["tdome2"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
usr << "This cannot be used on instances of type /mob/living/silicon/ai"
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
for(var/obj/item/I in M)
@@ -1358,7 +1358,7 @@
sleep(5)
M.loc = pick(tdome2)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
to_chat(M, "\blue You have been sent to the Thunderdome.")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)", 1)
@@ -1370,17 +1370,17 @@
var/mob/M = locate(href_list["tdomeadmin"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
usr << "This cannot be used on instances of type /mob/living/silicon/ai"
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
M.Paralyse(5)
sleep(5)
M.loc = pick(tdomeadmin)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
to_chat(M, "\blue You have been sent to the Thunderdome.")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)", 1)
@@ -1392,10 +1392,10 @@
var/mob/M = locate(href_list["tdomeobserve"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
usr << "This cannot be used on instances of type /mob/living/silicon/ai"
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
for(var/obj/item/I in M)
@@ -1413,7 +1413,7 @@
sleep(5)
M.loc = pick(tdomeobserve)
spawn(50)
M << "\blue You have been sent to the Thunderdome."
to_chat(M, "\blue You have been sent to the Thunderdome.")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1)
@@ -1425,17 +1425,17 @@
var/mob/M = locate(href_list["aroomwarp"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
if(istype(M, /mob/living/silicon/ai))
usr << "This cannot be used on instances of type /mob/living/silicon/ai"
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
return
M.Paralyse(5)
sleep(5)
M.loc = pick(aroomwarp)
spawn(50)
M << "\blue You have been sent to the <b>Admin Room!</b>."
to_chat(M, "\blue You have been sent to the <b>Admin Room!</b>.")
log_admin("[key_name(usr)] has sent [key_name(M)] to the Admin Room")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the Admin Room", 1)
@@ -1445,7 +1445,7 @@
var/mob/living/L = locate(href_list["revive"])
if(!istype(L))
usr << "This can only be used on instances of type /mob/living"
to_chat(usr, "This can only be used on instances of type /mob/living")
return
L.revive()
@@ -1457,7 +1457,7 @@
var/mob/living/carbon/human/H = locate(href_list["makeai"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
message_admins("\red Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!", 1)
@@ -1478,7 +1478,7 @@
var/mob/living/carbon/human/H = locate(href_list["makealien"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
usr.client.cmd_admin_alienize(H)
@@ -1488,7 +1488,7 @@
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
usr.client.cmd_admin_slimeize(H)
@@ -1498,7 +1498,7 @@
var/mob/living/carbon/human/H = locate(href_list["makesuper"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
usr.client.cmd_admin_super(H)
@@ -1508,7 +1508,7 @@
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
usr.client.cmd_admin_robotize(H)
@@ -1518,7 +1518,7 @@
var/mob/M = locate(href_list["makeanimal"])
if(istype(M, /mob/new_player))
usr << "This cannot be used on instances of type /mob/new_player"
to_chat(usr, "This cannot be used on instances of type /mob/new_player")
return
usr.client.cmd_admin_animalize(M)
@@ -1528,7 +1528,7 @@
var/mob/dead/observer/G = locate(href_list["incarn_ghost"])
if(!istype(G))
usr << "This will only work on /mob/dead/observer"
to_chat(usr, "This will only work on /mob/dead/observer")
log_admin("[key_name(G)] was incarnated by [key_name(src.owner)]")
message_admins("[key_name_admin(G)] was incarnated by [key_name_admin(src.owner)]")
G.incarnate_ghost()
@@ -1538,7 +1538,7 @@
var/mob/living/carbon/human/H = locate(href_list["togmutate"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
var/block=text2num(href_list["block"])
//testing("togmutate([href_list["block"]] -> [block])")
@@ -1594,7 +1594,7 @@
else if(href_list["adminmoreinfo"])
var/mob/M = locate(href_list["adminmoreinfo"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob"
to_chat(usr, "This can only be used on instances of type /mob")
return
var/location_description = ""
@@ -1634,19 +1634,19 @@
if(MALE,FEMALE) gender_description = "[M.gender]"
else gender_description = "<font color='red'><b>[M.gender]</b></font>"
src.owner << "<b>Info about [M.name]:</b> "
src.owner << "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]"
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>) (<A HREF='?src=\ref[src];adminplayerobservefollow=\ref[M]'>FLW</A>) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)"
to_chat(src.owner, "<b>Info about [M.name]:</b> ")
to_chat(src.owner, "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]")
to_chat(src.owner, "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;")
to_chat(src.owner, "Location = [location_description];")
to_chat(src.owner, "[special_role_description]")
to_chat(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
var/mob/living/carbon/human/H = locate(href_list["adminspawncookie"])
if(!ishuman(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
H.equip_to_slot_or_del( new /obj/item/weapon/reagent_containers/food/snacks/cookie(H), slot_l_hand )
@@ -1663,28 +1663,28 @@
log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
message_admins("[key_name_admin(H)] got their cookie, spawned by [key_name_admin(src.owner)]")
feedback_inc("admin_cookies_spawned",1)
H << "\blue Your prayers have been answered!! You received the <b>best cookie</b>!"
to_chat(H, "\blue Your prayers have been answered!! You received the <b>best cookie</b>!")
else if(href_list["BlueSpaceArtillery"])
if(!check_rights(R_ADMIN|R_EVENT)) return
var/mob/living/M = locate(href_list["BlueSpaceArtillery"])
if(!isliving(M))
usr << "This can only be used on instances of type /mob/living"
to_chat(usr, "This can only be used on instances of type /mob/living")
return
if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Bluespace Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
return
if(BSACooldown)
src.owner << "Standby. Reload cycle in progress. Gunnery crews ready in five seconds!"
to_chat(src.owner, "Standby. Reload cycle in progress. Gunnery crews ready in five seconds!")
return
BSACooldown = 1
spawn(50)
BSACooldown = 0
M << "You've been hit by bluespace artillery!"
to_chat(M, "You've been hit by bluespace artillery!")
log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [key_name(src.owner)]")
message_admins("[key_name_admin(M)] has been hit by Bluespace Artillery fired by [key_name_admin(src.owner)]")
@@ -1714,19 +1714,19 @@
var/mob/living/carbon/human/H = locate(href_list["CentcommReply"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
usr << "The person you are trying to contact is not wearing a headset"
to_chat(usr, "The person you are trying to contact is not wearing a headset")
return
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from Centcomm", "")
if(!input) return
src.owner << "You sent [input] to [H] via a secure channel."
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
log_admin("[key_name(src.owner)] replied to [key_name(H)]'s Centcomm message with the message [input].")
message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)]'s Centcom message with: \"[input]\"")
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\""
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\"")
else if(href_list["SyndicateReply"])
if(!check_rights(R_ADMIN))
@@ -1734,37 +1734,37 @@
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(H.stat != 0)
usr << "The person you are trying to contact is not conscious."
to_chat(usr, "The person you are trying to contact is not conscious.")
return
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
usr << "The person you are trying to contact is not wearing a headset"
to_chat(usr, "The person you are trying to contact is not wearing a headset")
return
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from The Syndicate", "")
if(!input) return
src.owner << "You sent [input] to [H] via a secure channel."
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
log_admin("[src.owner] replied to [key_name(H)]'s Syndicate message with the message [input].")
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\""
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. [input]. Message ends.\"")
else if(href_list["HONKReply"])
var/mob/living/carbon/human/H = locate(href_list["HONKReply"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
usr << "The person you are trying to contact is not wearing a headset"
to_chat(usr, "The person you are trying to contact is not wearing a headset")
return
var/input = input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from HONKplanet", "")
if(!input) return
src.owner << "You sent [input] to [H] via a secure channel."
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
log_admin("[src.owner] replied to [key_name(H)]'s HONKplanet message with the message [input].")
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your HONKbrothers. Message as follows, HONK. [input]. Message ends, HONK.\""
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your HONKbrothers. Message as follows, HONK. [input]. Message ends, HONK.\"")
else if(href_list["ErtReply"])
if(!check_rights(R_ADMIN))
@@ -1773,21 +1773,21 @@
if(alert(src.owner, "Accept or Deny ERT request?", "CentComm Response", "Accept", "Deny") == "Deny")
var/mob/living/carbon/human/H = locate(href_list["ErtReply"])
if(!istype(H))
usr << "This can only be used on instances of type /mob/living/carbon/human"
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
return
if(H.stat != 0)
usr << "The person you are trying to contact is not conscious."
to_chat(usr, "The person you are trying to contact is not conscious.")
return
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
usr << "The person you are trying to contact is not wearing a headset"
to_chat(usr, "The person you are trying to contact is not wearing a headset")
return
var/input = input(src.owner, "Please enter a reason for denying [key_name(H)]'s ERT request.","Outgoing message from CentComm", "")
if(!input) return
src.owner << "You sent [input] to [H] via a secure channel."
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
log_admin("[src.owner] denied [key_name(H)]'s ERT request with the message [input].")
H << "You hear something crackle in your headset for a moment before a voice speaks. \"Your ERT request has been denied for the following reasons: [input]. Message ends.\""
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Your ERT request has been denied for the following reasons: [input]. Message ends.\"")
else
src.owner.response_team()
@@ -1815,7 +1815,7 @@
usr << browse(data, "window=[B.name]")
else
usr << "\red The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]"
to_chat(usr, "\red The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]")
else if (href_list["AdminFaxViewPage"])
if(!check_rights(R_ADMIN))
@@ -1947,14 +1947,14 @@
if(destination != "All Departments")
if(!fax.receivefax(P))
src.owner << "\red Message transmission failed."
to_chat(src.owner, "\red Message transmission failed.")
return
else
for(var/obj/machinery/photocopier/faxmachine/F in allfaxes)
if((F.z in config.station_levels))
spawn(0)
if(!F.receivefax(P))
src.owner << "\red Message transmission to [F.department] failed."
to_chat(src.owner, "\red Message transmission to [F.department] failed.")
var/datum/fax/admin/A = new /datum/fax/admin()
A.name = P.name
@@ -1969,11 +1969,11 @@
A.sent_by = usr
A.sent_at = world.time
src.owner << "\blue Message transmitted successfully."
to_chat(src.owner, "\blue Message transmitted successfully.")
if(notify == "Yes")
var/mob/living/carbon/human/H = sender
if(istype(H) && H.stat == CONSCIOUS && (istype(H.l_ear, /obj/item/device/radio/headset) || istype(H.r_ear, /obj/item/device/radio/headset)))
sender << "Your headset pings, notifying you that a reply to your fax has arrived."
to_chat(sender, "Your headset pings, notifying you that a reply to your fax has arrived.")
if(sender)
log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]")
message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)] (<a href='?_src_=holder;AdminFaxView=\ref[P]'>VIEW</a>).", 1)
@@ -2028,7 +2028,7 @@
var/mob/M = locate(href_list["traitor"])
if(!ismob(M))
usr << "This can only be used on instances of type /mob."
to_chat(usr, "This can only be used on instances of type /mob.")
return
show_traitor_panel(M)
@@ -2076,7 +2076,7 @@
alert("Select fewer object types, (max 5)")
return
var/list/offset = text2list(href_list["offset"],",")
var/list/offset = splittext(href_list["offset"],",")
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
var/X = offset.len > 0 ? text2num(offset[1]) : 0
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
@@ -2097,7 +2097,7 @@
switch(where)
if("inhand")
if (!iscarbon(usr) && !isrobot(usr))
usr << "Can only spawn in hand when you're a carbon mob or cyborg."
to_chat(usr, "Can only spawn in hand when you're a carbon mob or cyborg.")
where = "onfloor"
target = usr
@@ -2109,10 +2109,10 @@
target = locate(loc.x + X,loc.y + Y,loc.z + Z)
if("inmarked")
if(!marked_datum)
usr << "You don't have any object marked. Abandoning spawn."
to_chat(usr, "You don't have any object marked. Abandoning spawn.")
return
else if(!istype(marked_datum,/atom))
usr << "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn."
to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.")
return
else
target = marked_datum
@@ -2176,7 +2176,7 @@
message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
else
usr << "You may only use this when the game is running."
to_chat(usr, "You may only use this when the game is running.")
else if(href_list["memoeditlist"])
if(!check_rights(R_SERVER)) return
@@ -2254,7 +2254,7 @@
feedback_add_details("admin_secrets_fun_used","TriAI")
if("gravity")
if(!(ticker && ticker.mode))
usr << "Please wait until the game starts! Not sure how it will work otherwise."
to_chat(usr, "Please wait until the game starts! Not sure how it will work otherwise.")
return
gravity_is_on = !gravity_is_on
for(var/area/A in world)
@@ -2416,11 +2416,11 @@
M.show_message(text("\blue The chilling wind suddenly stops..."), 1)
/* if("shockwave")
ok = 1
world << "\red <B><big>ALERT: STATION STRESS CRITICAL</big></B>"
to_chat(world, "\red <B><big>ALERT: STATION STRESS CRITICAL</big></B>")
sleep(60)
world << "\red <B><big>ALERT: STATION STRESS CRITICAL. TOLERABLE LEVELS EXCEEDED!</big></B>"
to_chat(world, "\red <B><big>ALERT: STATION STRESS CRITICAL. TOLERABLE LEVELS EXCEEDED!</big></B>")
sleep(80)
world << "\red <B><big>ALERT: STATION STRUCTURAL STRESS CRITICAL. SAFETY MECHANISMS FAILED!</big></B>"
to_chat(world, "\red <B><big>ALERT: STATION STRUCTURAL STRESS CRITICAL. SAFETY MECHANISMS FAILED!</big></B>")
sleep(40)
for(var/mob/M in world)
shake_camera(M, 400, 1)
@@ -2474,7 +2474,7 @@
message_admins("[key_name_admin(usr)] fixed all lights", 1)
if("floorlava")
if(floorIsLava)
usr << "The floor is lava already."
to_chat(usr, "The floor is lava already.")
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","LF")
@@ -2531,7 +2531,7 @@
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","RET")
for(var/mob/living/carbon/human/H in player_list)
H << "\red <B>You suddenly feel stupid.</B>"
to_chat(H, "\red <B>You suddenly feel stupid.</B>")
H.setBrainLoss(60)
message_admins("[key_name_admin(usr)] made everybody retarded")
if("fakeguns")
@@ -2552,7 +2552,7 @@
W.item_state = "w_suit"
W.item_color = "schoolgirl"
message_admins("[key_name_admin(usr)] activated Japanese Animes mode")
world << sound('sound/AI/animes.ogg')
to_chat(world, sound('sound/AI/animes.ogg'))
if("eagles")//SCRAW
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","EgL")
@@ -2658,7 +2658,7 @@
if(usr)
log_admin("[key_name(usr)] used secret [href_list["secretsfun"]]")
if (ok)
world << text("<B>A secret has been activated by []!</B>", usr.key)
to_chat(world, text("<B>A secret has been activated by []!</B>", usr.key))
else if(href_list["secretsadmin"])
if(!check_rights(R_ADMIN)) return
@@ -2735,7 +2735,7 @@
if (usr)
log_admin("[key_name(usr)] used secret [href_list["secretsadmin"]]")
if (ok)
world << text("<B>A secret has been activated by []!</B>", usr.key)
to_chat(world, text("<B>A secret has been activated by []!</B>", usr.key))
else if(href_list["secretscoder"])
if(!check_rights(R_DEBUG)) return
+2 -2
View File
@@ -31,6 +31,6 @@
if(text)
var/F = file("broken_hand_icons.txt")
fdel(F)
F << text
world << "Completed and written to [F]"
to_chat(F, text)
to_chat(world, "Completed and written to [F]")
+17 -17
View File
@@ -25,7 +25,7 @@
if(!query_text || length(query_text) < 1)
return
//world << query_text
// to_chat(world, query_text)
var/list/query_list = SDQL2_tokenize(query_text)
@@ -147,8 +147,8 @@
for(var/v in vals)
d.vars[v] = vals[v]
catch(var/exception/e)
usr << "<span class='warning'>A runtime error has occured during the execution of your query and your query has been aborted.</span>"
usr << "[e]"
to_chat(usr, "<span class='warning'>A runtime error has occured during the execution of your query and your query has been aborted.</span>")
to_chat(usr, "[e]")
/proc/SDQL_parse(list/query_list)
var/datum/SDQL_parser/parser = new()
@@ -174,7 +174,7 @@
querys[querys_pos] = parsed_tree
querys_pos++
else //There was an error so don't run anything, and tell the user which query has errored.
usr << "<span class='danger'>Parsing error on [querys_pos]\th query. Nothing was executed.</span>"
to_chat(usr, "<span class='danger'>Parsing error on [querys_pos]\th query. Nothing was executed.</span>")
return list()
query_tree = list()
do_parse = 0
@@ -195,22 +195,22 @@
for(var/item in query_tree)
if(istype(item, /list))
usr << "[spaces]("
to_chat(usr, "[spaces](")
SDQL_testout(item, indent + 1)
usr << "[spaces])"
to_chat(usr, "[spaces])")
else
usr << "[spaces][item]"
to_chat(usr, "[spaces][item]")
if(!isnum(item) && query_tree[item])
if(istype(query_tree[item], /list))
usr << "[spaces] ("
to_chat(usr, "[spaces] (")
SDQL_testout(query_tree[item], indent + 2)
usr << "[spaces] )"
to_chat(usr, "[spaces] )")
else
usr << "[spaces] [query_tree[item]]"
to_chat(usr, "[spaces] [query_tree[item]]")
/proc/SDQL_from_objs(list/tree)
if("world" in tree)
@@ -320,7 +320,7 @@
if("or", "||")
result = (result || val)
else
usr << "<span class='danger'>SDQL2: Unknown op [op]</span>"
to_chat(usr, "<span class='danger'>SDQL2: Unknown op [op]</span>")
result = null
else
result = val
@@ -388,11 +388,11 @@
return null
else if(expression[start] == "\[" && start < expression.len)
if(lowertext(copytext(expression[start + 1], 1, 3)) != "0x")
usr << "<span class='danger'>Invalid ref syntax: [expression[start + 1]]</span>"
to_chat(usr, "<span class='danger'>Invalid ref syntax: [expression[start + 1]]</span>")
return null
v = locate("\[[expression[start + 1]]\]")
if(!v)
usr << "<span class='danger'>Invalid ref: [expression[start + 1]]</span>"
to_chat(usr, "<span class='danger'>Invalid ref: [expression[start + 1]]</span>")
return null
start++
else
@@ -448,7 +448,7 @@
else if(char == "'")
if(word != "")
usr << "<span class='danger'>SDQL2: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>"
to_chat(usr, "<span class='danger'>SDQL2: You have an error in your SDQL syntax, unexpected ' in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>")
return null
word = "'"
@@ -468,7 +468,7 @@
word += char
if(i > len)
usr << "<span class='danger'>SDQL2: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>"
to_chat(usr, "<span class='danger'>SDQL2: You have an error in your SDQL syntax, unmatched ' in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>")
return null
query_list += "[word]'"
@@ -476,7 +476,7 @@
else if(char == "\"")
if(word != "")
usr << "<span class='danger'>SDQL2: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>"
to_chat(usr, "<span class='danger'>SDQL2: You have an error in your SDQL syntax, unexpected \" in query: \"<font color=gray>[query_text]</font>\" following \"<font color=gray>[word]</font>\". Please check your syntax, and try again.</span>")
return null
word = "\""
@@ -496,7 +496,7 @@
word += char
if(i > len)
usr << "<span class='danger'>SDQL2: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>"
to_chat(usr, "<span class='danger'>SDQL2: You have an error in your SDQL syntax, unmatched \" in query: \"<font color=gray>[query_text]</font>\". Please check your syntax, and try again.</span>")
return null
query_list += "[word]\""
@@ -60,7 +60,7 @@
/datum/SDQL_parser/proc/parse_error(error_message)
error = 1
usr << "<span class='danger'>SQDL2 Parsing Error: [error_message]</span>"
to_chat(usr, "<span class='danger'>SQDL2 Parsing Error: [error_message]</span>")
return query.len + 1
/datum/SDQL_parser/proc/parse()
+6 -6
View File
@@ -9,7 +9,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
//handle muting and automuting
if(prefs.muted & MUTE_ADMINHELP)
src << "<font color='red'>Error: Admin-PM: You cannot send adminhelps (Muted).</font>"
to_chat(src, "<font color='red'>Error: Admin-PM: You cannot send adminhelps (Muted).</font>")
return
adminhelped = 1 //Determines if they get the message to reply by clicking the name.
@@ -32,7 +32,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
var/original_msg = msg
//explode the input msg into a list
var/list/msglist = text2list(msg, " ")
var/list/msglist = splittext(msg, " ")
//generate keywords lookup
var/list/surnames = list()
@@ -43,7 +43,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
if(M.mind) indexing += M.mind.name
for(var/string in indexing)
var/list/L = text2list(string, " ")
var/list/L = splittext(string, " ")
var/surname_found = 0
//surnames
for(var/i=L.len, i>=1, i--)
@@ -113,16 +113,16 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
for(var/client/X in mentorholders + modholders + adminholders)
if(X.prefs.sound & SOUND_ADMINHELP)
X << 'sound/effects/adminhelp.ogg'
X << msg
to_chat(X, msg)
if("Adminhelp")
msg = "<span class='adminhelp'>[selected_type]: </span><span class='boldnotice'>[key_name(src, 1, 1, selected_type)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) ([admin_jump_link(mob, "holder")]) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>) (<A HREF='?_src_=holder;rejectadminhelp=[ref_client]'>REJT</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</span> <span class='adminhelp'>[msg]</span>"
for(var/client/X in modholders + adminholders)
if(X.prefs.sound & SOUND_ADMINHELP)
X << 'sound/effects/adminhelp.ogg'
X << msg
to_chat(X, msg)
//show it to the person adminhelping too
src << "<span class='boldnotice'>[selected_type]</b>: [original_msg]</span>"
to_chat(src, "<span class='boldnotice'>[selected_type]</b>: [original_msg]</span>")
var/admin_number_present = adminholders.len - admin_number_afk
log_admin("[selected_type]: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.")
+3 -3
View File
@@ -19,7 +19,7 @@
var/turf/T = pick_n_take(turfs)
if(!T)
src << "Nowhere to jump to!"
to_chat(src, "Nowhere to jump to!")
return
admin_forcemove(usr, T)
@@ -56,7 +56,7 @@
feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
admin_forcemove(A, M.loc)
else
A << "This mob is not located in the game world."
to_chat(A, "This mob is not located in the game world.")
/client/proc/jumptocoord(tx as num, ty as num, tz as num)
set category = "Admin"
@@ -85,7 +85,7 @@
keys += M.client
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
if(!selection)
src << "No keys found."
to_chat(src, "No keys found.")
return
var/mob/M = selection:mob
log_admin("[key_name(usr)] jumped to [key_name(M)]")
+19 -19
View File
@@ -3,7 +3,7 @@
set category = null
set name = "Admin PM Mob"
if(!holder)
src << "<font color='red'>Error: Admin-PM-Context: Only administrators may use this command.</font>"
to_chat(src, "<font color='red'>Error: Admin-PM-Context: Only administrators may use this command.</font>")
return
if( !ismob(M) || !M.client ) return
cmd_admin_pm(M.client,null)
@@ -14,7 +14,7 @@
set category = "Admin"
set name = "Admin PM Name"
if(!holder)
src << "<font color='red'>Error: Admin-PM-Panel: Only administrators may use this command.</font>"
to_chat(src, "<font color='red'>Error: Admin-PM-Panel: Only administrators may use this command.</font>")
return
var/list/client/targets[0]
for(var/client/T)
@@ -37,7 +37,7 @@
set category = "Admin"
set name = "Admin PM Key"
if(!holder)
src << "<font color='red'>Error: Admin-PM-Panel: Only administrators may use this command.</font>"
to_chat(src, "<font color='red'>Error: Admin-PM-Panel: Only administrators may use this command.</font>")
return
var/list/client/targets[0]
for(var/client/T)
@@ -60,7 +60,7 @@
//Fetching a message if needed. src is the sender and C is the target client
/client/proc/cmd_admin_pm(whom, msg, type = "PM")
if(prefs.muted & MUTE_ADMINHELP)
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
to_chat(src, "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>")
return
var/client/C
@@ -73,7 +73,7 @@
if(!C)
if(holder)
src << "<span class='danger'>Error: Private-Message: Client not found.</span>"
to_chat(src, "<span class='danger'>Error: Private-Message: Client not found.</span>")
else
adminhelp(msg) //admin we are replying to left. adminhelp instead
return
@@ -81,7 +81,7 @@
/*if(C && C.last_pm_recieved + config.simultaneous_pm_warning_timeout > world.time && holder)
//send a warning to admins, but have a delay popup for mods
if(holder.rights & R_ADMIN)
src << "\red <b>Simultaneous PMs warning:</b> that player has been PM'd in the last [config.simultaneous_pm_warning_timeout / 10] seconds by: [C.ckey_last_pm]"
to_chat(src, "\red <b>Simultaneous PMs warning:</b> that player has been PM'd in the last [config.simultaneous_pm_warning_timeout / 10] seconds by: [C.ckey_last_pm]")
else
if(alert("That player has been PM'd in the last [config.simultaneous_pm_warning_timeout / 10] seconds by: [C.ckey_last_pm]","Simultaneous PMs warning","Continue","Cancel") == "Cancel")
return*/
@@ -94,7 +94,7 @@
return
if(!C)
if(holder)
src << "<span class='danger'>Error: Admin-PM: Client not found.</span>"
to_chat(src, "<span class='danger'>Error: Admin-PM: Client not found.</span>")
else
adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
return
@@ -125,7 +125,7 @@
recieve_pm_type = holder.rank
else if(!C.holder)
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
to_chat(src, "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>")
return
var/recieve_message = ""
@@ -133,7 +133,7 @@
if(holder && !C.holder)
recieve_message = "<span class='[recieve_span]' size='3'>-- Click the [recieve_pm_type]'s name to reply --</span>\n"
if(C.adminhelped)
C << recieve_message
to_chat(C, recieve_message)
C.adminhelped = 0
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
@@ -150,8 +150,8 @@
return
recieve_message = "<span class='[recieve_span]'>[type] from-<b>[recieve_pm_type][key_name(src, C, C.holder ? 1 : 0, type)]</b>: [msg]</span>"
C << recieve_message
src << "<font color='blue'>[send_pm_type][type] to-<b>[key_name(C, src, holder ? 1 : 0, type)]</b>: [msg]</font>"
to_chat(C, recieve_message)
to_chat(src, "<font color='blue'>[send_pm_type][type] to-<b>[key_name(C, src, holder ? 1 : 0, type)]</b>: [msg]</font>")
/*if(holder && !C.holder)
C.last_pm_recieved = world.time
@@ -172,17 +172,17 @@
switch(type)
if("Mentorhelp")
if(check_rights(R_ADMIN|R_MOD|R_MENTOR, 0, X.mob))
X << "<span class='mentorhelp'>[type]: [key_name(src, X, 0, type)]-&gt;[key_name(C, X, 0, type)]: [msg]</span>"
to_chat(X, "<span class='mentorhelp'>[type]: [key_name(src, X, 0, type)]-&gt;[key_name(C, X, 0, type)]: [msg]</span>")
if("Adminhelp")
if(check_rights(R_ADMIN|R_MOD, 0, X.mob))
X << "<span class='adminhelp'>[type]: [key_name(src, X, 0, type)]-&gt;[key_name(C, X, 0, type)]: [msg]</span>"
to_chat(X, "<span class='adminhelp'>[type]: [key_name(src, X, 0, type)]-&gt;[key_name(C, X, 0, type)]: [msg]</span>")
else
if(check_rights(R_ADMIN|R_MOD, 0, X.mob))
X << "<span class='boldnotice'>[type]: [key_name(src, X, 0, type)]-&gt;[key_name(C, X, 0, type)]: [msg]</span>"
to_chat(X, "<span class='boldnotice'>[type]: [key_name(src, X, 0, type)]-&gt;[key_name(C, X, 0, type)]: [msg]</span>")
/client/proc/cmd_admin_irc_pm()
if(prefs.muted & MUTE_ADMINHELP)
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
to_chat(src, "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>")
return
var/msg = input(src,"Message:", "Private message to admins on IRC / 400 character limit") as text|null
@@ -193,17 +193,17 @@
sanitize(msg)
if(length(msg) > 400) // TODO: if message length is over 400, divide it up into seperate messages, the message length restriction is based on IRC limitations. Probably easier to do this on the bots ends.
src << "\red Your message was not sent because it was more then 400 characters find your message below for ease of copy/pasting"
src << "\blue [msg]"
to_chat(src, "\red Your message was not sent because it was more then 400 characters find your message below for ease of copy/pasting")
to_chat(src, "\blue [msg]")
return
send2adminirc("PlayerPM from [key_name(src)]: [html_decode(msg)]")
src << "<font color='blue'>IRC PM to-<b>IRC-Admins</b>: [msg]</font>"
to_chat(src, "<font color='blue'>IRC PM to-<b>IRC-Admins</b>: [msg]</font>")
log_admin("PM: [key_name(src)]->IRC: [msg]")
for(var/client/X in admins)
if(X == src)
continue
if(check_rights(R_ADMIN|R_MOD|R_MENTOR, 0, X.mob))
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;IRC-Admins:</B> \blue [msg]</font>"
to_chat(X, "<B><font color='blue'>PM: [key_name(src, X, 0)]-&gt;IRC-Admins:</B> \blue [msg]</font>")
+2 -2
View File
@@ -12,7 +12,7 @@
if(check_rights(R_ADMIN,0))
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << "<span class='admin_channel'>ADMIN: <span class='name'>[key_name(usr, 1)]</span> ([admin_jump_link(mob, "holder")]): <span class='message'>[msg]</span></span>"
to_chat(C, "<span class='admin_channel'>ADMIN: <span class='name'>[key_name(usr, 1)]</span> ([admin_jump_link(mob, "holder")]): <span class='message'>[msg]</span></span>")
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -35,6 +35,6 @@
spanclass = "mod_channel_admin"
for(var/client/C in admins)
if(check_rights(R_ADMIN|R_MOD, 0, C.mob))
C << "<span class='[spanclass]'>MOD: <span class='name'>[key_name(usr, 1)]</span> ([admin_jump_link(mob, C.holder)]): <span class='message'>[msg]</span></span>"
to_chat(C, "<span class='[spanclass]'>MOD: <span class='name'>[key_name(usr, 1)]</span> ([admin_jump_link(mob, C.holder)]): <span class='message'>[msg]</span></span>")
feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+2 -2
View File
@@ -11,10 +11,10 @@
dat += "<p>[C.ckey] (Player Age: <font color = 'red'>[C.player_age]</font>) - <b>[C.computer_id]</b> / <b>[C.address]</b><br>"
if(C.related_accounts_cid.len)
dat += "--Accounts associated with CID: "
dat += "<b>[list2text(C.related_accounts_cid, " - ")]</b><br>"
dat += "<b>[jointext(C.related_accounts_cid, " - ")]</b><br>"
if(C.related_accounts_ip.len)
dat += "--Accounts associated with IP: "
dat += "<b>[list2text(C.related_accounts_ip, " - ")]</b> "
dat += "<b>[jointext(C.related_accounts_ip, " - ")]</b> "
usr << browse(dat, "window=alt_panel;size=640x480")
return
+1 -1
View File
@@ -14,7 +14,7 @@
for(var/mob/M in mob_list)
if((M.mind && M.mind.special_role && M.client) || (M.client && M.client.holder && (M.client.holder.rights & R_ADMIN)) )
M << "<font color='#960018'><span class='ooc'><span class='prefix'>AOOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>"
to_chat(M, "<font color='#960018'><span class='ooc'><span class='prefix'>AOOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>")
log_ooc("(ANTAG) [key] : [msg]")
+11 -11
View File
@@ -3,30 +3,30 @@
set name = "Check Piping"
set background = 1
if(!src.holder)
src << "Only administrators may use this command."
to_chat(src, "Only administrators may use this command.")
return
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(alert("WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", "No", "Yes") == "No")
return
usr << "Checking for disconnected pipes..."
to_chat(usr, "Checking for disconnected pipes...")
//all plumbing - yes, some things might get stated twice, doesn't matter.
for (var/obj/machinery/atmospherics/plumbing in world)
if (plumbing.nodealert)
usr << "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])"
to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")
//Manifolds
for (var/obj/machinery/atmospherics/pipe/manifold/pipe in world)
if (!pipe.node1 || !pipe.node2 || !pipe.node3)
usr << "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])"
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
//Pipes
for (var/obj/machinery/atmospherics/pipe/simple/pipe in world)
if (!pipe.node1 || !pipe.node2)
usr << "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])"
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
usr << "Checking for overlapping pipes..."
to_chat(usr, "Checking for overlapping pipes...")
next_turf:
for(var/turf/T in world)
for(var/dir in cardinal)
@@ -35,15 +35,15 @@
if(dir & pipe.initialize_directions)
check++
if(check > 1)
usr << "Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])"
to_chat(usr, "Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])")
continue next_turf
usr << "Done"
to_chat(usr, "Done")
/client/proc/powerdebug()
set category = "Mapping"
set name = "Check Power"
if(!src.holder)
src << "Only administrators may use this command."
to_chat(src, "Only administrators may use this command.")
return
feedback_add_details("admin_verb","CPOW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -51,9 +51,9 @@
if (!PN.nodes || !PN.nodes.len)
if(PN.cables && (PN.cables.len > 1))
var/obj/structure/cable/C = PN.cables[1]
usr << "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"
to_chat(usr, "Powernet with no nodes! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
if (!PN.cables || (PN.cables.len < 10))
if(PN.cables && (PN.cables.len > 1))
var/obj/structure/cable/C = PN.cables[1]
usr << "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]"
to_chat(usr, "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [C.x], [C.y], [C.z] in area [get_area(C.loc)]")
+11 -11
View File
@@ -4,7 +4,7 @@
set name = "Change Custom Event"
if(!holder)
src << "Only administrators may use this command."
to_chat(src, "Only administrators may use this command.")
return
var/input = input(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", custom_event_msg) as message|null
@@ -19,10 +19,10 @@
custom_event_msg = input
world << "<h1 class='alert'>Custom Event</h1>"
world << "<h2 class='alert'>A custom event is starting. OOC Info:</h2>"
world << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
world << "<br>"
to_chat(world, "<h1 class='alert'>Custom Event</h1>")
to_chat(world, "<h2 class='alert'>A custom event is starting. OOC Info:</h2>")
to_chat(world, "<span class='alert'>[html_encode(custom_event_msg)]</span>")
to_chat(world, "<br>")
// normal verb for players to view info
/client/verb/cmd_view_custom_event()
@@ -30,11 +30,11 @@
set name = "Custom Event Info"
if(!custom_event_msg || custom_event_msg == "")
src << "There currently is no known custom event taking place."
src << "Keep in mind: it is possible that an admin has not properly set this."
to_chat(src, "There currently is no known custom event taking place.")
to_chat(src, "Keep in mind: it is possible that an admin has not properly set this.")
return
src << "<h1 class='alert'>Custom Event</h1>"
src << "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>"
src << "<span class='alert'>[html_encode(custom_event_msg)]</span>"
src << "<br>"
to_chat(src, "<h1 class='alert'>Custom Event</h1>")
to_chat(src, "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>")
to_chat(src, "<span class='alert'>[html_encode(custom_event_msg)]</span>")
to_chat(src, "<br>")
+2 -2
View File
@@ -10,11 +10,11 @@
return
if(prefs.muted & MUTE_DEADCHAT)
src << "<span class='warning'>You cannot send DSAY messages (muted).</span>"
to_chat(src, "<span class='warning'>You cannot send DSAY messages (muted).</span>")
return
if(!(prefs.toggles & CHAT_DEAD))
src << "<span class='warning'>You have deadchat muted.</span>"
to_chat(src, "<span class='warning'>You have deadchat muted.</span>")
return
if (handle_spam_prevention(msg,MUTE_DEADCHAT))
+32 -32
View File
@@ -72,7 +72,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(!procname) return
if(targetselected && !hascall(target,procname))
usr << "<font color='red'>Error: callproc(): target has no such call [procname].</font>"
to_chat(usr, "<font color='red'>Error: callproc(): target has no such call [procname].</font>")
return
var/list/lst = get_callproc_args()
@@ -81,7 +81,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(targetselected)
if(!target)
usr << "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>"
to_chat(usr, "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>")
return
message_admins("[key_name_admin(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
@@ -92,7 +92,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]")
returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc
usr << "<font color='blue'>[procname] returned: [returnval ? returnval : "null"]</font>"
to_chat(usr, "<font color='blue'>[procname] returned: [returnval ? returnval : "null"]</font>")
feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/callproc_datum(var/A as null|area|mob|obj|turf)
@@ -107,7 +107,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
return
if(!hascall(A,procname))
usr << "<span class='warning'>Error: callproc_datum(): target has no such call [procname].</span>"
to_chat(usr, "<span class='warning'>Error: callproc_datum(): target has no such call [procname].</span>")
return
var/list/lst = get_callproc_args()
@@ -115,14 +115,14 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
return
if(!A || !IsValidSrc(A))
usr << "<span class='warning'>Error: callproc_datum(): owner of proc no longer exists.</span>"
to_chat(usr, "<span class='warning'>Error: callproc_datum(): owner of proc no longer exists.</span>")
return
message_admins("[key_name_admin(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]")
log_admin("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]")
spawn()
var/returnval = call(A,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
usr << "<span class='notice'>[procname] returned: [returnval ? returnval : "null"]</span>"
to_chat(usr, "<span class='notice'>[procname] returned: [returnval ? returnval : "null"]</span>")
feedback_add_details("admin_verb","DPC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -506,41 +506,41 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/list/areas_without_intercom = areas_all - areas_with_intercom
var/list/areas_without_camera = areas_all - areas_with_camera
world << "<b>AREAS WITHOUT AN APC:</b>"
to_chat(world, "<b>AREAS WITHOUT AN APC:</b>")
for(var/areatype in areas_without_APC)
world << "* [areatype]"
to_chat(world, "* [areatype]")
world << "<b>AREAS WITHOUT AN AIR ALARM:</b>"
to_chat(world, "<b>AREAS WITHOUT AN AIR ALARM:</b>")
for(var/areatype in areas_without_air_alarm)
world << "* [areatype]"
to_chat(world, "* [areatype]")
world << "<b>AREAS WITH TOO MANY APCS:</b>"
to_chat(world, "<b>AREAS WITH TOO MANY APCS:</b>")
for(var/areatype in areas_with_multiple_APCs)
world << "* [areatype]"
to_chat(world, "* [areatype]")
world << "<b>AREAS WITH TOO MANY AIR ALARMS:</b>"
to_chat(world, "<b>AREAS WITH TOO MANY AIR ALARMS:</b>")
for(var/areatype in areas_with_multiple_air_alarms)
world << "* [areatype]"
to_chat(world, "* [areatype]")
world << "<b>AREAS WITHOUT A REQUEST CONSOLE:</b>"
to_chat(world, "<b>AREAS WITHOUT A REQUEST CONSOLE:</b>")
for(var/areatype in areas_without_RC)
world << "* [areatype]"
to_chat(world, "* [areatype]")
world << "<b>AREAS WITHOUT ANY LIGHTS:</b>"
to_chat(world, "<b>AREAS WITHOUT ANY LIGHTS:</b>")
for(var/areatype in areas_without_light)
world << "* [areatype]"
to_chat(world, "* [areatype]")
world << "<b>AREAS WITHOUT A LIGHT SWITCH:</b>"
to_chat(world, "<b>AREAS WITHOUT A LIGHT SWITCH:</b>")
for(var/areatype in areas_without_LS)
world << "* [areatype]"
to_chat(world, "* [areatype]")
world << "<b>AREAS WITHOUT ANY INTERCOMS:</b>"
to_chat(world, "<b>AREAS WITHOUT ANY INTERCOMS:</b>")
for(var/areatype in areas_without_intercom)
world << "* [areatype]"
to_chat(world, "* [areatype]")
world << "<b>AREAS WITHOUT ANY CAMERAS:</b>"
to_chat(world, "<b>AREAS WITHOUT ANY CAMERAS:</b>")
for(var/areatype in areas_without_camera)
world << "* [areatype]"
to_chat(world, "* [areatype]")
/client/proc/cmd_admin_dress(var/mob/living/carbon/human/M in mob_list)
set category = "Event"
@@ -1166,21 +1166,21 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Silicons","Clients","Respawnable Mobs"))
if("Players")
usr << list2text(player_list,",")
to_chat(usr, jointext(player_list,","))
if("Admins")
usr << list2text(admins,",")
to_chat(usr, jointext(admins,","))
if("Mobs")
usr << list2text(mob_list,",")
to_chat(usr, jointext(mob_list,","))
if("Living Mobs")
usr << list2text(living_mob_list,",")
to_chat(usr, jointext(living_mob_list,","))
if("Dead Mobs")
usr << list2text(dead_mob_list,",")
to_chat(usr, jointext(dead_mob_list,","))
if("Silicons")
usr << list2text(silicon_mob_list,",")
to_chat(usr, jointext(silicon_mob_list,","))
if("Clients")
usr << list2text(clients,",")
to_chat(usr, jointext(clients,","))
if("Respawnable Mobs")
usr << list2text(respawnable_list,",")
to_chat(usr, jointext(respawnable_list,","))
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
+6 -6
View File
@@ -15,9 +15,9 @@
if(T.active_hotspot)
burning = 1
usr << "\blue @[target.x],[target.y]: O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]"
to_chat(usr, "\blue @[target.x],[target.y]: O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]")
for(var/datum/gas/trace_gas in GM.trace_gases)
usr << "[trace_gas.type]: [trace_gas.moles]"
to_chat(usr, "[trace_gas.type]: [trace_gas.moles]")
message_admins("[key_name_admin(usr)] has checked the air status of [T]")
log_admin("[key_name(usr)] has checked the air status of [T]")
@@ -130,9 +130,9 @@
if(!check_rights(R_DEBUG))
return
usr << "<b>Jobbans active in this round.</b>"
to_chat(usr, "<b>Jobbans active in this round.</b>")
for(var/t in jobban_keylist)
usr << "[t]"
to_chat(usr, "[t]")
message_admins("[key_name_admin(usr)] has printed the jobban log")
log_admin("[key_name(usr)] has printed the jobban log")
@@ -149,10 +149,10 @@
if(!filter)
return
usr << "<b>Jobbans active in this round.</b>"
to_chat(usr, "<b>Jobbans active in this round.</b>")
for(var/t in jobban_keylist)
if(findtext(t, filter))
usr << "[t]"
to_chat(usr, "[t]")
message_admins("[key_name_admin(usr)] has searched the jobban log for [filter]")
log_admin("[key_name(usr)] has searched the jobban log for [filter]")
+2 -2
View File
@@ -12,11 +12,11 @@
var/dice = num2text(sum) + "d" + num2text(side)
if(alert("Do you want to inform the world about your game?",,"Yes", "No") == "Yes")
world << "<h2 style=\"color:#A50400\">The dice have been rolled by Gods!</h2>"
to_chat(world, "<h2 style=\"color:#A50400\">The dice have been rolled by Gods!</h2>")
var/result = roll(dice)
if(alert("Do you want to inform the world about the result?",,"Yes", "No") == "Yes")
world << "<h2 style=\"color:#A50400\">Gods rolled [dice], result is [result]</h2>"
to_chat(world, "<h2 style=\"color:#A50400\">Gods rolled [dice], result is [result]</h2>")
message_admins("[key_name_admin(src)] rolled dice [dice], result is [result]", 1)
+7 -7
View File
@@ -10,7 +10,7 @@ var/global/list/frozen_mob_list = list()
set category = "Special Verbs"
set name = "Freeze"
if(!holder)
src << "<font color='red'>Error: Freeze: Only administrators may use this command.</font>"
to_chat(src, "<font color='red'>Error: Freeze: Only administrators may use this command.</font>")
return
if(!istype(M)) return
if(!check_rights(R_ADMIN)) return
@@ -26,7 +26,7 @@ var/global/list/frozen_mob_list = list()
/mob/living/proc/admin_Freeze(var/client/admin)
if(istype(admin))
src << "<b><font color= red>You have been frozen by [key_name(admin)]</b></font>"
to_chat(src, "<b><font color= red>You have been frozen by [key_name(admin)]</b></font>")
message_admins("<span class='notice'>[key_name_admin(admin)]</span> froze [key_name_admin(src)]")
log_admin("[key_name(admin)] froze [key_name(src)]")
@@ -42,7 +42,7 @@ var/global/list/frozen_mob_list = list()
/mob/living/proc/admin_unFreeze(var/client/admin)
if(istype(admin))
src << "<b><font color= red>You have been unfrozen by [key_name(admin)]</b></font>"
to_chat(src, "<b><font color= red>You have been unfrozen by [key_name(admin)]</b></font>")
message_admins("\blue [key_name_admin(admin)] unfroze [key_name_admin(src)]")
log_admin("[key_name(admin)] unfroze [key_name(src)]")
@@ -85,11 +85,11 @@ var/global/list/frozen_mob_list = list()
set category = "Special Verbs"
set name = "Freeze Mech"
if(!holder)
src << "Only administrators may use this command."
to_chat(src, "Only administrators may use this command.")
return
var/obj/mecha/M = O
if(!istype(M,/obj/mecha))
src << "\red <b>This can only be used on Mechs!</b>"
to_chat(src, "\red <b>This can only be used on Mechs!</b>")
return
else
if(usr)
@@ -101,7 +101,7 @@ var/global/list/frozen_mob_list = list()
M.overlays += adminomaly
if(M.occupant)
M.removeVerb(/obj/mecha/verb/eject)
M.occupant << "<b><font color= red>You have been frozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
to_chat(M.occupant, "<b><font color= red>You have been frozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>")
message_admins("\blue [key_name_admin(usr)] froze [key_name(M.occupant)] in a [M.name]")
log_admin("[key_name(usr)] froze [key_name(M.occupant)] in a [M.name]")
else
@@ -112,7 +112,7 @@ var/global/list/frozen_mob_list = list()
M.overlays -= adminomaly
if(M.occupant)
M.addVerb(/obj/mecha/verb/eject)
M.occupant << "<b><font color= red>You have been unfrozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>"
to_chat(M.occupant, "<b><font color= red>You have been unfrozen by <a href='?priv_msg=\ref[usr.client]'>[key]</a></b></font>")
message_admins("\blue [key_name_admin(usr)] unfroze [key_name(M.occupant)] in a [M.name]")
log_admin("[key_name(usr)] unfroze [M.occupant.name]/[M.occupant.ckey] in a [M.name]")
else
+17 -12
View File
@@ -24,16 +24,16 @@
set category = null
if(!src.holder)
src << "<font color='red'>Only Admins may use this command.</font>"
to_chat(src, "<font color='red'>Only Admins may use this command.</font>")
return
var/client/target = input(src,"Choose somebody to grant access to the server's runtime logs (permissions expire at the end of each round):","Grant Permissions",null) as null|anything in clients
if(!istype(target,/client))
src << "<font color='red'>Error: giveruntimelog(): Client not found.</font>"
to_chat(src, "<font color='red'>Error: giveruntimelog(): Client not found.</font>")
return
target.verbs |= /client/proc/getruntimelog
target << "<font color='red'>You have been granted access to runtime logs. Please use them responsibly or risk being banned.</font>"
to_chat(target, "<font color='red'>You have been granted access to runtime logs. Please use them responsibly or risk being banned.</font>")
return
@@ -52,8 +52,9 @@
return
message_admins("[key_name_admin(src)] accessed file: [path]")
src << ftp( file(path) )
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
src << ftp(file(path))
to_chat(src, "Attempting to send file, this may take a fair few minutes if the file is very large.")
return
@@ -72,8 +73,9 @@
return
message_admins("[key_name_admin(src)] accessed file: [path]")
src << ftp( file(path) )
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
src << ftp(file(path))
to_chat(src, "Attempting to send file, this may take a fair few minutes if the file is very large.")
return
@@ -87,9 +89,10 @@
var/path = "data/logs/[time2text(world.realtime,"YYYY/MM-Month/DD-Day")].log"
if( fexists(path) )
src << ftp( file(path) )
src << ftp(file(path))
else
src << "<font color='red'>Error: view_txt_log(): File not found/Invalid path([path]).</font>"
to_chat(src, "<font color='red'>Error: view_txt_log(): File not found/Invalid path([path]).</font>")
return
feedback_add_details("admin_verb","VTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -102,10 +105,12 @@
var/path = "data/logs/[time2text(world.realtime,"YYYY/MM-Month/DD-Day")] Attack.log"
if( fexists(path) )
src << ftp( file(path) )
src << ftp(file(path))
else
src << "<font color='red'>Error: view_atk_log(): File not found/Invalid path([path]).</font>"
to_chat(src, "<font color='red'>Error: view_atk_log(): File not found/Invalid path([path]).</font>")
return
usr << run( file(path) )
usr << run(file(path))
feedback_add_details("admin_verb","SSAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
+5 -5
View File
@@ -5,13 +5,13 @@ var/global/sent_honksquad = 0
/client/proc/honksquad()
if(!ticker)
usr << "<font color='red'>The game hasn't started yet!</font>"
to_chat(usr, "<font color='red'>The game hasn't started yet!</font>")
return
if(world.time < 6000)
usr << "<font color='red'>There are [(6000-world.time)/10] seconds remaining before it may be called.</font>"
to_chat(usr, "<font color='red'>There are [(6000-world.time)/10] seconds remaining before it may be called.</font>")
return
if(sent_honksquad == 1)
usr << "<font color='red'>Clown Planet has already dispatched a HONKsquad.</font>"
to_chat(usr, "<font color='red'>Clown Planet has already dispatched a HONKsquad.</font>")
return
if(alert("Do you want to send in the HONKsquad? Once enabled, this is irreversible.",,"Yes","No")!="Yes")
return
@@ -25,7 +25,7 @@ var/global/sent_honksquad = 0
return
if(sent_honksquad)
usr << "Looks like someone beat you to it. HONK."
to_chat(usr, "Looks like someone beat you to it. HONK.")
return
sent_honksquad = 1
@@ -64,7 +64,7 @@ var/global/sent_honksquad = 0
//So they don't forget their code or mission.
new_honksquad.mind.store_memory("<B>Mission:</B> \red [input].")
new_honksquad << "\blue You are a HONKsquad. [!honk_leader_selected?"commando":"<B>LEADER</B>"] in the service of Clown Planet. You are called in cases of exteme low levels of HONK. You are NOT authorized to kill. \nYour current mission is: \red<B>[input]</B>"
to_chat(new_honksquad, "\blue You are a HONKsquad. [!honk_leader_selected?"commando":"<B>LEADER</B>"] in the service of Clown Planet. You are called in cases of exteme low levels of HONK. You are NOT authorized to kill. \nYour current mission is: \red<B>[input]</B>")
honksquad_number--
+2 -2
View File
@@ -188,7 +188,7 @@ var/list/admin_verbs_show_debug_verbs = list(
count++
atom_list += A
world << "There are [count] objects of type [type_path] on z-level [num_level]."
to_chat(world, "There are [count] objects of type [type_path] on z-level [num_level].")
feedback_add_details("admin_verb","mOBJZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_all()
@@ -209,5 +209,5 @@ var/list/admin_verbs_show_debug_verbs = list(
if(istype(A,type_path))
count++
world << "There are [count] objects of type [type_path] in the game world."
to_chat(world, "There are [count] objects of type [type_path] in the game world.")
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+12 -12
View File
@@ -30,7 +30,7 @@
for(var/p in forbidden_varedit_object_types)
if( istype(O,p) )
usr << "<span class='danger'>It is forbidden to edit this object's variables.</span>"
to_chat(usr, "<span class='danger'>It is forbidden to edit this object's variables.</span>")
return
var/list/names = list()
@@ -55,43 +55,43 @@
if(!check_rights(R_DEBUG)) return
if(isnull(var_value))
usr << "Unable to determine variable type."
to_chat(usr, "Unable to determine variable type.")
else if(isnum(var_value))
usr << "Variable appears to be <b>NUM</b>."
to_chat(usr, "Variable appears to be <b>NUM</b>.")
default = "num"
dir = 1
else if(istext(var_value))
usr << "Variable appears to be <b>TEXT</b>."
to_chat(usr, "Variable appears to be <b>TEXT</b>.")
default = "text"
else if(isloc(var_value))
usr << "Variable appears to be <b>REFERENCE</b>."
to_chat(usr, "Variable appears to be <b>REFERENCE</b>.")
default = "reference"
else if(isicon(var_value))
usr << "Variable appears to be <b>ICON</b>."
to_chat(usr, "Variable appears to be <b>ICON</b>.")
var_value = "\icon[var_value]"
default = "icon"
else if(istype(var_value,/atom) || istype(var_value,/datum))
usr << "Variable appears to be <b>TYPE</b>."
to_chat(usr, "Variable appears to be <b>TYPE</b>.")
default = "type"
else if(istype(var_value,/list))
usr << "Variable appears to be <b>LIST</b>."
to_chat(usr, "Variable appears to be <b>LIST</b>.")
default = "list"
else if(istype(var_value,/client))
usr << "Variable appears to be <b>CLIENT</b>."
to_chat(usr, "Variable appears to be <b>CLIENT</b>.")
default = "cancel"
else
usr << "Variable appears to be <b>FILE</b>."
to_chat(usr, "Variable appears to be <b>FILE</b>.")
default = "file"
usr << "Variable contains: [var_value]"
to_chat(usr, "Variable contains: [var_value]")
if(dir)
switch(var_value)
if(1)
@@ -113,7 +113,7 @@
else
dir = null
if(dir)
usr << "If a direction, direction is: [dir]"
to_chat(usr, "If a direction, direction is: [dir]")
var/class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
"num","type","icon","file","edit referenced object","restore to default")
+27 -27
View File
@@ -18,7 +18,7 @@ var/list/forbidden_varedit_object_types = list(
set name = "Edit Ticker Variables"
if (ticker == null)
src << "Game hasn't started yet."
to_chat(src, "Game hasn't started yet.")
else
src.modify_variables(ticker)
feedback_add_details("admin_verb","ETV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -53,7 +53,7 @@ var/list/forbidden_varedit_object_types = list(
var/type_text = input("Enter type:", "Type") as null|message
var_value = text2path(type_text)
if(!var_value)
src << "<span class='warning'>[type_text] is not a valid path!</span>"
to_chat(src, "<span class='warning'>[type_text] is not a valid path!</span>")
if("reference")
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
@@ -106,7 +106,7 @@ var/list/forbidden_varedit_object_types = list(
var/type_text = input("Enter type:", "Type") as null|message
var_value = text2path(type_text)
if(!var_value)
src << "<span class='warning'>[type_text] is not a valid path!</span>"
to_chat(src, "<span class='warning'>[type_text] is not a valid path!</span>")
if("reference")
var_value = input("Select reference:","Reference") as mob|obj|turf|area in world
@@ -135,8 +135,8 @@ var/list/forbidden_varedit_object_types = list(
/client/proc/mod_list(var/list/L)
if(!check_rights(R_VAREDIT)) return
if(!istype(L,/list)) src << "Not a List."
if(!istype(L,/list))
to_chat(src, "Not a List.")
if(L.len > 1000)
var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort")
if(confirm != "Continue")
@@ -149,7 +149,7 @@ var/list/forbidden_varedit_object_types = list(
var/a = L[1]
if(istext(a) && L[a] != null)
assoc = 1 //This is pretty weak test but i can't think of anything else
usr << "List appears to be associative."
to_chat(usr, "List appears to be associative.")
var/list/names = null
if(!assoc)
@@ -182,12 +182,12 @@ var/list/forbidden_varedit_object_types = list(
default = variable_to_type(variable)
usr << "Variable contains: [variable]"
to_chat(usr, "Variable contains: [variable]")
if(default == "num")
dir = dir2text(variable)
if(dir)
usr << "If a direction, direction is: [dir]"
to_chat(usr, "If a direction, direction is: [dir]")
var/class = "text"
var/list/allowed_types = list("text", "num","type", "type from text", "reference","mob reference", "icon","file","list","edit referenced object","restore to default","DELETE FROM LIST")
@@ -276,11 +276,11 @@ var/list/forbidden_varedit_object_types = list(
for(var/p in forbidden_varedit_object_types)
if( istype(O,p) )
usr << "<span class='warning'>It is forbidden to edit this object's variables.</span>"
to_chat(usr, "<span class='warning'>It is forbidden to edit this object's variables.</span>")
return
if(istype(O, /client) && (param_var_name == "ckey" || param_var_name == "key"))
usr << "<span class='warning'>You cannot edit ckeys on client objects.</span>"
to_chat(usr, "<span class='warning'>You cannot edit ckeys on client objects.</span>")
return
var/class
@@ -289,7 +289,7 @@ var/list/forbidden_varedit_object_types = list(
if(param_var_name)
if(!param_var_name in O.vars)
src << "A variable with this name ([param_var_name]) doesn't exist in this atom ([O])"
to_chat(src, "A variable with this name ([param_var_name]) doesn't exist in this atom ([O])")
return
if(param_var_name == "holder" || (param_var_name in locked))
@@ -330,11 +330,11 @@ var/list/forbidden_varedit_object_types = list(
else if(default == "icon")
var_value = "\icon[var_value]"
usr << "Variable contains: [var_value]"
to_chat(usr, "Variable contains: [var_value]")
if(dir)
dir = dir2text(var_value)
if(dir)
usr << "If a direction, direction is: [dir]"
to_chat(usr, "If a direction, direction is: [dir]")
var/list/allowed_types = list("text", "num","type","reference","mob reference", "path", "matrix", "icon","file","list","edit referenced object","restore to default")
if(src.holder && src.holder.marked_datum)
@@ -402,7 +402,7 @@ var/list/forbidden_varedit_object_types = list(
var/path_text = input("Enter path:", "Path",O.vars[variable]) as null|text
var/var_new = text2path(path_text)
if(!var_new && path_text != null) // So aborting doesn't bother the VVer
usr << "<span class='warning'>[path_text] does not appear to be a valid path.</span>"
to_chat(usr, "<span class='warning'>[path_text] does not appear to be a valid path.</span>")
return
O.vars[variable] = var_new
@@ -410,7 +410,7 @@ var/list/forbidden_varedit_object_types = list(
var/matrix_text = input("Enter a, b, c, d, e, and f, separated by a space.", "Matrix", "1 0 0 0 1 0") as null|text
var/var_new = text2matrix(matrix_text)
if(!var_new && matrix_text != null)
usr << "<span class='warning'>[matrix_text] is not a valid matrix string.</span>"
to_chat(usr, "<span class='warning'>[matrix_text] is not a valid matrix string.</span>")
return
O.vars[variable] = var_new
var_as_text = "matrix([matrix_text])"
@@ -449,51 +449,51 @@ var/list/forbidden_varedit_object_types = list(
/proc/variable_to_type(var/variable)
var/class
if(isnull(variable))
usr << "Unable to determine variable type."
to_chat(usr, "Unable to determine variable type.")
class = null
else if(isnum(variable))
usr << "Variable appears to be <b>NUM</b>."
to_chat(usr, "Variable appears to be <b>NUM</b>.")
class = "num"
else if(istext(variable))
usr << "Variable appears to be <b>TEXT</b>."
to_chat(usr, "Variable appears to be <b>TEXT</b>.")
class = "text"
else if(isloc(variable))
usr << "Variable appears to be <b>REFERENCE</b>."
to_chat(usr, "Variable appears to be <b>REFERENCE</b>.")
class = "reference"
else if(isicon(variable))
usr << "Variable appears to be <b>ICON</b>."
to_chat(usr, "Variable appears to be <b>ICON</b>.")
variable = "\icon[variable]"
class = "icon"
else if(istype(variable,/matrix))
usr << "Variable appears to be <b>MATRIX</b>"
to_chat(usr, "Variable appears to be <b>MATRIX</b>")
class = "matrix"
else if(istype(variable,/atom) || istype(variable,/datum))
usr << "Variable appears to be <b>TYPE</b>."
to_chat(usr, "Variable appears to be <b>TYPE</b>.")
class = "type"
else if(istype(variable,/list))
usr << "Variable appears to be <b>LIST</b>."
to_chat(usr, "Variable appears to be <b>LIST</b>.")
class = "list"
else if(istype(variable,/client))
usr << "Variable appears to be <b>CLIENT</b>."
to_chat(usr, "Variable appears to be <b>CLIENT</b>.")
class = "cancel"
else if(ispath(variable))
usr << "Variable appears to be <b>PATH</b>."
to_chat(usr, "Variable appears to be <b>PATH</b>.")
class = "path"
else if(isfile(variable))
usr << "Variable appears to be <b>FILE</b>."
to_chat(usr, "Variable appears to be <b>FILE</b>.")
class = "file"
else
usr << "Variable type is <b>UNKNOWN</b>."
to_chat(usr, "Variable type is <b>UNKNOWN</b>.")
class = null
return class
+5 -5
View File
@@ -377,7 +377,7 @@ client/proc/one_click_antag()
//So they don't forget their code or mission.
new_syndicate_commando << "\blue You are an Elite Syndicate. [!syndicate_leader_selected?"commando":"<B>LEADER</B>"] in the service of the Syndicate. \nYour current mission is: \red<B> [input]</B>"
to_chat(new_syndicate_commando, "\blue You are an Elite Syndicate. [!syndicate_leader_selected?"commando":"<B>LEADER</B>"] in the service of the Syndicate. \nYour current mission is: \red<B> [input]</B>")
numagents--
if(numagents >= 6)
@@ -482,8 +482,8 @@ client/proc/one_click_antag()
break
new_vox.key = theghost.key
new_vox << "\blue You are a Vox Primalis, fresh out of the Shoal. Your ship has arrived at the Tau Ceti system hosting the NSV Exodus... or was it the Luna? NSS? Utopia? Nobody is really sure, but everyong is raring to start pillaging! Your current goal is: \red<B> [input]</B>"
new_vox << "\red Don't forget to turn on your nitrogen internals!"
to_chat(new_vox, "\blue You are a Vox Primalis, fresh out of the Shoal. Your ship has arrived at the Tau Ceti system hosting the NSV Exodus... or was it the Luna? NSS? Utopia? Nobody is really sure, but everyong is raring to start pillaging! Your current goal is: \red<B> [input]</B>")
to_chat(new_vox, "\red Don't forget to turn on your nitrogen internals!")
raiders--
if(raiders > max_raiders)
@@ -612,7 +612,7 @@ client/proc/one_click_antag()
newMember.key = theghost.key
teamOneMembers--
newMember << "You are a member of the <font color = 'green'><b>GREEN</b></font> Thunderdome team! Gear up and help your team destroy the red team!"
to_chat(newMember, "You are a member of the <font color = 'green'><b>GREEN</b></font> Thunderdome team! Gear up and help your team destroy the red team!")
if(L.name == "tdome2")
if(teamTwoMembers<=0)
@@ -634,7 +634,7 @@ client/proc/one_click_antag()
newMember.key = theghost.key
teamTwoMembers--
newMember << "You are a member of the <font color = 'red'><b>RED</b></font> Thunderdome team! Gear up and help your team destroy the green team!"
to_chat(newMember, "You are a member of the <font color = 'red'><b>RED</b></font> Thunderdome team! Gear up and help your team destroy the green team!")
else
return 0
return 1
+6 -6
View File
@@ -21,10 +21,10 @@
hijack_objective.owner = H.mind
H.mind.objectives += hijack_objective
H << "<B>You are a Highlander. Kill all other Highlanders. There can be only one.</B>"
to_chat(H, "<B>You are a Highlander. Kill all other Highlanders. There can be only one.</B>")
var/obj_count = 1
for(var/datum/objective/OBJ in H.mind.objectives)
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
to_chat(H, "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]")
obj_count++
for (var/obj/item/I in H)
@@ -55,7 +55,7 @@
message_admins("[key_name_admin(usr)] used THERE CAN BE ONLY ONE! -NO ATTACK LOGS WILL BE SENT TO ADMINS FROM THIS POINT FORTH-", 1)
log_admin("[key_name(usr)] used there can be only one.")
nologevent = 1
world << sound('sound/music/THUNDERDOME.ogg')
to_chat(world, sound('sound/music/THUNDERDOME.ogg'))
/client/proc/only_me()
if(!ticker)
@@ -73,10 +73,10 @@
hijack_objective.owner = H.mind
H.mind.objectives += hijack_objective
H << "<B>You are the multiverse summoner. Activate your blade to summon copies of yourself from another universe to fight by your side.</B>"
to_chat(H, "<B>You are the multiverse summoner. Activate your blade to summon copies of yourself from another universe to fight by your side.</B>")
var/obj_count = 1
for(var/datum/objective/OBJ in H.mind.objectives)
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
to_chat(H, "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]")
obj_count++
var/obj/item/slot_item_ID = H.get_item_by_slot(slot_wear_id)
@@ -101,4 +101,4 @@
message_admins("[key_name_admin(usr)] used THERE CAN BE ONLY ME! -NO ATTACK LOGS WILL BE SENT TO ADMINS FROM THIS POINT FORTH-", 1)
log_admin("[key_name(usr)] used there can be only me.")
nologevent = 1
world << sound('sound/music/THUNDERDOME.ogg')
to_chat(world, sound('sound/music/THUNDERDOME.ogg'))
+4 -4
View File
@@ -21,7 +21,7 @@
continue
qdel(I)
H << "<B>You are part of the [station_name()] dodgeball tournament. Throw dodgeballs at crewmembers wearing a different color than you. OOC: Use THROW on an EMPTY-HAND to catch thrown dodgeballs.</B>"
to_chat(H, "<B>You are part of the [station_name()] dodgeball tournament. Throw dodgeballs at crewmembers wearing a different color than you. OOC: Use THROW on an EMPTY-HAND to catch thrown dodgeballs.</B>")
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/weapon/beach_ball/dodgeball(H), slot_r_hand)
@@ -75,13 +75,13 @@
if(H.l_hand == src) return
var/mob/A = H.LAssailant
if((H in team_alpha) && (A in team_alpha))
A << "<span class='warning'>He's on your team!</span>"
to_chat(A, "<span class='warning'>He's on your team!</span>")
return
else if((H in team_bravo) && (A in team_bravo))
A << "<span class='warning'>He's on your team!</span>"
to_chat(A, "<span class='warning'>He's on your team!</span>")
return
else if(!A in team_alpha && !A in team_bravo)
A << "<span class='warning'>You're not part of the dodgeball game, sorry!</span>"
to_chat(A, "<span class='warning'>You're not part of the dodgeball game, sorry!</span>")
return
else
playsound(src, 'sound/items/dodgeball.ogg', 50, 1)
+1 -1
View File
@@ -90,7 +90,7 @@ var/list/sounds_cache = list()
for(var/mob/living/carbon/human/CP in world)
if(CP.real_name=="Cuban Pete" && CP.key!="Rosham")
CP << "Your body can't contain the rhumba beat"
C << "Your body can't contain the rhumba beat"
CP.gib()
+1 -1
View File
@@ -4,7 +4,7 @@
if(istype(O,/obj/singularity))
if(config.forbid_singulo_possession)
usr << "It is forbidden to possess singularities."
to_chat(usr, "It is forbidden to possess singularities.")
return
var/turf/T = get_turf(O)
+11 -12
View File
@@ -7,7 +7,7 @@
if(usr.client)
if(usr.client.prefs.muted & MUTE_PRAY)
usr << "\red You cannot pray (muted)."
to_chat(usr, "\red You cannot pray (muted).")
return
if(src.client.handle_spam_prevention(msg,MUTE_PRAY))
return
@@ -17,9 +17,9 @@
for(var/client/X in admins)
if(check_rights(R_EVENT,0,X.mob))
X << msg
to_chat(X, msg)
usr << "Your prayers have been received by the gods."
to_chat(usr, "Your prayers have been received by the gods.")
feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//log_admin("HELP: [key_name(src)]: [msg]")
@@ -30,7 +30,7 @@
for(var/client/X in admins)
if(R_EVENT & X.holder.rights)
X << msg
to_chat(X, msg)
/proc/Syndicate_announce(var/text , var/mob/Sender)
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
@@ -38,7 +38,7 @@
for(var/client/X in admins)
if(check_rights(R_EVENT,0,X.mob))
X << msg
to_chat(X, msg)
/proc/HONK_announce(var/text , var/mob/Sender)
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
@@ -46,7 +46,7 @@
for(var/client/X in admins)
if(R_EVENT & X.holder.rights)
X << msg
to_chat(X, msg)
/proc/ERT_Announce(var/text , var/mob/Sender)
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
@@ -54,15 +54,14 @@
for(var/client/X in admins)
if(check_rights(R_EVENT,0,X.mob))
X << msg
to_chat(X, msg)
/proc/Nuke_request(text , mob/Sender)
var/nuke_code = get_nuke_code()
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST: </font>[key_name(Sender)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
for(var/client/X in admins)
if(check_rights(R_EVENT,0,X.mob))
X << msg
X << "<span class='adminnotice'><b>The nuke code is [nuke_code].</b></span>"
to_chat(X, msg)
to_chat(X, "<span class='adminnotice'><b>The nuke code is [nuke_code].</b></span>")
+41 -40
View File
@@ -39,7 +39,7 @@
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/orange(prisoner), slot_w_uniform)
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes)
spawn(50)
M << "\red You have been sent to the prison station!"
to_chat(M, "\red You have been sent to the prison station!")
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.")
message_admins("\blue [key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.", 1)
feedback_add_details("admin_verb","PRISON") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -61,7 +61,7 @@
if(usr)
if (usr.client)
if(usr.client.holder)
M << "\bold You hear a voice in your head... \italic [msg]"
to_chat(M, "\bold You hear a voice in your head... \italic [msg]")
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
message_admins("\blue \bold SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]", 1)
@@ -91,12 +91,12 @@
msg += "[key_name_admin(C)]: account is [C.player_age] days old<br>"
if(missing_ages)
src << "Some accounts did not have proper ages set in their clients. This function requires database to be present"
to_chat(src, "Some accounts did not have proper ages set in their clients. This function requires database to be present")
if(msg != "")
src << browse(msg, "window=Player_age_check")
else
src << "No matches for that age range found."
to_chat(src, "No matches for that age range found.")
/client/proc/cmd_admin_world_narrate() // Allows administrators to fluff events a little easier -- TLE
@@ -110,7 +110,7 @@
if (!msg)
return
world << "[msg]"
to_chat(world, "[msg]")
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
message_admins("\blue \bold GlobalNarrate: [key_name_admin(usr)]: [msg]<BR>", 1)
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -133,7 +133,7 @@
if( !msg )
return
M << msg
to_chat(M, msg)
log_admin("DirectNarrate: [key_name(usr)] to ([key_name(M)]): [msg]")
message_admins("\blue \bold DirectNarrate: [key_name_admin(usr)] to ([key_name_admin(M)]): [msg]<BR>", 1)
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -146,7 +146,7 @@
return
M.status_flags ^= GODMODE
usr << "\blue Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]"
to_chat(usr, "\blue Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]")
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]", 1)
@@ -161,10 +161,10 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
if(!usr || !usr.client)
return
if(!check_rights(R_ADMIN|R_MOD))
usr << "<font color='red'>Error: cmd_admin_mute: You don't have permission to do this.</font>"
to_chat(usr, "<font color='red'>Error: cmd_admin_mute: You don't have permission to do this.</font>")
return
if(!M.client)
usr << "<font color='red'>Error: cmd_admin_mute: This mob doesn't have a client tied to it.</font>"
to_chat(usr, "<font color='red'>Error: cmd_admin_mute: This mob doesn't have a client tied to it.</font>")
if(!M.client)
return
@@ -185,7 +185,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
M.client.prefs.muted |= mute_type
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(M)] from [mute_string]")
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
M << "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."
to_chat(M, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.")
feedback_add_details("admin_verb","AUTOMUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -198,7 +198,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
log_admin("[key_name(usr)] has [muteunmute] [key_name(M)] from [mute_string]")
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
M << "You have been [muteunmute] from [mute_string]."
to_chat(M, "You have been [muteunmute] from [mute_string].")
feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_add_random_ai_law()
@@ -235,18 +235,19 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
if(g.antagHUD)
g.antagHUD = 0 // Disable it on those that have it enabled
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
g << "\red <B>The Administrator has disabled AntagHUD </B>"
to_chat(g, "\red <B>The Administrator has disabled AntagHUD </B>")
config.antag_hud_allowed = 0
src << "\red <B>AntagHUD usage has been disabled</B>"
to_chat(src, "\red <B>AntagHUD usage has been disabled</B>")
action = "disabled"
else
for(var/mob/dead/observer/g in get_ghosts())
if(!g.client.holder) // Add the verb back for all non-admin ghosts
g.verbs += /mob/dead/observer/verb/toggle_antagHUD
g << "\blue <B>The Administrator has enabled AntagHUD </B>" // Notify all observers they can now use AntagHUD
to_chat(g, "\blue <B>The Administrator has enabled AntagHUD </B>")// Notify all observers they can now use AntagHUD
config.antag_hud_allowed = 1
action = "enabled"
src << "\blue <B>AntagHUD usage has been enabled</B>"
to_chat(src, "\blue <B>AntagHUD usage has been enabled</B>")
log_admin("[key_name(usr)] has [action] antagHUD usage for observers")
@@ -263,19 +264,19 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
var/action=""
if(config.antag_hud_restricted)
for(var/mob/dead/observer/g in get_ghosts())
g << "\blue <B>The administrator has lifted restrictions on joining the round if you use AntagHUD</B>"
to_chat(g, "\blue <B>The administrator has lifted restrictions on joining the round if you use AntagHUD</B>")
action = "lifted restrictions"
config.antag_hud_restricted = 0
src << "\blue <B>AntagHUD restrictions have been lifted</B>"
to_chat(src, "\blue <B>AntagHUD restrictions have been lifted</B>")
else
for(var/mob/dead/observer/g in get_ghosts())
g << "\red <B>The administrator has placed restrictions on joining the round if you use AntagHUD</B>"
g << "\red <B>Your AntagHUD has been disabled, you may choose to re-enabled it but will be under restrictions </B>"
to_chat(g, "\red <B>The administrator has placed restrictions on joining the round if you use AntagHUD</B>")
to_chat(g, "\red <B>Your AntagHUD has been disabled, you may choose to re-enabled it but will be under restrictions </B>")
g.antagHUD = 0
g.has_enabled_antagHUD = 0
action = "placed restrictions"
config.antag_hud_restricted = 1
src << "\red <B>AntagHUD restrictions have been enabled</B>"
to_chat(src, "\red <B>AntagHUD restrictions have been enabled</B>")
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD")
message_admins("Admin [key_name_admin(usr)] has [action] on joining the round if they use AntagHUD", 1)
@@ -304,7 +305,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
break
if(!G_found)//If a ghost was not found.
usr << "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>"
to_chat(usr, "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>")
return
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
@@ -328,7 +329,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Now to give them their mind back.
G_found.mind.transfer_to(new_xeno) //be careful when doing stuff like this! I've already checked the mind isn't in use
new_xeno.key = G_found.key
new_xeno << "You have been fully respawned. Enjoy the game."
to_chat(new_xeno, "You have been fully respawned. Enjoy the game.")
message_admins("\blue [key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno.", 1)
return //all done. The ghost is auto-deleted
@@ -433,7 +434,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("\blue [key_name_admin(usr)] has respawned [key_name_admin(G_found)] as [new_character.real_name].", 1)
new_character << "You have been fully respawned. Enjoy the game."
to_chat(new_character, "You have been fully respawned. Enjoy the game.")
feedback_add_details("admin_verb","RSPCH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return new_character
@@ -452,7 +453,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(candidates.len)
ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
else
usr << "<font color='red'>Error: create_xeno(): no suitable candidates.</font>"
to_chat(usr, "<font color='red'>Error: create_xeno(): no suitable candidates.</font>")
if(!istext(ckey)) return 0
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Hunter","Sentinel","Drone","Larva")
@@ -484,7 +485,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
any = 1 //if no ghosts show up, any will just be 0
if(!any)
if(notify)
src << "There doesn't appear to be any ghosts for you to select."
to_chat(src, "There doesn't appear to be any ghosts for you to select.")
return
for(var/mob/M in mobs)
@@ -558,7 +559,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if("Yes")
communications_announcement.Announce(input, customname, , , , from);
if("No")
world << "\red [from] available at all communications consoles."
to_chat(world, "\red [from] available at all communications consoles.")
for (var/obj/machinery/computer/communications/C in machines)
if(! (C.stat & (BROKEN|NOPOWER) ) )
@@ -578,7 +579,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if("Yes")
command_announcement.Announce(input, customname);
if("No")
world << "\red New Nanotrasen Update available at all communication consoles."
to_chat(world, "\red New Nanotrasen Update available at all communication consoles.")
for (var/obj/machinery/computer/communications/C in machines)
if(! (C.stat & (BROKEN|NOPOWER) ) )
@@ -589,7 +590,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
C.messagetitle.Add("[command_name()] Update")
C.messagetext.Add(P.info)
//world << sound('sound/AI/commandreport.ogg')
// to_chat(world, sound('sound/AI/commandreport.ogg'))
log_admin("[key_name(src)] has created a communications report: [input]")
message_admins("[key_name_admin(src)] has created a communications report", 1)
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -621,7 +622,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(job_master)
for(var/datum/job/job in job_master.occupations)
src << "[job.title]: [job.total_positions]"
to_chat(src, "[job.title]: [job.total_positions]")
feedback_add_details("admin_verb","LFS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in view())
@@ -727,7 +728,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/list/L = M.get_contents()
for(var/t in L)
usr << "[t]"
to_chat(usr, "[t]")
feedback_add_details("admin_verb","CC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_view_range()
@@ -809,9 +810,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
usr << text("\red <b>Attack Log for []</b>", mob)
to_chat(usr, text("\red <b>Attack Log for []</b>", mob))
for(var/t in M.attack_log)
usr << t
to_chat(usr, t)
feedback_add_details("admin_verb","ATTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -824,13 +825,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
return
if (ticker && ticker.mode)
usr << "Nope you can't do this, the game's already started. This only works before rounds!"
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!")
return
if(ticker.random_players)
ticker.random_players = 0
message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.", 1)
usr << "Disabled."
to_chat(usr, "Disabled.")
return
@@ -842,9 +843,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.", 1)
if(notifyplayers == "Yes")
world << "\blue <b>Admin [usr.key] has forced the players to have completely random identities!"
to_chat(world, "\blue <b>Admin [usr.key] has forced the players to have completely random identities!")
usr << "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>."
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.")
ticker.random_players = 1
feedback_add_details("admin_verb","MER") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -859,11 +860,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!config.allow_random_events)
config.allow_random_events = 1
usr << "Random events enabled"
to_chat(usr, "Random events enabled")
message_admins("Admin [key_name_admin(usr)] has enabled random events.", 1)
else
config.allow_random_events = 0
usr << "Random events disabled"
to_chat(usr, "Random events disabled")
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -877,12 +878,12 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(ticker.mode.ert_disabled)
ticker.mode.ert_disabled = 0
usr << "\blue ERT has been <b>Enabled</b>."
to_chat(usr, "\blue ERT has been <b>Enabled</b>.")
log_admin("Admin [key_name(src)] has enabled ERT calling.")
message_admins("Admin [key_name_admin(usr)] has enabled ERT calling.", 1)
else
ticker.mode.ert_disabled = 1
usr << "\red ERT has been <b>Disabled</b>."
to_chat(usr, "\red ERT has been <b>Disabled</b>.")
log_admin("Admin [key_name(src)] has disabled ERT calling.")
message_admins("Admin [key_name_admin(usr)] has disabled ERT calling.", 1)
+4 -4
View File
@@ -5,10 +5,10 @@ var/global/sent_strike_team = 0
/client/proc/strike_team()
if(!ticker)
usr << "<font color='red'>The game hasn't started yet!</font>"
to_chat(usr, "<font color='red'>The game hasn't started yet!</font>")
return
if(sent_strike_team == 1)
usr << "<font color='red'>CentComm is already sending a team.</font>"
to_chat(usr, "<font color='red'>CentComm is already sending a team.</font>")
return
if(alert("Do you want to send in the CentComm death squad? Once enabled, this is irreversible.",,"Yes","No")!="Yes")
return
@@ -22,7 +22,7 @@ var/global/sent_strike_team = 0
return
if(sent_strike_team)
usr << "Looks like someone beat you to it."
to_chat(usr, "Looks like someone beat you to it.")
return
sent_strike_team = 1
@@ -71,7 +71,7 @@ var/global/sent_strike_team = 0
new_commando.mind.store_memory("<B>Nuke Code:</B> \red [nuke_code].")
new_commando.mind.store_memory("<B>Mission:</B> \red [input].")
new_commando << "\blue You are a Special Ops. [!leader_selected?"commando":"<B>LEADER</B>"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: \red<B>[input]</B>"
to_chat(new_commando, "\blue You are a Special Ops. [!leader_selected?"commando":"<B>LEADER</B>"] in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: \red<B>[input]</B>")
commando_number--
@@ -7,7 +7,7 @@ var/global/sent_syndicate_strike_team = 0
set name = "Spawn Syndicate Strike Team"
set desc = "Spawns a squad of commandos in the Syndicate Mothership if you want to run an admin event."
if(!src.holder)
src << "Only administrators may use this command."
to_chat(src, "Only administrators may use this command.")
return
if(!ticker)
alert("The game hasn't started yet!")
@@ -27,7 +27,7 @@ var/global/sent_syndicate_strike_team = 0
return
if(sent_syndicate_strike_team)
src << "Looks like someone beat you to it."
to_chat(src, "Looks like someone beat you to it.")
return
sent_syndicate_strike_team = 1
@@ -78,7 +78,7 @@ var/global/sent_syndicate_strike_team = 0
new_syndicate_commando.mind.store_memory("<B>Nuke Code:</B> \red [nuke_code].")
new_syndicate_commando.mind.store_memory("<B>Mission:</B> \red [input].")
new_syndicate_commando << "\blue You are an Elite Syndicate. [!syndicate_leader_selected?"commando":"<B>LEADER</B>"] in the service of the Syndicate. \nYour current mission is: \red<B>[input]</B>"
to_chat(new_syndicate_commando, "\blue You are an Elite Syndicate. [!syndicate_leader_selected?"commando":"<B>LEADER</B>"] in the service of the Syndicate. \nYour current mission is: \red<B>[input]</B>")
syndicate_commando_number--
+1 -1
View File
@@ -19,6 +19,6 @@
if("Yes") config.Tickcomp = 1
else config.Tickcomp = 0
else
src << "\red Error: ticklag(): Invalid world.ticklag value. No changes made."
to_chat(src, "\red Error: ticklag(): Invalid world.ticklag value. No changes made.")
+4 -4
View File
@@ -3,20 +3,20 @@
set name = "Create AI Triumvirate"
if(ticker.current_state > GAME_STATE_PREGAME)
usr << "This option is currently only usable during pregame. This may change at a later date."
to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.")
return
if(job_master && ticker)
var/datum/job/job = job_master.GetJob("AI")
if(!job)
usr << "Unable to locate the AI job"
to_chat(usr, "Unable to locate the AI job")
return
if(ticker.triai)
ticker.triai = 0
usr << "Only one AI will be spawned at round start."
to_chat(usr, "Only one AI will be spawned at round start.")
message_admins("\blue [key_name_admin(usr)] has toggled off triple AIs at round start.", 1)
else
ticker.triai = 1
usr << "There will be an AI Triumvirate at round start."
to_chat(usr, "There will be an AI Triumvirate at round start.")
message_admins("\blue [key_name_admin(usr)] has toggled on triple AIs at round start.", 1)
return
+2 -2
View File
@@ -12,13 +12,13 @@
log_game("SQL ERROR obtaining ckey from player table. Error : \[[err]\]\n")
return
if(!query_watchfind.NextRow())
usr << "<span class='redtext'>[new_ckey] has not been seen before, you can only add known players.</span>"
to_chat(usr, "<span class='redtext'>[new_ckey] has not been seen before, you can only add known players.</span>")
return
else
target_ckey = new_ckey
var/target_sql_ckey = sanitizeSQL(target_ckey)
if(check_watchlist(target_sql_ckey))
usr << "<span class='redtext'>[target_sql_ckey] is already on the watchlist.</span>"
to_chat(usr, "<span class='redtext'>[target_sql_ckey] is already on the watchlist.</span>")
return
var/reason = input(usr,"Please state the reason","Reason") as message|null
if(!reason)