mob/host
verb
Check_For_AFK()
set category = "GM"
world << "<center><b><font size=2><font color=#FF4466>AFK Check!"
for(var/mob/M in world)
M.AFK_Check()
mob/proc
AFK_Check()
for(var/mob/M in world)
M.said = 0
var/talk = input(M,"Say something, or be booted.")as null|text
if(M.talk)
M.said = 1
world << "[M] has been checked. He will not be booted."
else if(!talk)
sleep(600)
world << "<center><b><font size=2><font color=#FF4466>AFK Check has ended."
if(!M.talk)
world << "[M] has been booted due to being AFK."
sleep(10)
del(M)
Problem description:
It shouts AFK Check!, and lets [M] type something, but doesn't do anything else. Can someone help me?
Because your Check_For_AFK() verb is looping through all the mobs in the world, and then calling that mob's AFK_Check() proc. That proc is then, looping through all the mobs in the world again, and checking their variables, except the else if(!talk) line, which is checking the src instead.
You don't need the loop in the AFK_Check() proc, just use src instead.