mob
verb
Request_Reboot()
if(usr.voted==1)//If they voted recently...
usr << "<font color = red>Please wait atleast 3 minutes between votes."
if(usr.voted==0)//If it has been a minute.
usr.voted = 1
usr.rebootreason = input("Why are you rebooting?","Reason","[usr.rebootreason]")//The reboot reason.
if(length(usr.rebootreason)>300)//If it is over 300 letters...
usr << "That reason is to long. You still need to wait a 3 minutes to vote again."
return
else
world << "<b><font color = green>[usr.key] has requested a reboot because '</b><i>[html_encode(usr.rebootreason)]</i>'<b><font color = green> You have 30 seconds to input your vote.</b></font>"//Notice the html_encode? Protects from spam.
for(var/mob/M in world)//For a mob..
M.rvote()//Calls the proc.
sleep(300)//30 seconds
if(rYes==rNo)//If they are equal...
world << "<b><font color = green>There has been a tie. A revote will now occur."
usr.Request_Reboot()
if(rYes>rNo)//If Yes wins
world << "<b><font color = green>Reboot has won! Here is what was voted.<br></b><font color = blue>Yes = [rYes]<br>No = [rNo]"
world.rebootv()
if(rNo>rYes)//If no wins.
world << "<b><font color = green>Reboot has lost! Here is what was voted.<br></b><font color = blue>Yes = [rYes]<br>No = [rNo]"
rNo = 0
rYes = 0
return
sleep(1800)//3 minute delay.
usr.voted = 0
mob
proc
rvote()//Everything in this proc is obvious.
switch(alert("Would you like a reboot?","Reboot voting.","Yes","No"))
if("Yes")
rYes+=1
if("No")
rNo+=1
Problem description:
The problem is on the for(mob/M in world).....There were 2 other people logged in plus me. I did that proc, and I got the alert 3 times...They didn't get it.