voted = 0//You'll see what its for.
rebootreason//You will see.
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."
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 << "Testing"
M.rvote()//Calls the proc.
if(rYes==rNo)//If they are equal...
world << "<b><font color = green>There has been a tie. Time to randomize!"
var/maybe = rand(1,2)
world << "<b><font color = green>And reboot it is!"
world << "<b><font color = red>No reboot wins!"
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]"
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
sleep(1800)//3 minute delay.
usr.voted = 0
rvote(mob/M)//Everything in this proc is obvious.
src << "<font color = red>Debug: You should get this message 1 time."
switch(alert("Would you like a reboot?","Reboot voting.","Yes","No"))
Alright, basically, I want to send that rvote proc to all mobs. Well, if there are 3 mobs, it will send it to the mob 3 times. I do not know why. The odd thing is, it only sends the message "Testing" 1 time to me...Help me please.
EDIT: RESOLVED. The alert went to usr!