mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
Polaris sync
This commit is contained in:
@@ -161,7 +161,8 @@ var/list/admin_verbs_server = list(
|
||||
/datum/admins/proc/toggle_space_ninja,
|
||||
/client/proc/toggle_random_events,
|
||||
/client/proc/check_customitem_activity,
|
||||
/client/proc/nanomapgen_DumpImage
|
||||
/client/proc/nanomapgen_DumpImage,
|
||||
/client/proc/modify_server_news
|
||||
)
|
||||
var/list/admin_verbs_debug = list(
|
||||
/client/proc/getruntimelog, //allows us to access runtime logs to somebody,
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#define NEWSFILE "data/news.sav" //where the memos are saved
|
||||
|
||||
/client/
|
||||
var/last_news_hash = null // Stores a hash of the last news window it saw, which gets compared to the current one to see if it is different.
|
||||
|
||||
// Returns true if news was updated since last seen.
|
||||
/client/proc/check_for_new_server_news()
|
||||
var/savefile/F = get_server_news()
|
||||
if(F)
|
||||
if(md5(F["body"]) != last_news_hash)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/client/proc/modify_server_news()
|
||||
set name = "Modify Public News"
|
||||
set category = "Server"
|
||||
|
||||
if(!check_rights(0))
|
||||
return
|
||||
|
||||
var/savefile/F = new(NEWSFILE)
|
||||
if(F)
|
||||
var/title = F["title"]
|
||||
var/body = F["body"]
|
||||
var/new_title = sanitize(input(src,"Write a good title for the news update. Note: HTML is NOT supported.","Write News", title) as null|text, extra = 0)
|
||||
if(!new_title)
|
||||
return
|
||||
var/new_body = sanitize(input(src,"Write the body of the news update here. Note: HTML is NOT supported.","Write News", body) as null|message, extra = 0)
|
||||
if(findtext(new_body,"<script",1,0) ) // Is this needed with santize()?
|
||||
return
|
||||
F["title"] << new_title
|
||||
F["body"] << new_body
|
||||
F["author"] << key
|
||||
F["timestamp"] << time2text(world.realtime, "DDD, MMM DD YYYY")
|
||||
message_admins("[key] modified the news to read:<br>[new_title]<br>[new_body]")
|
||||
|
||||
/proc/get_server_news()
|
||||
var/savefile/F = new(NEWSFILE)
|
||||
if(F)
|
||||
return F
|
||||
|
||||
#undef NEWSFILE
|
||||
@@ -17,6 +17,8 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
|
||||
adminhelped = 1 //Determines if they get the message to reply by clicking the name.
|
||||
|
||||
handle_spam_prevention(MUTE_ADMINHELP)
|
||||
|
||||
//clean the input msg
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
if(!msg) return
|
||||
|
||||
if(usr.client)
|
||||
client.handle_spam_prevention(MUTE_PRAY)
|
||||
if(usr.client.prefs.muted & MUTE_PRAY)
|
||||
usr << "\red You cannot pray (muted)."
|
||||
return
|
||||
|
||||
@@ -158,7 +158,8 @@
|
||||
|
||||
proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
if(automute)
|
||||
if(!config.automute_on) return
|
||||
if(!config.automute_on)
|
||||
return
|
||||
else
|
||||
if(!usr || !usr.client)
|
||||
return
|
||||
@@ -169,8 +170,10 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
usr << "<font color='red'>Error: cmd_admin_mute: This mob doesn't have a client tied to it.</font>"
|
||||
if(M.client.holder)
|
||||
usr << "<font color='red'>Error: cmd_admin_mute: You cannot mute an admin/mod.</font>"
|
||||
if(!M.client) return
|
||||
if(M.client.holder) return
|
||||
if(!M.client)
|
||||
return
|
||||
if(M.client.holder)
|
||||
return
|
||||
|
||||
var/muteunmute
|
||||
var/mute_string
|
||||
|
||||
Reference in New Issue
Block a user