Skip to content

Commit

Permalink
I know we should have had this forever but we didn't... Banning, unba…
Browse files Browse the repository at this point in the history
…nning and editing bans (both the regular and job flavored) is now logged into a separate file. (data/ban_unban_log.txt)

Also removed two unused variables from Runtime the cat.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2202 316c924e-a436-60f5-8080-3fe189b3f50e
  • Loading branch information
baloh.matevz committed Sep 14, 2011
1 parent 84d995a commit 4708139
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 3 deletions.
3 changes: 1 addition & 2 deletions code/defines/mob/simple_animal/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
var/min_n2 = 0
var/max_n2 = 0
var/unsuitable_atoms_damage = 2 //This damage is taken when atmos doesn't fit all the requirements above.

//Cat

/mob/living/simple_animal/cat
Expand Down Expand Up @@ -66,8 +67,6 @@
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "kicks"
var/turns_since_scan = 0
var/obj/movement_target

//Corgi
/mob/living/simple_animal/corgi
Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/NewBan.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ var/savefile/Banlist
log_admin("Ban Expired: [key]")
message_admins("Ban Expired: [key]")
else
ban_unban_log_save("[key_name_admin(usr)] unbanned [key]")
log_admin("[key_name_admin(usr)] unbanned [key]")
message_admins("[key_name_admin(usr)] unbanned: [key]")

Expand Down
9 changes: 9 additions & 0 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@
return

log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetExp(mins)]")

ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetExp(mins)]")
message_admins("\blue [key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [GetExp(mins)]", 1)
Banlist.cd = "/base/[banfolder]"
Banlist["reason"] << reason
Expand Down Expand Up @@ -162,11 +164,13 @@
return
if (jobban_isbanned(M, job))
log_admin("[key_name(usr)] unbanned [key_name(M)] from [job]")
ban_unban_log_save("[key_name(usr)] unjobbanned [key_name(M)] from [job]")
M << "\red<BIG><B>You have been un-jobbanned by [usr.client.ckey] from [job].</B></BIG>"
message_admins("\blue [key_name_admin(usr)] unbanned [key_name_admin(M)] from [job]", 1)
jobban_unban(M, job)
href_list["jobban2"] = 1
else
ban_unban_log_save("[key_name(usr)] jobbanned [key_name(M)] from [job]")
log_admin("[key_name(usr)] banned [key_name(M)] from [job]")
M << "\red<BIG><B>You have been jobbanned by [usr.client.ckey] from [job].</B></BIG>"
M << "\red Jooban can be lifted only on demand."
Expand All @@ -182,6 +186,7 @@
if ((M.client && M.client.holder && (M.client.holder.level >= src.level)))
alert("You cannot perform this action. You must be of a higher administrative rank!", null, null, null, null, null)
return
M << "\red You have been kicked from the server"
log_admin("[key_name(usr)] booted [key_name(M)].")
message_admins("\blue [key_name_admin(usr)] booted [key_name_admin(M)].", 1)
//M.client = null
Expand Down Expand Up @@ -213,6 +218,7 @@
if(!reason)
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.")
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG>"
M << "\red This is a temporary ban, it will be removed in [mins] minutes."
if(config.banappeals)
Expand All @@ -235,6 +241,7 @@
M << "\red To try to resolve this matter head to [config.banappeals]"
else
M << "\red No ban appeals URL has been set."
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.")
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")

Expand Down Expand Up @@ -311,6 +318,7 @@
M << "\red To try to resolve this matter head to [config.banappeals]"
else
M << "\red No ban appeals URL has been set."
ban_unban_log_save("[usr.client.ckey] has jobbanned [M.ckey] from [job]. - Reason: [reason] - This will be removed in [mins] minutes.")
log_admin("[usr.client.ckey] has banned [M.ckey] from [job].\nReason: [reason]\nThis will be removed in [mins] minutes.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey] from [job].\nReason: [reason]\nThis will be removed in [mins] minutes.")

Expand All @@ -327,6 +335,7 @@
M << "\red To try to resolve this matter head to [config.banappeals]"
else
M << "\red No ban appeals URL has been set."
ban_unban_log_save("[usr.client.ckey] has banned [M.ckey] from [job]. - Reason: [reason] - This is a permanent ban.")
log_admin("[usr.client.ckey] has banned [M.ckey] from [job].\nReason: [reason]\nThis is a permanent ban.")
message_admins("\blue[usr.client.ckey] has banned [M.ckey] from [job].\nReason: [reason]\nThis is a permanent ban.")

Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@
M << "\red<BIG><B>You have been autobanned by [ckey]. This is what we in the biz like to call a \"second warning\".</B></BIG>"
M << "\red This is a temporary ban; it will automatically be removed in [AUTOBATIME] minutes."
log_admin("[ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.")
ban_unban_log_save("[ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.")
message_admins("\blue [ckey] warned [M.ckey], resulting in a [AUTOBATIME] minute autoban.")

del(M.client)
Expand Down
5 changes: 4 additions & 1 deletion code/modules/admin/banjob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ var
var/savefile/S=new("data/job_full.ban")
S["keys[0]"] << jobban_keylist


/proc/jobban_unban(mob/M, rank)
jobban_keylist.Remove(text("[M.ckey] - [rank]"))
jobban_savebanfile()


/proc/ban_unban_log_save(var/formatted_log)
text2file(formatted_log,"data/ban_unban_log.txt")


/proc/jobban_updatelegacybans()
if(!jobban_runonce)
log_admin("Updating jobbanfile!")
Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/newbanjob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ var/savefile/Banlistjob
else
log_admin("[key_name_admin(usr)] unjobbanned [key] from [rank]")
message_admins("[key_name_admin(usr)] unjobbanned:[key] from [rank]")
ban_unban_log_save("[key_name_admin(usr)] unjobbanned [key] from [rank]")

for (var/A in Banlistjob.dir)
Banlistjob.cd = "/base/[A]"
Expand Down
Empty file added data/ban_unban_log.txt
Empty file.

0 comments on commit 4708139

Please sign in to comment.