diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 9dfd9000..af695044 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -201,7 +201,8 @@ var/global/normal_ooc_colour = "#002eb8" if(C.prefs.toggles & CHAT_LOOC) var/stealth = "" if(C.holder && C.holder.rights & (R_ADMIN|R_MOD)) - stealth = "(stealth)" + if(C.holder.fakekey) + stealth = "(stealth)" var/prefix = "(R)LOOC" if (C.mob in heard) prefix = "LOOC" diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 4122ddf8..7eb93631 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -6,7 +6,7 @@ world/IsBanned(key,address,computer_id) return ..() //Making the adminbot for automated bans. - var/datum/admins/Adminbot = new /datum/admins(initial_rank = "Friendly Robot", initial_rights = 8196, "Adminbot") + var/datum/admins/Adminbot = new /datum/admins("Friendly Robot", 8196, "Adminbot") //Guest Checking if(!guests_allowed && IsGuestKey(key)) @@ -53,7 +53,7 @@ world/IsBanned(key,address,computer_id) message_mods("\blue Failed Login: [key] - Blacklisted IP. User banned.") var/reason = "This IP has been blacklisted from the server." - Adminbot.DB_ban_record(BANTYPE_PERMA, null, null, reason, null, null, ckey(key), 1, address, computer_id) + Adminbot.DB_ban_record(1, null, null, reason, null, null, ckey(key), 1, address, computer_id) notes_add_sql(key, reason, null, address, computer_id) del Adminbot @@ -128,7 +128,7 @@ world/IsBanned(key,address,computer_id) if(multikey) desc = "\nReason: You, or another user of this computer or connection ([pckey]) is banned from playing here. The ban reason is:\nThis is an automatic ban for attempted bandodging. The original ban reason is this: [reason]\nThis ban was applied by [ackey] on [bantime], [expires]" var/newreason = "This is an automatic ban for attempted bandodging. The original ban reason: [reason]." - Adminbot.DB_ban_record(BANTYPE_PERMA, null, null, reason, null, null, ckey(key), 1, address, computer_id) + Adminbot.DB_ban_record(1, null, null, reason, null, null, ckey(key), 1, address, computer_id) notes_add_sql(key, newreason, null, address, computer_id) del Adminbot diff --git a/code/modules/admin/player_notes_sql.dm b/code/modules/admin/player_notes_sql.dm index 9e59318e..f46fe12b 100644 --- a/code/modules/admin/player_notes_sql.dm +++ b/code/modules/admin/player_notes_sql.dm @@ -1,7 +1,7 @@ //System will now support SQL pulls for fetching player notes. //Yay! -/proc/notes_add_sql(var/key, var/note, var/usr, var/IP, var/CID) +/proc/notes_add_sql(var/key, var/note, var/mob/usr, var/IP, var/CID) if(!key || !note) return @@ -10,7 +10,7 @@ var/a_ckey if(usr) - a_ckey = sanitizeSQL(usr) + a_ckey = sanitizeSQL(usr.key) else a_ckey = "Adminbot" @@ -21,8 +21,10 @@ if(!IP || !CID) var/DBQuery/initquery = dbcon.NewQuery("SELECT ip, computerid FROM erro_player WHERE ckey = '[ckey]'") - IP = initquery.item[1] - CID = initquery.item[2] + initquery.Execute() + if(initquery.NextRow()) + IP = initquery.item[1] + CID = initquery.item[2] var/querycontents if(IP && CID) @@ -161,7 +163,7 @@ if(adminckey && ckey(a_ckey) != ckey(adminckey)) continue else - dat += "[p_ckey][a_ckey][date]
[content]
" + dat += "[p_ckey][a_ckey][date][content]" if(edited) var/lasteditor = query.item[7] var/editdate = query.item[8] @@ -183,7 +185,7 @@ var/content = adminquery.item[4] var/edited = text2num(adminquery.item[5]) - dat += "[p_ckey][adminckey][date]
[content]
" + dat += "[p_ckey][adminckey][date][content]" if(edited) var/lasteditor = adminquery.item[6] var/editdate = adminquery.item[7] @@ -194,7 +196,7 @@ dat += "" usr << browse(dat,"window=lookupnotes;size=900x500") -/proc/notes_transfer() +/*/proc/notes_transfer() msg_scopes("Locating master list.") var/savefile/note_list = new("data/player_notes.sav") var/list/note_keys @@ -270,4 +272,4 @@ if(insertquery.ErrorMsg()) msg_scopes(insertquery.ErrorMsg()) else - msg_scopes("Transfer successful.") \ No newline at end of file + msg_scopes("Transfer successful.")*/ diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index fe68382b..d3f0b078 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -909,7 +909,7 @@ 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) + notes_add_sql(M.ckey, "Banned for: [reason]. Duration: [mins] minutes.", usr, 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. @@ -937,7 +937,7 @@ 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) + notes_add_sql(M.ckey, "Banned for: [reason]. The ban is permanent.", usr, M.lastKnownIP, M.computer_id) del(M.client) //del(M) @@ -2774,11 +2774,13 @@ 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) + if(directory[key]) + var/client/C = directory[key] + if(C) + IP = C.address + CID = C.computer_id + + notes_add_sql(key, add, usr, IP, CID) show_player_info(key) diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 44f0b861..8fb8c70f 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -111,13 +111,13 @@ var/options = "" if(C.holder && C.holder.rights & (R_ADMIN|R_MOD|R_FUN|R_DEV)) - options = "[get_options_bar(src, 1, 1, 1)]" + options = "[get_options_bar(src, 1, 1, 1)]" //Gib the information om nom nom else - options = "[get_options_bar(src, 0, 0, 1)]" + options = "[get_options_bar(src, 0, 0, 1)]" //Hide it, just gib name recieve_message = "[recieve_pm_type] PM from-[options]: [msg]" C << recieve_message - src << "[send_pm_type]PM to-[options]: [msg]" + src << "[send_pm_type]PM to-[get_options_bar(C, 0, 0, 1)]: [msg]" //play the recieving admin the adminhelp sound (if they have them enabled) //non-admins shouldn't be able to disable this diff --git a/code/modules/admin/verbs/warning.dm b/code/modules/admin/verbs/warning.dm index 9334bc25..322b1a50 100644 --- a/code/modules/admin/verbs/warning.dm +++ b/code/modules/admin/verbs/warning.dm @@ -114,7 +114,7 @@ if(config.ban_legacy_system) notes_add(warned_ckey, "Warning added by [a_ckey], for: [reason]. || Notes regarding the warning: [notes].") else - notes_add_sql(warned_ckey, "Warning added by [a_ckey], for: [reason]. || Notes regarding the warning: [notes].", a_ckey, ip, computerid) + notes_add_sql(warned_ckey, "Warning added by [a_ckey], for: [reason]. || Notes regarding the warning: [notes].", src, ip, computerid) feedback_add_details("admin_verb","WARN-DB") if(C)