All pastes #435050 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-04-11 19:00 UTC
rendered paste body
menu * {   
  Poll:  { /window -E @Poll
    /aline 7 @Poll Welcome in the Poll system. 3 Made By: Edie 7 The Only answers are: Yes and No. You can't change them.
    /aline 2 @Poll It's very easy to use. Just answer the Question:
    /aline 3 @Poll 1) 4 What's The Poll Question?
  }
}
on *:input:@Poll:{
  write PollByEdie1.txt $1-
  /aline 3 @poll Thank You. The Question has been Set/Updated.
  unset %pollnottwice*
  unset %jacounter
  unset %neecounter
}
ON *:text:!poll:#:{
  /notice $nick 3 Current Poll: $read(PollByEdie1.txt,$lines(PollByEdie1.txt))
  /notice $nick 3 You can vote with: 4 !Vote Yes3 or4 !Vote No
}
ON *:text:!vote Yes:#:{
  if (%pollnottwice [ $+ [ $address ] ]) { 
    notice $nick You Did already Vote.   
    halt 
  }
  else { 
    set %pollnottwice [ $+ [ $address ] ] blaat 
    notice $nick You did vote: Yes. %jacounter people also did! 
    inc %jacounter 1
  }
}
ON *:text:!vote No:#:{
  if (%pollnottwice [ $+ [ $address ] ]) { 
    notice $nick You Did already Vote.   
    halt 
  }
  else { 
    set %pollnottwice [ $+ [ $address ] ] blaat 
    notice $nick You did vote: No. %neecounter people also did! 
    inc %neecounter 1  
  }
}
ON *:text:!results:#:{
  notice $nick 3 The poll is currently:4 $read(PollByEdie1.txt,$lines(PollByEdie1.txt))
  notice $nick 3 People Voted for No:4 %neecounter
  notice $nick 3 People Voted for Yes:4 %jacounter
}