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 (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.
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
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
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
Very nice script TTB!!! :D
Quote from: zvamp on 10 November, 2006, 13:35:25
Very nice script TTB!!! :D
Thanx :) Have fun with it!
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?
yep, same prob here
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?
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
It already does! It sends a message to all user who are online at that moment by PM!
but it is not happening i have tried
I need to test on that. I'm @ work atm, I'll check it later! Thanx for report.
ok no problem
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.
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. ::)