LordMaster96

ErrorBot CPWN Voting Script

Sep 13th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. OPEN SOURCE CODE: EX-CPWN ERRORBOT MIRC VOTING BOT. DIRECTIONS OF INSTALLATION:
  2. -----------------------------------------------------
  3. 1) OPEN NOTEPAD, COPY AND PASTE BELOW CODE (SECTION A) AND SAVE AS votescript.mrc UNDER THE APPLICATION DATA>mIRC SECTION OF YOUR COMPUTER. NOTE: APPLICATION DATA MAY BE A HIDDEN FOLDER IN SOME OPERATING SYSTEMS. PLEASE FIX UP THE COLOURS: ANY WEIRD PARTS THAT CONTAINS A NUMBER BEFORE A WORD INDICATES A COLOUR VALUE.
  4. 2) LOAD mIRC and COPY AND PASTE SECTION B OF THE CODE. AGAIN, FIX UP THE COLOURS.
  5. -----------------------------------------------------
  6. SECTION A:
  7. -----------------------------------------------------
  8. on *:TEXT:!vote*:#:{
  9. { if ($2 = for) set %for $calc( %for + 1 ) }
  10. { if ($2 = against) set %against $calc( %against + 1 ) }
  11. { if ($2 = abstain) set %abstain $calc( %abstain + 1 ) }
  12. { msg $chan 6Ballot casted: $nick  }
  13. }
  14. on *:TEXT:!resetvote*:#:{ if ($nick isop $chan) { msg $chan 3FOR: %for 4AGAINST: %against 14ABSTAIN: %abstain  {
  15. { set %for 0
  16. { set %against 0
  17. { set %abstain 0
  18. { msg $chan 4Votes cleared, voting off.
  19. { /unload -rs votescript.mrc
  20. }
  21. }
  22. }
  23. }
  24. }
  25. }
  26. }
  27. else msg $chan 4You are not authorized to perform this action. }
  28. on *:TEXT:!changevote*:#:{ if ($nick isop $chan) {
  29. { if ($2 = for) set %for $calc( %for + $3 )
  30. { if ($2 = against) set %against $calc( %against + $3 )
  31. { if ($2 = abstain) set %abstain $calc( %abstain + $3 )
  32. { msg $chan 4Vote count for $2 has been altered by $3  }
  33. }
  34. }
  35. }
  36. }
  37. else msg $chan 4You are not authorized to perform this action. }
  38. -----------------------------------------------------
  39. SECTION B:
  40. -----------------------------------------------------
  41. on *:TEXT:!allowvote*:#:{ if ($nick isop $chan) { msg $chan 3Voting on.
  42. { /load -rs votescript.mrc
  43. }
  44. }
  45. else msg $chan 4You are not authorized to perform this action. }
  46. on *:TEXT:!banvote*:#:{ if ($nick isop $chan) { /ignore $2- {
  47. { msg $chan 4Banned from voting: $2-  }
  48. }
  49. }
  50. else msg $chan 4You are not authorized to perform this action. }
  51. on *:TEXT:!unbanvote*:#:{ if ($nick isop $chan) { /ignore -rs $2- {
  52. { msg $chan 4Unbanned from voting: $2-  }
  53. }
  54. }
  55. else msg $chan 4You are not authorized to perform this action. }
  56. -----------------------------------------------------
  57. COMMANDS:
  58. -----------------------------------------------------
  59. !vote <for|against|abstain> (casts a ballot - does not prevent double ballot)
  60. !resetvote (results and resets votes. used only at the end of a voting session)
  61. !changevote <for|against|abstain> <value> (changes the vote of either for, against, or abstain by the value - ie. against -6 would subtract 6 votes from the existing value for against)
  62. !allowvote (loads the votescript.mrc file and enables the votes)
  63. !banvote (bans a nick or an address from voting - user specifies)
  64. !unbanvote (unbans a nick or an address from voting - user specifies).
  65.  
  66. All commands except for !vote are limited to channel operators only. Any questions or programming errors should be directed to me on Twitter at @Hockey96Puck for quick response. Do not bug me there with CPWN related questions since I will probably just block you.
Advertisement
Add Comment
Please, Sign In to add comment