mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
database notes
This commit is contained in:
+47
-15
@@ -505,7 +505,7 @@
|
||||
feedback_inc("ban_appearance",1)
|
||||
DB_ban_record(BANTYPE_APPEARANCE, M, -1, reason)
|
||||
appearance_fullban(M, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
|
||||
notes_add(M.ckey, "Appearance banned - [reason]")
|
||||
add_note(M.ckey, "Appearance banned - [reason]", null, usr, 0)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] appearance banned [key_name_admin(M)]</span>")
|
||||
M << "<span class='boldannounce'><BIG>You have been appearance banned by [usr.client.ckey].</BIG></span>"
|
||||
M << "<span class='boldannounce'>The reason is: [reason]</span>"
|
||||
@@ -921,7 +921,7 @@
|
||||
msg = job
|
||||
else
|
||||
msg += ", [job]"
|
||||
notes_add(M.ckey, "Banned from [msg] - [reason]")
|
||||
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr, 0)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes</span>")
|
||||
M << "<span class='boldannounce'><BIG>You have been jobbanned by [usr.client.ckey] from: [msg].</BIG></span>"
|
||||
M << "<span class='boldannounce'>The reason is: [reason]</span>"
|
||||
@@ -941,7 +941,7 @@
|
||||
jobban_fullban(M, job, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
|
||||
if(!msg) msg = job
|
||||
else msg += ", [job]"
|
||||
notes_add(M.ckey, "Banned from [msg] - [reason]")
|
||||
add_note(M.ckey, "Banned from [msg] - [reason]", null, usr, 0)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]</span>")
|
||||
M << "<span class='boldannounce'><BIG>You have been jobbanned by [usr.client.ckey] from: [msg].</BIG></span>"
|
||||
M << "<span class='boldannounce'>The reason is: [reason]</span>"
|
||||
@@ -994,17 +994,49 @@
|
||||
del(M.client)
|
||||
|
||||
//Player Notes
|
||||
else if(href_list["notes"])
|
||||
var/ckey = href_list["ckey"]
|
||||
switch(href_list["notes"])
|
||||
if("show")
|
||||
notes_show(ckey)
|
||||
if("add")
|
||||
notes_add(ckey,href_list["text"], 1)
|
||||
notes_show(ckey)
|
||||
if("remove")
|
||||
notes_remove(ckey,text2num(href_list["from"]),text2num(href_list["to"]))
|
||||
notes_show(ckey)
|
||||
else if(href_list["addnote"])
|
||||
var/target_ckey = href_list["addnote"]
|
||||
world << "addnote: [target_ckey]"
|
||||
add_note(target_ckey)
|
||||
|
||||
else if(href_list["addnoteempty"])
|
||||
add_note()
|
||||
|
||||
else if(href_list["removenote"])
|
||||
var/note_id = href_list["removenote"]
|
||||
remove_note(note_id)
|
||||
|
||||
else if(href_list["editnote"])
|
||||
var/note_id = href_list["editnote"]
|
||||
edit_note(note_id)
|
||||
|
||||
else if(href_list["shownote"])
|
||||
var/target = href_list["shownote"]
|
||||
show_note(index = target)
|
||||
|
||||
else if(href_list["nonalpha"])
|
||||
var/target = href_list["nonalpha"]
|
||||
target = text2num(target)
|
||||
show_note(index = target)
|
||||
|
||||
else if(href_list["shownoteckey"])
|
||||
var/target_ckey = href_list["shownoteckey"]
|
||||
show_note(target_ckey)
|
||||
|
||||
else if(href_list["notessearch"])
|
||||
var/target = href_list["notessearch"]
|
||||
show_note(index = target)
|
||||
|
||||
else if(href_list["noteedits"])
|
||||
var/note_id = sanitizeSQL("[href_list["noteedits"]]")
|
||||
var/DBQuery/query_noteedits = dbcon.NewQuery("SELECT edits FROM [format_table_name("notes")] WHERE id = '[note_id]'")
|
||||
if(!query_noteedits.Execute())
|
||||
var/err = query_noteedits.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining edits from notes table. Error : \[[err]\]\n")
|
||||
return
|
||||
if(query_noteedits.NextRow())
|
||||
var/edit_log = query_noteedits.item[1]
|
||||
usr << browse(edit_log,"window=noteedits")
|
||||
|
||||
else if(href_list["removejobban"])
|
||||
if(!check_rights(R_BAN)) return
|
||||
@@ -2089,4 +2121,4 @@
|
||||
message_admins("[key_name_admin(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
|
||||
log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
|
||||
else
|
||||
usr << "You may only use this when the game is running"
|
||||
usr << "You may only use this when the game is running"
|
||||
Reference in New Issue
Block a user