mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 14:37:27 +01:00
Fixes Issue 959 - the holder's state was not being set properly. It is now all handled at login. Verbs only update if rank or state have changed. You can bypass this simply by setting holder.state = null before calling update_admins() Moved obj/admins stuff into holder.dm so the core stuff is together, pending some possible work on admin-ranks. Admins can no-longer adminghost whilst in the lobby. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4746 316c924e-a436-60f5-8080-3fe189b3f50e
57 lines
2.3 KiB
Plaintext
57 lines
2.3 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()
|
|
//trigger admin holder updates. This is hear as all Login() calls this proc.
|
|
if(client.holder)
|
|
client.update_admins(client.holder.rank)
|
|
|
|
//Multikey checks and logging
|
|
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
|
|
|
|
|