From f9b6dfcefe125b799bc701645f9ab01f32c35a8b Mon Sep 17 00:00:00 2001 From: Jordie0608 Date: Tue, 28 Jul 2015 23:24:25 +1000 Subject: [PATCH] login memo fix --- code/modules/admin/admin_memo.dm | 15 +++++++++++++-- code/modules/client/client procs.dm | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/admin_memo.dm b/code/modules/admin/admin_memo.dm index 791f22a56d3..7c40c3aa53a 100644 --- a/code/modules/admin/admin_memo.dm +++ b/code/modules/admin/admin_memo.dm @@ -1,9 +1,20 @@ -/client/proc/admin_memo(task in list("Show","Write","Edit","Remove")) +/client/proc/admin_memo() set name = "Memo" set category = "Server" if(!check_rights(0)) return if(!dbcon.IsConnected()) - usr << "Failed to establish database connection." + src << "Failed to establish database connection." + return + var/memotask = input(usr,"Choose task.","Memo") in list("Show","Write","Edit","Remove") + if(!memotask) + return + admin_memo_output(memotask) + +/client/proc/admin_memo_output(task) + if(!task) + return + if(!dbcon.IsConnected()) + src << "Failed to establish database connection." return var/sql_ckey = sanitizeSQL(src.ckey) switch(task) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 4e07e0d8a3c..15de84c0369 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -128,7 +128,7 @@ var/next_external_rsc = 0 if(holder) add_admin_verbs() - admin_memo("Show") + admin_memo_output("Show") if((global.comms_key == "default_pwd" || length(global.comms_key) <= 6) && global.comms_allowed) //It's the default value or less than 6 characters long, but it somehow didn't disable comms. src << "The server's API key is either too short or is the default value! Consider changing it immediately!"