mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 23:52:12 +00:00
Features: Removal of BOREALIS (python module) as it's not used. Removes ToR ban feature in lieu of IPIntel. New BOREALIS config to alert staff if server starts as hidden. Adminhelps now inform admins on discord if dibsed (when they were sent to discord anyways). Adds hub visibility to the server access control panel. Adds mirror ban spotting via ban panel. It now redirects to the linked ban if one is found. CCIAA now get alerted as to how many of them are online and active when receiving faxes and emergency messages via Discord. Removed unused C/C++ libraries. The socket_talk module is a generic UDP shipper, of which Arrow implemented a better version. lib nudge is not even compiled for use. lib_nudge module is uncompiled and no longer used, as we use cURL for the bot. Removed depracted APIs and config settings related to the previous point. Whitelisted jobs now appear properly in the job selection window as [WHITELISTED]. Job ban reasons can now be viewed from player preferences window. Await admin approval for final CCIAA requests and implement. RIP CCIAA. Fix age bans for jobs and antags (dynamic ones, ofc). Implement https://forums.aurorastation.org/viewtopic.php?f=18&t=8283
126 lines
4.1 KiB
Plaintext
126 lines
4.1 KiB
Plaintext
|
|
//This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE!
|
|
var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","alien","as")
|
|
|
|
/client/verb/adminhelp(msg as text)
|
|
set category = "Admin"
|
|
set name = "Adminhelp"
|
|
|
|
if(say_disabled) //This is here to try to identify lag problems
|
|
usr << "<span class='warning'>Speech is currently admin-disabled.</span>"
|
|
return
|
|
|
|
//handle muting and automuting
|
|
if(prefs.muted & MUTE_ADMINHELP)
|
|
src << "<font color='red'>Error: Admin-PM: You cannot send adminhelps (Muted).</font>"
|
|
return
|
|
|
|
adminhelped = 2 //Determines if they get the message to reply by clicking the name.
|
|
|
|
/*A wee bit of an update here: we're using the following table for adminhelped values:
|
|
3 - Adminhelp has not been claimed and was sent to discord as well.
|
|
2 - Adminhelp has not been claimed by anyone.
|
|
1 - Adminhelp has been claimed, initial message has not been sent.
|
|
0 - Adminhelp has been claimed, initial message has been sent.
|
|
*/
|
|
|
|
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
|
|
return
|
|
|
|
//clean the input msg
|
|
if(!msg)
|
|
return
|
|
msg = sanitize(msg)
|
|
if(!msg)
|
|
return
|
|
var/original_msg = msg
|
|
|
|
//explode the input msg into a list
|
|
var/list/msglist = text2list(msg, " ")
|
|
|
|
//generate keywords lookup
|
|
var/list/surnames = list()
|
|
var/list/forenames = list()
|
|
var/list/ckeys = list()
|
|
for(var/mob/M in mob_list)
|
|
var/list/indexing = list(M.real_name, M.name)
|
|
if(M.mind) indexing += M.mind.name
|
|
|
|
for(var/string in indexing)
|
|
var/list/L = text2list(string, " ")
|
|
var/surname_found = 0
|
|
//surnames
|
|
for(var/i=L.len, i>=1, i--)
|
|
var/word = ckey(L[i])
|
|
if(word)
|
|
surnames[word] = M
|
|
surname_found = i
|
|
break
|
|
//forenames
|
|
for(var/i=1, i<surname_found, i++)
|
|
var/word = ckey(L[i])
|
|
if(word)
|
|
forenames[word] = M
|
|
//ckeys
|
|
ckeys[M.ckey] = M
|
|
|
|
var/ai_found = 0
|
|
msg = ""
|
|
var/list/mobs_found = list()
|
|
for(var/original_word in msglist)
|
|
var/word = ckey(original_word)
|
|
if(word)
|
|
if(!(word in adminhelp_ignored_words))
|
|
if(word == "ai")
|
|
ai_found = 1
|
|
else
|
|
var/mob/found = ckeys[word]
|
|
if(!found)
|
|
found = surnames[word]
|
|
if(!found)
|
|
found = forenames[word]
|
|
if(found)
|
|
if(!(found in mobs_found))
|
|
mobs_found += found
|
|
if(!ai_found && isAI(found))
|
|
ai_found = 1
|
|
msg += "<b><font color='black'>[original_word] (<A HREF='?_src_=holder;adminmoreinfo=\ref[found]'>?</A>)</font></b> "
|
|
continue
|
|
msg += "[original_word] "
|
|
|
|
if(!mob) //this doesn't happen
|
|
return
|
|
|
|
var/ai_cl
|
|
if(ai_found)
|
|
ai_cl = " (<A HREF='?_src_=holder;adminchecklaws=\ref[mob]'>CL</A>)"
|
|
|
|
//Options bar: mob, details ( admin = 2, undibbsed admin = 3, mentor = 4, character name (0 = just ckey, 1 = ckey and character name), link? (0 no don't make it a link, 1 do so),
|
|
// highlight special roles (0 = everyone has same looking name, 1 = antags / special roles get a golden name)
|
|
|
|
msg = "<span class='notice'><b><font color=red>Request for Help: </font>[get_options_bar(mob, 3, 1, 1)][ai_cl]:</b> [msg]</span>"
|
|
|
|
var/admin_number_present = 0
|
|
var/admin_number_afk = 0
|
|
|
|
for(var/client/X in admins)
|
|
if((R_ADMIN|R_MOD) & X.holder.rights)
|
|
admin_number_present++
|
|
if(X.is_afk())
|
|
admin_number_afk++
|
|
if(X.prefs.toggles & SOUND_ADMINHELP)
|
|
X << 'sound/effects/adminhelp.ogg'
|
|
|
|
X << msg
|
|
|
|
//show it to the person adminhelping too
|
|
src << "<font color='blue'>PM to-<b>Staff </b>: [original_msg]</font>"
|
|
|
|
var/admin_number_active = admin_number_present - admin_number_afk
|
|
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.",admin_key=key_name(src))
|
|
if(admin_number_active <= 0)
|
|
discord_bot.send_to_admins("@here Request for Help from [key_name(src)]: [html_decode(original_msg)] - !![admin_number_afk ? "All admins AFK ([admin_number_afk])" : "No admins online"]!!")
|
|
adminhelped = 3
|
|
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|