mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-31 09:00:25 +01:00
r3803: - Contained many bugs, first of which was that it didn't really... work. - Split the HUD and code into separate objects, thus creating a fork in code. This implies that any changes need to be mirrored on the fork objects, thus doubling the amount of code maintenance we have to do. - The UI should be one of the most standardized things around. Giving choices here is bad design practice. - Double the amount of defines does not equal to double the amount of fun. - The revision does not adhere to our coding standard. See the changes to /trunk/code/modules/mob/hud.dm in r3803 as an example. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3804 316c924e-a436-60f5-8080-3fe189b3f50e
38 lines
1.8 KiB
Plaintext
38 lines
1.8 KiB
Plaintext
//handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying
|
|
/mob/proc/update_Login_details()
|
|
lastKnownIP = client.address
|
|
computer_id = client.computer_id
|
|
log_access("Login: [key_name(src)] from [lastKnownIP ? lastKnownIP : "localhost"]-[computer_id] || BYOND v[client.byond_version]")
|
|
if(config.log_access)
|
|
for(var/mob/M in world)
|
|
if(M == src) continue
|
|
if( M.key && (M.key != key) )
|
|
var/matches
|
|
if( (M.lastKnownIP == client.address) )
|
|
matches += "IP ([client.address])"
|
|
if( (M.computer_id == client.computer_id) )
|
|
if(matches) matches += " and "
|
|
matches += "ID ([client.computer_id])"
|
|
spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
|
|
if(matches)
|
|
if(M.client)
|
|
message_admins("<font color='red'><B>Notice: </B><font color='blue'><A href='?src=\ref[usr];priv_msg=\ref[src]'>[key_name_admin(src)]</A> has the same [matches] as <A href='?src=\ref[usr];priv_msg=\ref[M]'>[key_name_admin(M)]</A>.</font>", 1)
|
|
log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)].")
|
|
else
|
|
message_admins("<font color='red'><B>Notice: </B><font color='blue'><A href='?src=\ref[usr];priv_msg=\ref[src]'>[key_name_admin(src)]</A> has the same [matches] as [key_name_admin(M)] (no longer logged in). </font>", 1)
|
|
log_access("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).")
|
|
|
|
/mob/Login()
|
|
update_Login_details()
|
|
if(!src.dna) src.dna = new /datum/dna(null)
|
|
world.update_status()
|
|
if(!src.hud_used)
|
|
src.hud_used = new/obj/hud( src )
|
|
else
|
|
del(src.hud_used)
|
|
src.hud_used = new/obj/hud( src )
|
|
|
|
src.next_move = 1
|
|
src.sight |= SEE_SELF
|
|
..()
|