Fixes a possible problem where admins could be kicked if ghostize failed whilst they tried to Adminghostize

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
This commit is contained in:
elly1989@rocketmail.com
2012-09-24 06:06:25 +00:00
parent 508ca6a7d3
commit 9e182f0e39
9 changed files with 2734 additions and 2741 deletions
+1 -6
View File
@@ -1,7 +1,2 @@
/mob/dead/observer/Login()
..()
if(client.holder && client.holder.state != 2)
client.holder.state = 2
var/rank = client.holder.rank
client.clear_admin_verbs()
client.update_admins(rank)
..()
-7
View File
@@ -18,13 +18,6 @@
if("nuclear emergency")
if(mind in ticker.mode:syndicates)
ticker.mode.update_all_synd_icons()
if(client.holder && client.holder.state != 1)
client.holder.state = 1
var/rank = client.holder.rank
client.clear_admin_verbs()
client.update_admins(rank)
return .
//This stuff needs to be merged from cloning.dm but I'm not in the mood to be shouted at for breaking all the things :< ~Carn
+5
View File
@@ -1,5 +1,10 @@
//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]")