Skip to content

Commit

Permalink
Status should be set to active on login.
Browse files Browse the repository at this point in the history
For some reason, a user logged in and "returned from afk after 116
minutes" even though afk and away_at are both tmp variables.
  • Loading branch information
Jonathon Emerson committed Jul 25, 2013
1 parent 1734820 commit 7750d64
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/struct/Channel.dm
Expand Up @@ -100,10 +100,10 @@ Channel

if(!chatters) chatters = new()

chatters += C
chatters = sortWho(chatters)
C.afk = FALSE
C.away_at = 0

C.icon_state = "active"
chatters += C
updateWho()

world.status = "[server_manager.home.name] ([length(server_manager.home.chatters)] chatter\s)"
Expand Down Expand Up @@ -135,14 +135,16 @@ Channel
server_manager.bot.say("[C.name] has quit [name].")

updateWho()
for(var/i = 1, i <= length(chatters), i ++)
var/mob/chatter/c = chatters[i]
if(!c || !c.client) chatters -= c

chatters = sortWho(chatters)

for(var/mob/chatter/C in chatters)
if(!chatter_manager.isTelnet(C.key))
for(var/i = 1, i <= length(chatters), i ++)
var/mob/chatter/c = chatters[i]
if(isnull(c) || !c.client)
chatters -= chatters[i]

continue

if(c.client && C.client)
winset(C, "[ckey(name)].who.grid", "current-cell=1,[i]")
Expand All @@ -168,8 +170,8 @@ Channel
C << output(c, "[ckey(name)].who.grid")
c.name = n

if(C.client)
winset(C, "[ckey(name)].who.grid", "cells=1x[length(chatters)]")
if(C.client)
winset(C, "[ckey(name)].who.grid", "cells=1x[length(chatters)]")

sortWho(list/L)
var/list/afk_list
Expand Down Expand Up @@ -321,7 +323,6 @@ Channel

var/raw_msg = msg

chatters = sortWho(chatters)
updateWho()
server_manager.bot.say("You are now AFK.", C)

Expand All @@ -338,7 +339,6 @@ Channel

C.afk = FALSE
C.away_reason = null
chatters = sortWho(chatters)

updateWho()

Expand Down

0 comments on commit 7750d64

Please sign in to comment.