Go Back   FlashFXP Forums > > > >

Harm's scripts ioBanana, Readd script, ioVote

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-13-2004, 09:53 AM   #1
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default ioVOTE

Here is a little script for those who want a voting system.
Code:
###; 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.
Harm is offline   Reply With Quote
Old 02-13-2004, 04:01 PM   #2
Sersen
Junior Member
 
Join Date: Jan 2004
Posts: 25
Default hey

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:
Sersen is offline   Reply With Quote
Old 02-13-2004, 05:24 PM   #3
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

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.
Harm is offline   Reply With Quote
Old 02-14-2004, 09:32 AM   #4
Sersen
Junior Member
 
Join Date: Jan 2004
Posts: 25
Talking hehe

okay *lol* i don´t use an irc bot now all is clear

thanks harm

bye
Sersen is offline   Reply With Quote
Old 02-14-2004, 10:33 AM   #5
MaZza_Dj
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 123
Default

yeah fantastic script this very cool and work fine
now i search only the dZSbot line for command and announce in icr thanks :banana:
MaZza_Dj is offline   Reply With Quote
Old 03-22-2004, 10:52 AM   #6
Bitboy_2
Junior Member
 
Join Date: Jul 2003
Posts: 27
Default

I found 2 possible bugs

1-
Quote:
putlog "VOTERESULT: \"\"$number\" \"[lindex $res 1]\" \"[lindex $res 0]\""
should be so:

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

2-
Quote:
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
Bitboy_2 is offline   Reply With Quote
Old 03-22-2004, 11:55 AM   #7
icios
Member
 
Join Date: Jun 2003
Posts: 39
Default

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?
icios is offline   Reply With Quote
Old 03-22-2004, 12:00 PM   #8
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

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 .
Harm is offline   Reply With Quote
Old 03-22-2004, 12:11 PM   #9
Bitboy_2
Junior Member
 
Join Date: Jul 2003
Posts: 27
Default

Quote:
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
Bitboy_2 is offline   Reply With Quote
Old 03-22-2004, 12:49 PM   #10
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

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.
Harm is offline   Reply With Quote
Old 03-23-2004, 06:59 AM   #11
MaZza_Dj
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 123
Default

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?
MaZza_Dj is offline   Reply With Quote
Old 03-23-2004, 07:48 AM   #12
Harm
Too much time...
Ultimate Scripter
 
Join Date: Jul 2003
Posts: 1,430
Default

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.

Quote:
"site addvote new vote...." i don't know!
Does that mean you haven't tried it or that it doesn't work ?
Harm is offline   Reply With Quote
Old 03-23-2004, 09:00 AM   #13
MaZza_Dj
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 123
Default

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))))
MaZza_Dj is offline   Reply With Quote
Old 03-23-2004, 12:13 PM   #14
peep
Senior Member
FlashFXP Scripter
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 132
Default

This dude's posts always make me smile :-)

Thanks for making my everyday life a bit more enjoyable :-)
peep is offline   Reply With Quote
Old 03-23-2004, 01:42 PM   #15
MaZza_Dj
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 123
Talking

my post? ohhh 8))))))))))))))))))))))))))))
thanks I do not make hard work
MaZza_Dj is offline   Reply With Quote
Reply

Tags
%number, add, set, tcl, vote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:16 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)