Poll.Bot.v.1.3b.LUA5.1-TTB
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Poll.Bot.v.1.3b.LUA5.1-TTB

Started by TTB, 08 November, 2006, 16:21:42

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TTB

My pollbot for LUA 5.1, compatible with PtokaX 0.3.5.2.
-- Poll.Bot.v.1.3b in LUA 5.1
-- Finally a good pollbot ;-)
-- Created by TTB on 08 November 2006
-- For PtokaX 0.3.3.5.2 or higher
-- Special thanx to nErBoS and Jiten

-- v.1.1: 
-- [Fixed] Little bugs
-- v.1.2: 
-- [Added] Graph bars on current poll
-- [Fixed] Little bugs
-- v.1.3: 
-- [Added] Graph bars on oldpolls
-- [Added] Multiple votes for poll (#polladd edit!)
-- [Added] #pollusers - who voted already?
-- v.1.3b:
-- [Conversion] 5.02 to 5.1

----------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
--------------------------------------------------------------------
--[[ 
There are many features on this bot. When a bot has been created, everyone only gets a PM. When ppl log into the hub, they will get a PM if they did not vote already. 
Just check it out... if you have special requests, post them. I always can see what I can do :-)

Your commands:

All users:
#pollhelp - Check the commands
#poll - View the current poll 
#poll <nr> - Vote when poll is active 
#pollusers - List of voted ppl
#oldpoll - List of all oldpolls 
#oldpoll <pollname> - View old poll 
Operators:
#polladd <name> <nr> <subj> - Create a new poll 
#pollclose - Close current poll, and add it to oldpolls 
#polldel - Delete current poll (it won't be added to oldpolls) 
#oldpolldel <pollname> - Delete oldpoll forever 

NOTE: All commands can be done in the main chat. Only the wizard and the #poll command can be done in PM to the bot.
]]--
More information: http://forum.ptokax.org/index.php?topic=6138.0

Have fun with this converted version! You can download it at then bottem of this post.
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

achiever

#1
sir,

this script is working very good  :D

but sir can u just make 1 change in this scirpt, when u use show oldpolls then it shows u the old poll with its result,i.e. it shows this
Quote from: <[BOTPoll>]
**************************************************
OLD POLL: who is a better batsman?
**************************************************

1. 1 vote(s)   [------------------------------¦] (100.00%) vote(s)  sachin
2. 0 vote(s)   [¦                              ] (0.00%) vote(s)  ponting

Total votes: 1 (100.00%)
**************************************************
Poll created by: achiever
Poll created on: [12:52:48] / [09-11-2006]
Poll closed at: [12:53:48] / [09-11-2006]

what i needed was can it also show what a user himself has voted with the results eg.
Quote from: <[BOTPoll>]
**************************************************
OLD POLL: who is a better batsman?
**************************************************

1. 1 vote(s)   [------------------------------¦] (100.00%) vote(s)  sachin
2. 0 vote(s)   [¦                              ] (0.00%) vote(s)  ponting

Total votes: 1 (100.00%)
**************************************************
u had voted for option 1. sachin
**************************************************
Poll created by: achiever
Poll created on: [12:52:48] / [09-11-2006]
Poll closed at: [12:53:48] / [09-11-2006]

thks,

achiever
thks,
achiever.

TTB

No, I won't create that. The time I have to put in that to have that little centence is not worth it. And besides that, when created, the admin can check what everyone has voted :o

TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

achiever

hi,

no problem sir as it is the script is very good, i just thought it will be a small addition work, i m sorry.

thks,
bye,
achiever
thks,
achiever.

zvamp


TTB

TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

Mozzilla?

Nice script TTB - one little problem though.

When asked to 'showpoll' the result comes back but not in order.

Quote
**************************************************
POLL: Please Cast Your Vote For This Hub
**************************************************

5. 0 vote(s)   [?                              ] (0.00%)  Crap Hub 

1. 4 vote(s)   [--------------------?          ] (66.67%)  Excellent Hub!!! Will be recommending it to all my friends.
2. 2 vote(s)   [----------?                    ] (33.33%)  Good Hub 
3. 0 vote(s)   [?                              ] (0.00%)  Average Hub
4. 0 vote(s)   [?                              ] (0.00%)  Below Average, Could Be Better - Send your comments to an OP please. 
6. 0 vote(s)   [?                              ] (0.00%)  Fuckin' Shittiest Hub I've Ever Been In!!! Will Never Come Back Here!!

Total votes: 6 (100.00%)
**************************************************
Poll created by: Mozzilla?
Poll created on: [00:05:25] / [29-11-2006]
**************************************************

How can this be resolved please?


zvamp


TTB

Quote from: Mozzilla? on 30 November, 2006, 12:11:17
Nice script TTB - one little problem though.

When asked to 'showpoll' the result comes back but not in order.

How can this be resolved please?
Uh? No order?! I don't get it, or is this some kind of request? The order of the show poll is in the same order the creator created the poll. Should the poll be displayed otherwise when ppl have entered their vote?
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

Yahoo

great script TTB. i will like to have one more change in the script when a current poll is closed the result must be send to all the user in main or  pm something like this
Quote[PoTtEr:11:45:30] <Poll> RESULTS
**************************************************
POLL: Who is a Better Actor Hrithik Roshan Or Abhishek Bachchan ??
**************************************************

1. 156 vote(s)   [------------------------?      ] (80.00%)  answer 1 Hrithik Roshan
2. 39 vote(s)   [------?                        ] (20.00%)  answer 2 Abhishek Bachchan

Total votes: 195 (100.00%)
---------------------------------------------------------------
Maximum Vote Has Been Given To Option 1 Hrithik Roshan
This Poll is Closed Now But Please vote again by our next poll. Thank You
"BoRN FIGhTEr"

TTB

It already does! It sends a message to all user who are online at that moment by PM!
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

Yahoo

but it is not happening i have tried
"BoRN FIGhTEr"

TTB

I need to test on that. I'm @ work atm, I'll check it later! Thanx for report.
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

Yahoo

"BoRN FIGhTEr"

TTB

Sorry, I'm not able to check this at short notice. School + work takes to much time and has prio 1. Feel free to check it yourself if you can, or someone else. I'll try to remember when I have time, maybe I'll check the bug later.
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

sourabhiitm

Okie..  All these scripts are working fine.. The problem , my hub is not registered users only hub. So people keep changing thr names and are  doing Fake voting. So i need a poll vote which will take care of not only User's nick name , but will also take care of His IP.. Because in our LAN IP's r consistent , not user names. ::)

SMF spam blocked by CleanTalk