mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4457 316c924e-a436-60f5-8080-3fe189b3f50e
52 lines
2.1 KiB
Plaintext
52 lines
2.1 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 player_list)
|
|
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()
|
|
player_list |= src
|
|
update_Login_details()
|
|
world.update_status()
|
|
|
|
client.images = null //remove the images such as AIs being unable to see runes
|
|
client.screen = null //remove hud items just in case
|
|
if(hud_used) del(hud_used) //remove the hud objects
|
|
hud_used = new/obj/hud( src )
|
|
|
|
if(!dna)
|
|
dna = new /datum/dna(null)
|
|
if(dna)
|
|
dna.real_name = real_name
|
|
|
|
next_move = 1
|
|
sight |= SEE_SELF
|
|
..()
|
|
|
|
if(loc && !isturf(loc))
|
|
client.eye = loc
|
|
client.perspective = EYE_PERSPECTIVE
|
|
else
|
|
client.eye = src
|
|
client.perspective = MOB_PERSPECTIVE
|
|
|
|
|