mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-26 06:06:18 +01:00
SQL notes system
Creates and impliments a system of playernotes that actively pulls data from SQL. Has one transfer proc in it that probably should not be run unless the table is set up.
This commit is contained in:
@@ -908,6 +908,9 @@
|
||||
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
|
||||
if(!config.ban_legacy_system)
|
||||
notes_add_sql(M.ckey, "Banned for: [reason]. Duration: [mins] minutes.", usr.client.ckey, M.lastKnownIP, M.computer_id)
|
||||
|
||||
del(M.client)
|
||||
//del(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
|
||||
if("No")
|
||||
@@ -933,6 +936,9 @@
|
||||
feedback_inc("ban_perma",1)
|
||||
DB_ban_record(BANTYPE_PERMA, M, -1, reason)
|
||||
|
||||
if(!config.ban_legacy_system)
|
||||
notes_add_sql(M.ckey, "Banned for: [reason]. The ban is permanent.", usr.client.ckey, M.lastKnownIP, M.computer_id)
|
||||
|
||||
del(M.client)
|
||||
//del(M)
|
||||
if("Cancel")
|
||||
@@ -2763,7 +2769,17 @@
|
||||
var/add = input("Add Player Info") as null|text
|
||||
if(!add) return
|
||||
|
||||
notes_add(key,add,usr)
|
||||
if(config.ban_legacy_system)
|
||||
notes_add(key,add,usr)
|
||||
else
|
||||
var/IP
|
||||
var/CID
|
||||
var/client/C = directory[key]
|
||||
if(C)
|
||||
IP = C.address
|
||||
CID = C.computer_id
|
||||
notes_add_sql(key, add, src.owner:ckey, IP, CID)
|
||||
|
||||
show_player_info(key)
|
||||
|
||||
if(href_list["remove_player_info"])
|
||||
@@ -2836,4 +2852,20 @@
|
||||
M.client.adminhelped = 1
|
||||
else
|
||||
usr << "<font color=red><b>The adminhelp has already been claimed.</b></font>"
|
||||
return
|
||||
|
||||
else if(href_list["dbnoteedit"])
|
||||
var/noteedit = href_list["dbnoteedit"]
|
||||
var/noteid = text2num(href_list["dbnoteid"])
|
||||
if(!noteedit || !noteid)
|
||||
return
|
||||
|
||||
notes_edit_sql(noteid, noteedit)
|
||||
return
|
||||
|
||||
else if(href_list["notessearchckey"] || href_list["notessearchadmin"])
|
||||
var/adminckey = href_list["notessearchadmin"]
|
||||
var/playerckey = href_list["notessearchckey"]
|
||||
|
||||
show_notes_sql(playerckey, adminckey)
|
||||
return
|
||||
Reference in New Issue
Block a user