interface for watchlist, improvements to memo, varedit, ban interfaces

This commit is contained in:
Jordie0608
2015-08-27 20:57:01 +10:00
parent ba1a268305
commit 62fa9a163c
13 changed files with 213 additions and 87 deletions
+3 -2
View File
@@ -3,13 +3,14 @@
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)
var/new_ckey = ckey(input(usr,"Who would you like to add a note for?","Enter a ckey",null) as text)
if(!new_ckey)
return
new_ckey = sanitizeSQL(new_ckey)
var/DBQuery/query_find_ckey = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ckey = '[new_ckey]'")
if(!query_find_ckey.Execute())
var/err = query_find_ckey.ErrorMsg()
log_game("SQL ERROR obtaining ckey from notes table. Error : \[[err]\]\n")
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>"