diff --git a/baystation12.dme b/baystation12.dme index 914ee0e05e..fd0b229b65 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -789,6 +789,7 @@ #include "code\js\byjax.dm" #include "code\js\menus.dm" #include "code\modules\admin\admin.dm" +#include "code\modules\admin\admin_memo.dm" #include "code\modules\admin\admin_verbs.dm" #include "code\modules\admin\banjob.dm" #include "code\modules\admin\create_mob.dm" diff --git a/code/modules/admin/admin_memo.dm b/code/modules/admin/admin_memo.dm new file mode 100644 index 0000000000..68b8c7e84b --- /dev/null +++ b/code/modules/admin/admin_memo.dm @@ -0,0 +1,54 @@ +#define MEMOFILE "data/memo.sav" //where the memos are saved +#define ENABLE_MEMOS 1 //using a define because screw making a config variable for it. This is more efficient and purty. + +//switch verb so we don't spam up the verb lists with like, 3 verbs for this feature. +/client/proc/admin_memo(task in list("write","show","delete")) + set name = "Memo" + set category = "Server" + if(!holder) return + switch(task) + if("write") + admin_memo_write() + if("show") + admin_memo_show() + if("delete") + admin_memo_delete() + + +//write a message +/client/proc/admin_memo_write() + var/savefile/F = new(MEMOFILE) + if(F) + var/memo = input(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null) as null|message + switch(memo) + if(null) + return + if("") + F.dir.Remove(ckey) + src << "Memo removed" + return + if( findtext(memo,"[memo]" + message_admins("[key] set an admin memo:
[memo]") + +//show all memos +/client/proc/admin_memo_show() + if(ENABLE_MEMOS) + var/savefile/F = new(MEMOFILE) + if(F) + for(var/ckey in F.dir) + src << "
Admin Memo by [F[ckey]]
" + +//delete your own or somebody else's memo +/client/proc/admin_memo_delete() + var/savefile/F = new(MEMOFILE) + if(F) + var/ckey + if( holder.rank == "Game Master" ) + ckey = input(src,"Whose memo shall we remove?","Remove Memo",null) as null|anything in F.dir + else + ckey = src.ckey + if(ckey) + F.dir.Remove(ckey) + src << "Removed Memo created by [ckey]." diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 186fadd0ee..733d6c1bcc 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -260,6 +260,7 @@ verbs += /client/proc/toggle_gravity_off verbs += /client/proc/toggle_random_events verbs += /client/proc/deadmin_self + if(ENABLE_MEMOS) verbs += /client/proc/admin_memo //verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables //verbs += /client/proc/cmd_admin_explosion --Merged with view variables //verbs += /client/proc/cmd_admin_emp --Merged with view variables @@ -425,6 +426,7 @@ verbs -= /client/proc/giveruntimelog //used by coders to retrieve runtime logs verbs -= /client/proc/getserverlog verbs -= /client/proc/cinematic //show a cinematic sequence + verbs -= /client/proc/admin_memo verbs -= /client/proc/cmd_admin_change_custom_event verbs -= /client/proc/admin_invis verbs -= /client/proc/callprocgen diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 06ccb4af05..ac0309f3a0 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -747,8 +747,8 @@ return /client/New() - if(findtextEx(key, "Telnet @")) - src << "Sorry, this game does not support Telnet." + if( connection != "seeker" ) + src << "Sorry, this game does not support [connection] connections." //doesn't work del(src) if (CheckBan(src)) del(src) @@ -771,8 +771,6 @@ ..() makejson() - if (join_motd) - src << "
[join_motd]
" if(custom_event_msg && custom_event_msg != "") src << "

Custom Event

" @@ -780,10 +778,11 @@ src << "[html_encode(custom_event_msg)]" src << "
" - if(admins.Find(ckey)) + if( ckey in admins ) holder = new /obj/admins(src) holder.rank = admins[ckey] update_admins(admins[ckey]) + admin_memo_show() if(ticker && ticker.mode && ticker.mode.name =="sandbox") mob.CanBuild() diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index f877058828..c5f213f906 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -15,6 +15,9 @@ anchored = 1 // don't get pushed around Login() + if (join_motd) + src << "
[join_motd]
" + if(!preferences) preferences = new