Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OPEN SOURCE CODE: EX-CPWN ERRORBOT MIRC VOTING BOT. DIRECTIONS OF INSTALLATION:
- -----------------------------------------------------
- 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.
- 2) LOAD mIRC and COPY AND PASTE SECTION B OF THE CODE. AGAIN, FIX UP THE COLOURS.
- -----------------------------------------------------
- SECTION A:
- -----------------------------------------------------
- on *:TEXT:!vote*:#:{
- { if ($2 = for) set %for $calc( %for + 1 ) }
- { if ($2 = against) set %against $calc( %against + 1 ) }
- { if ($2 = abstain) set %abstain $calc( %abstain + 1 ) }
- { msg $chan 6Ballot casted: $nick }
- }
- on *:TEXT:!resetvote*:#:{ if ($nick isop $chan) { msg $chan 3FOR: %for 4AGAINST: %against 14ABSTAIN: %abstain {
- { set %for 0
- { set %against 0
- { set %abstain 0
- { msg $chan 4Votes cleared, voting off.
- { /unload -rs votescript.mrc
- }
- }
- }
- }
- }
- }
- }
- else msg $chan 4You are not authorized to perform this action. }
- on *:TEXT:!changevote*:#:{ if ($nick isop $chan) {
- { if ($2 = for) set %for $calc( %for + $3 )
- { if ($2 = against) set %against $calc( %against + $3 )
- { if ($2 = abstain) set %abstain $calc( %abstain + $3 )
- { msg $chan 4Vote count for $2 has been altered by $3 }
- }
- }
- }
- }
- else msg $chan 4You are not authorized to perform this action. }
- -----------------------------------------------------
- SECTION B:
- -----------------------------------------------------
- on *:TEXT:!allowvote*:#:{ if ($nick isop $chan) { msg $chan 3Voting on.
- { /load -rs votescript.mrc
- }
- }
- else msg $chan 4You are not authorized to perform this action. }
- on *:TEXT:!banvote*:#:{ if ($nick isop $chan) { /ignore $2- {
- { msg $chan 4Banned from voting: $2- }
- }
- }
- else msg $chan 4You are not authorized to perform this action. }
- on *:TEXT:!unbanvote*:#:{ if ($nick isop $chan) { /ignore -rs $2- {
- { msg $chan 4Unbanned from voting: $2- }
- }
- }
- else msg $chan 4You are not authorized to perform this action. }
- -----------------------------------------------------
- COMMANDS:
- -----------------------------------------------------
- !vote <for|against|abstain> (casts a ballot - does not prevent double ballot)
- !resetvote (results and resets votes. used only at the end of a voting session)
- !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)
- !allowvote (loads the votescript.mrc file and enables the votes)
- !banvote (bans a nick or an address from voting - user specifies)
- !unbanvote (unbans a nick or an address from voting - user specifies).
- 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