mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-30 08:06:19 +01:00
Merge pull request #601 from Aurorastation/development
Hotfix, 08JUN2015
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 += "<tr bgcolor='#ffeeee'><td><b>[p_ckey]</b></td><td><b>[a_ckey]</b></td><td>[date]</td><td><center>[content]</center></td></tr>"
|
||||
dat += "<tr bgcolor='#ffeeee'><td align='center'><b>[p_ckey]</b></td><td align='center'><b>[a_ckey]</b></td><td align='center'>[date]</td><td align='center'>[content]</td></tr>"
|
||||
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 += "<tr bgcolor='#ffeeee'><td><b>[p_ckey]</b></td><td><b>[adminckey]</b></td><td>[date]</td><td><center>[content]</center></td></tr>"
|
||||
dat += "<tr bgcolor='#ffeeee'><td align='center'><b>[p_ckey]</b></td><td align='center'><b>[adminckey]</b></td><td align='center'>[date]</td><td align='center'>[content]</td></tr>"
|
||||
if(edited)
|
||||
var/lasteditor = adminquery.item[6]
|
||||
var/editdate = adminquery.item[7]
|
||||
@@ -194,7 +196,7 @@
|
||||
dat += "</table>"
|
||||
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.")
|
||||
msg_scopes("Transfer successful.")*/
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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 = "<font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[options]</b>: [msg]</font>"
|
||||
C << recieve_message
|
||||
src << "<font color='blue'>[send_pm_type]PM to-<b>[options]</b>: [msg]</font>"
|
||||
src << "<font color='blue'>[send_pm_type]PM to-<b>[get_options_bar(C, 0, 0, 1)]</b>: [msg]</font>"
|
||||
|
||||
//play the recieving admin the adminhelp sound (if they have them enabled)
|
||||
//non-admins shouldn't be able to disable this
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user