PDA

View Full Version : ioVOTE


Harm
02-13-2004, 09:53 AM
Here is a little script for those who want a voting system.

###; ioVOTE.itcl v0.2 (22/03/2004) by Harm
###; ioFTPD 5.8.4r+

Install:
========

1. Copy everything in .\ioFTPD\scripts\.

2. Add those to your ioFTPD.ini:

[Scheduler]
VoteResults = 0 0 1 * TCL C:\location\of\your\scripts\ioVOTE.itcl LOG

[FTP_Custom_Commands]
vote = TCL C:\location\of\your\scripts\ioVOTE.itcl VOTE
addvote = TCL C:\location\of\your\scripts\ioVOTE.itcl ADDVOTE
logvote = TCL C:\location\of\your\scripts\ioVOTE.itcl LOG

[FTP_SITE_Permissions]
vote = !A *
addvote = M
logvote = M

3. Edit the paths in ioVOTE.itcl carefully.

4. Use SITE CONFIG REHASH.

5. Add those to your ioBanana.tcl or your dZSbot.tcl:

set variables(VOTE) "%user %group %topic"
set variables(VOTETOPIC) "%topic"
set variables(VOTERESULT) "%number %votes %option"

set disable(VOTE) 0
set disable(VOTETOPIC) 0
set disable(VOTERESULT) 0

6. Add "VOTE VOTETOPIC VOTERESULTS" to the 'set msgtypes(RACE)' list in ioBanana.tcl or dZSbot.tcl.

7a. If you're using ioBanana, add those to your ioBanana skin:
set announce(VOTE) "-:[b]:[b] [c]$ioss(color1)vote[c] [b]:[b]:- [b]%user[b]@%group added a new poll: [b]%topic[b]. Go vote people!"
set announce(VOTETOPIC) "-:[b]:[b] [c]$ioss(color1)vote[c] [b]:[b]:- Vote results for: [b]%topic[b] are:"
set announce(VOTERESULT) "-:[b]:[b] [c]$ioss(color1)vote[c] [b]:[b]:- Number %number, [b]%option[b] got [b]%votes[b] votes."

7b. If you're using dZSbot, add those to your dZSbot.tcl:
set announce(VOTE) "-%sitename- \[VOTE\] + %bold%user%bold@%group added a new poll: %bold%topic%bold. Go vote people!"
set announce(VOTETOPIC) "-%sitename- \[VOTE\] + Vote results for: %bold%topic%bold are:"
set announce(VOTERESULT) "-%sitename- \[VOTE\] + Number %number, %bold%option%bold got %bold%votes%bold votes."

8. Rehash your sitebot.

It is available to foundation members.

Sersen
02-13-2004, 04:01 PM
very nice script harm. Thanks a lot for this

but not sure if its maybe buggy because I can´t get to work "site logvote"

site logvote
200 Command successful.

site addvote and site vote send/view is working fine

even

site vote logvote isn´t working too..so don´t have a clue whats wrong

rechecked the paths in ioftpd.ini again and again and its all fine and those 2 files are getting created too (vote.log and vote.dat)

so maybe any idea ? :banana:

Harm
02-13-2004, 05:24 PM
Indeed, check your ioFTPD.log.
SITE LOGVOTE doesn't output anything in the status window.
In fact, it's only a site command when/if you can't wait for the scheduler to launch the results announce on irc.

Sersen
02-14-2004, 09:32 AM
okay *lol* i don´t use an irc bot now all is clear

thanks harm

bye

MaZza_Dj
02-14-2004, 10:33 AM
yeah fantastic script this very cool and work fine
now i search only the dZSbot line for command and announce in icr thanks :banana:

Bitboy_2
03-22-2004, 10:52 AM
I found 2 possible bugs

1-

putlog "VOTERESULT: \"\"$number\" \"[lindex $res 1]\" \"[lindex $res 0]\""

should be so:

putlog "VOTERESULT: \"$number\" \"[lindex $res 1]\" \"[lindex $res 0]\""

2-

set variable(VOTERESULT) "%votes %option"
set announce(VOTERESULT) "-%sitename- \[VOTE\] + Number %number, %bold%option%bold got %bold%votes%bold votes."

should be so:

set variable(VOTERESULT) "%number %votes %option"
set announce(VOTERESULT) "-%sitename- \[VOTE\] + Number %number, %bold%option%bold got %bold%votes%bold votes."

With these changes it works for me :)

icios
03-22-2004, 11:55 AM
I use ioBanana v19 for irc.

Should I put:

set variable(VOTERESULT) "%number %votes %option"

in ioBanana.tcl

and

set announce(VOTERESULT) "-%sitename- \[VOTE\] + Number %number, %bold%option%bold got %bold%votes%bold votes."

in ioB_default_skin

???

Or elsewhere?

Harm
03-22-2004, 12:00 PM
I'll post a fixed version later today.
This one will contain detailed install instructions.

Bitboy: Are you using ioBanana or dZSbot ?
Thanks for bringing those typos to my attention :).

Bitboy_2
03-22-2004, 12:11 PM
Originally posted by Harm
I'll post a fixed version later today.
This one will contain detailed install instructions.

Bitboy: Are you using ioBanana or dZSbot ?
Thanks for bringing those typos to my attention :).

dZSbot :)

Harm
03-22-2004, 12:49 PM
I've just posted v0.2 to address the issues mentioned by Bitboy.
There's now a readme.txt with detailed installation instructions for both dZSbot and ioBanana.

MaZza_Dj
03-23-2004, 06:59 AM
now go 8))) but work only with command "site logvote" and see in channel the result of vote... with "site vote send" don't work and with "site addvote new vote...." i don't know!

is possible add one command for vote and see the vote by IRCcommand?
i don't know: for example "!SITEvote view !SITEvote send !SITEaddvote newvote" is possible this or not?

Harm
03-23-2004, 07:48 AM
The votes have to remain anonymous. Thus SITE VOTE SEND doesn't log anything. This means you won't see anything on irc or in your ioFTPD.log when someone votes.

"site addvote new vote...." i don't know!
Does that mean you haven't tried it or that it doesn't work ?

MaZza_Dj
03-23-2004, 09:00 AM
site addvote newvote....

this command i don't have try i don't know if work or not...
you can tell me if i change the vote the bot tell me in my channel wicht this has changed?

i believe yes but i never having try, I don't know it 8))))

peep
03-23-2004, 12:13 PM
This dude's posts always make me smile :-)

Thanks for making my everyday life a bit more enjoyable :-)

MaZza_Dj
03-23-2004, 01:42 PM
my post? ohhh 8))))))))))))))))))))))))))))
thanks I do not make hard work :D :D :D

icios
12-14-2004, 03:24 PM
Hey harm i got some feedbacks for a newer version:

1)
When adding a vote poll, all possible answers are listed in the entry-order. For example if i enter:

site addvote "question" "a" "b" "c"

each time i'll type again "site vote view", i get the same order, like:

200- +-[ioV]------------------------------------------------------------- -- - +
200- | Current vote: question |
200- | 1 : 'a' |
200- | 2 : 'b' |
200- | 3 : 'c' |
200- + - -- ------------------------------------------------------------- -- - +

On the other hand, irc announce when typing "site logvote" lists results using VOTES order, like this way:

<eggdrop> Currents ioVOTE results are:
<eggdrop> 1: "b" - 10 votes
<eggdrop> 2: "a" - 8 votes
<eggdrop> 3: "c" - 2 votes

The trouble is that people read irc announce and then go on ftp and type SITE VOTE SEND 2, thinking they are voting "a", but infact they are voting for "b".

It would be nice if decreasing-votes order could be REMOVED from irc announce, so that numbers in irc announce would correspond to numbers shown using site command (site vote view).

2)
I think this is a bug:
I tried to add a poll with 2 answers like:

site addvote "question" "a" "b"

This never worked and I see i can only add poll with 3 or more answers, but not 2.

---


Sorry for a so long topic and thanks in advance,
icios.

Harm
12-19-2004, 01:15 PM
1) This option is supposed to log the votes results and announce them on irc. As far as I can see, it's what it's doing at the moment.
People aint supposed to continue to vote once the results are known.

If you're using the results to invite people to vote, then you aren't using the correct option/command. I will add a command to remind people there's a poll waiting for their voice on login and at some time on irc.

2) I will check. It's probably the sanity check for the correct number of arguments that's expecting 3 options instead of 2.

Gumbas
09-11-2005, 11:59 PM
Here is a little script for those who want a voting system.

###; ioVOTE.itcl v0.2 (22/03/2004) by Harm
###; ioFTPD 5.8.4r+

Install:
========

1. Copy everything in .\ioFTPD\scripts\.

2. Add those to your ioFTPD.ini:

[Scheduler]
VoteResults = 0 0 1 * TCL C:\location\of\your\scripts\ioVOTE.itcl LOG

[FTP_Custom_Commands]
vote = TCL C:\location\of\your\scripts\ioVOTE.itcl VOTE
addvote = TCL C:\location\of\your\scripts\ioVOTE.itcl ADDVOTE
logvote = TCL C:\location\of\your\scripts\ioVOTE.itcl LOG

[FTP_SITE_Permissions]
vote = !A *
addvote = M
logvote = M

3. Edit the paths in ioVOTE.itcl carefully.

4. Use SITE CONFIG REHASH.

5. Add those to your ioBanana.tcl or your dZSbot.tcl:

set variables(VOTE) "%user %group %topic"
set variables(VOTETOPIC) "%topic"
set variables(VOTERESULT) "%number %votes %option"

set disable(VOTE) 0
set disable(VOTETOPIC) 0
set disable(VOTERESULT) 0

6. Add "VOTE VOTETOPIC VOTERESULTS" to the 'set msgtypes(RACE)' list in ioBanana.tcl or dZSbot.tcl.

7a. If you're using ioBanana, add those to your ioBanana skin:
set announce(VOTE) "-:[b]:[b] [c]$ioss(color1)vote[c] [b]:[b]:- [b]%user[b]@%group added a new poll: [b]%topic[b]. Go vote people!"
set announce(VOTETOPIC) "-:[b]:[b] [c]$ioss(color1)vote[c] [b]:[b]:- Vote results for: [b]%topic[b] are:"
set announce(VOTERESULT) "-:[b]:[b] [c]$ioss(color1)vote[c] [b]:[b]:- Number %number, [b]%option[b] got [b]%votes[b] votes."

7b. If you're using dZSbot, add those to your dZSbot.tcl:
set announce(VOTE) "-%sitename- \[VOTE\] + %bold%user%bold@%group added a new poll: %bold%topic%bold. Go vote people!"
set announce(VOTETOPIC) "-%sitename- \[VOTE\] + Vote results for: %bold%topic%bold are:"
set announce(VOTERESULT) "-%sitename- \[VOTE\] + Number %number, %bold%option%bold got %bold%votes%bold votes."

8. Rehash your sitebot.

It is available to foundation members.

Hello I can't find 'set msgtypes(RACE)' list in ioBanana.tcl and I not fully undrestand what to do in this point 6 please help.

"6. Add "VOTE VOTETOPIC VOTERESULTS" to the 'set msgtypes(RACE)' list in ioBanana.tcl or dZSbot.tcl."

I'm using ioBanana v20 and ioB_dZS skin

Harm
09-12-2005, 01:38 AM
All of these are getting old. Take some time to upgrade ioBanana and ioVOTE first. The versions currently available on the website are easier to setup. Also, make sure your board account is linked to your account on inicom's customer portal (if needed, mail support@inicom.net). This will show us that you really are a foundation member.