VoteBot


NAME

VoteBot - A simple IRC bot used in FreeNode's #ubuntu-beginners channel.


SYNOPSIS

perl ./voteBot.pl


DESCRIPTION

VoteBot is a simple IRC bot used in FreeNode's #ubuntu-beginners IRC channel and possibly in other rooms to establish some official form of voting. VoteBot includes public and private voting, and the public display of vote results. In addition to voting relating functions, VoteBot also prints the titles of URLs posted in the IRC channel and automatically warns users when compiledkernel post links as well as incorporates the ubotu database of factoids.

VoteBot is pre-release code and is by no means complete. Furthermore, it is to be expected that VoteBot will always be changing in functionality to meet the needs of the users and channels using the bot.


PRIVATE COMMANDS

The following commands can be issued to VoteBot by any user (unless otherwise specified) via /msg (/msg VoteBot COMMAND). Upon receiving these commands VoteBot will send the output back via a /msg to the user.

.join #CHANNEL (Admin Only!)

  • Make VoteBot join #CHANNEL

.leave #CHANNEL (Admin Only!)

  • Make VoteBot leave #CHANNEL

.say $MESSAGE to #CHANNEL/$PERSON (Admin Only!)

  • Make VoteBot say $MESSAGE to $PERSON (via /msg) or in #CHANNEL

.me $ACTION to $NICK/#CHANNEL (Admin Only!)

  • Make VoteBot send a CTCP ACTION to $NICK or #CHANNEL

.addFactoid $FACTOID|$RESPONSE (Admin Only!)

  • Factoid "$FACTOID" with Response "$RESPONSE" Added!

.vhelp

  • vote [--non-voiced] [--no-msg] [--notify] \"TOPIC OF VOTE\"

.help

  • To vote, please type either +1 to say that you agree with the topic in discussion, -1 to say that you disagree, or 0 to say that you are impartial.

.channels

  • Reply with a list of the channels that VoteBot is in

.admins

  • Reply with a list of the hosts of the bot admins

.ignored

  • Reply with a list of the hosts of ignored users

.blocked

  • Reply with a list of blocked phrases

.factChans

  • Reply with a list of the channels that have factoids enabled.

.ckChans

  • Reply with a list of the channels that have automatic compiledkernel link protection enabled.

.urlChans

  • Reply with a list of the channels that have URL title fetching enabled

.meetingChans

  • Reply with a list of the channels that have meeting mode enabled

.shutdown (Admin Only!)

  • [No message is displayed in IRC]

    VoteBot disconnects from IRC and shuts down. "[$TIME_STAMP] VoteBot Has Been Shutdown By $YOURNICK" is displayed in the terminal.

.ck (Admin Only!)

  • The compiledkernel list has been reset

.ignore $NICK (Admin Only!)

  • $HOST ($NICK) has been added to the ignore list

.block $PHRASE (Admin Only!)

  • $PHRASE has been added to the block list

.unignore $NICK (Admin Only!)

  • $HOST ($NICK) has been removed from the ignore list

.unblock $PHRASE (Admin Only!)

  • $PHRASE has been removed from the block list

.refreshIgnored (Admin Only!)

  • The ignore list has been refreshed.

.refreshBlocked (Admin Only!)

  • The block list has been refreshed.

.refreshAdmins (Admin Only!)

  • The admin list has been refreshed.

.refreshFactoids (Admin Only!)

  • The factoid database has been refreshed.

.addChannel #CHANNEL (Admin Only!)

  • #CHANNEL has been added to the list of channels to autojoin.

.removeChannel #CHANNEL (Admin Only!)

  • #CHANNEL has been removed from the list of channels to autojoin.

.removeFactoid $FACTOID (Admin Only!)

  • $FACTOID has been removed from the factoid database.

.version

  • Revision: $REVISION

.revision

  • Revision: $REVISION

.manurl $PACKAGE

  • $PACKAGE: $MANPAGE_URL

.man $PACKAGE

  • $MANPAGE

.temp $TEMP

  • Converts $TEMP to Farenheit, Celsius, or Kelvins. $TEMP is a number followed by either a C (Celsius), F (Farenheit), or K (Kelvin), which shows the unit of the temperature.

.btmeeting

.wiki $TOPIC

.google $QUERY

!FACTOID (Voiced Users Only!)

  • $FACTOID_RESPONSE

!FACTOID | $NICK

  • $NICK: $FACTOID_RESPONSE

!FACTOID > $NICK

  • /msg $NICK $FACTOID_RESPONSE

.vstatus (Admin Only!)

  • Displays a detailed status of the progress of a vote. Information displayed includes the number of people who have voted and the number of people who voted +1, -1, and 0. It does not display who voted +1, -1, and 0. It simply displays how many people voted for each option.

.vote (Admin Only!)

  • End a vote that is in progress.

+1, -1, and 0

  • These three commands are used to vote. Unless the --non-voiced option was used when the vote was started, only voiced users will be allowed to vote. You are able to change your vote by simply voting again. These commands only work when a vote is going on. You will receive a private

    message from VoteBot confirming that it received your vote.


PUBLIC COMMANDS

The following commands can be issued to VoteBot by any user (unless otherwise specified) in the same IRC channel as VoteBot. Upon receiving these commands VoteBot will post a message to the IRC channel.

PERL!!!

  • PERL!!!

PYTHON!!!

  • PERL!!!

BASH!!!

  • There are no Easter Eggs in this program.

.help

  • To vote in $channel, please type either +1 to say that you agree with the topic in discussion, -1 to say that you disagree, or 0 to say that you are impartial.

.version

  • Revision: $REVISION

.revision

  • Revision: $REVISION

!FACTOID (Voiced Users Only!)

  • $FACTOID_RESPONSE

!FACTOID | $NICK

  • $NICK: $FACTOID_RESPONSE

!FACTOID > $NICK

  • /msg $NICK $FACTOID_RESPONSE

.cklinks

  • Do not open any links from compiledkernel!

.cklinks | $NICK

  • $NICK: Do not open any links from compiledkernel!

.manurl $PACKAGE

  • $PACKAGE: $MANPAGE_URL

.man $PACKAGE

  • $MANPAGE

$URL from compiledkernel (Automatic CK Link Protection must be enabled!)

  • Please be cautious when opening links from compiledkernel!

$URL (URL Title Fetching must be enabled)

  • $TITLE_OF_WEBSITE

.block $PHRASE (Admin Only!)

  • $PHRASE has been added to the block list

.unblock $PHRASE (Admin Only!)

  • $PHRASE has been removed from the block list

.refreshBlocked (Admin Only!)

  • The block list has been refreshed.

.blocked

  • Reply with a list of blocked phrases

.addFactoid $FACTOID|$RESPONSE (Admin Only!)

  • Factoid "$FACTOID" with Response "$RESPONSE" Added!

.shutdown (Admin Only!)

  • [No message is displayed in IRC]

    VoteBot disconnects from IRC and shuts down. "I<[$TIME_STAMP] VoteBot Has Been Shutdown By $YOURNICK>" is displayed in the terminal.

.meeting [$TITLE] (Admin Only!)

  • =-=-=Meeting mode enabled/disabled=-=-= When enabled, sends a private message to everyone who joins the channel, notifying them that a meeting is in progress.

.url (Admin Only!)

  • URL title fetching enabled/disabled

    When enabled, VoteBot will automatically fetch the titles of any website mentioned in the channel.

.ck (Admin Only!)

  • Automatic CK Link Protection enabled/disabled. When enabled, a warning message will be displayed when compiledkernel sends a link to the channel.

.factoids (Admin Only!)

  • Factoids have been enabled/disabled. When enabled, voiced users will be able to use the factoids from within an IRC channel.

.temp $TEMP

  • Converts $TEMP to Farenheit, Celsius, or Kelvins. $TEMP is a number followed by either a C (Celsius), F (Farenheit), or K (Kelvin), which shows the unit of the temperature.

.btmeeting

.wiki $TOPIC

.weather $LOCATION

  • The weather for $PLACE is: Temperature: $TEMP_F F ($TEMP_C C) Conditions: $CONDITIONS

    Fetches weather information from http://www.wunderground.com/

.google $QUERY

.join #CHANNEL (Admin Only!)

  • Make VoteBot join #CHANNEL

.leave [#CHANNEL] (Admin Only!)

  • Make VoteBot leave #CHANNEL If no channels is specified, VoteBot will leave the current channel

.say $MESSAGE to #CHANNEL/$PERSON (Admin Only!)

  • Make VoteBot say $MESSAGE to $PERSON (via /msg) or in #CHANNEL

.me $ACTION to $NICK/#CHANNEL (Admin Only!)

  • Make VoteBot send a CTCP ACTION to $NICK or #CHANNEL

.channels

  • Reply with a list of the channels that VoteBot is in

.factChans

  • Reply with a list of the channels that have factoids enabled.

.ckChans

  • Reply with a list of the channels that have automatic compiledkernel link protection enabled.

.urlChans

  • Reply with a list of the channels that have URL title fetching enabled

.meetingChans

  • Reply with a list of the channels that have meeting mode enabled

.vstatus

  • $NBR People Have Currently Voted.

.vote [--non-voiced] [--no-msg] [--notify] ["$TITLE"] (Admin Only!)

  • Start or stop a vote. --non-voiced allows non-voiced users to participate --no-msg disables voting via /msg --notify sends a private message to all voiced users (and non-voiced users if --non-voiced was used) telling them that a vote is going on. It also notifies them of the results of the vote. $TITLE is whatever the vote is about.

+1, -1, and 0

  • These three commands are used to vote. Unless the --non-voiced option was used when the vote was started, only voiced users will be allowed to vote. You are able to change your vote by simply voting again. These commands only work when a vote is going on. You will receive a private

    message from VoteBot confirming that it received your vote.


COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in the /usr/share/common-licenses/GPL file.


AUTHOR

Nathan Handler <nhandler@ubuntu.com>


BUGS

Please report all bugs at https://bugs.launchpad.net/votebot

VoteBot (last edited 2009-10-06 06:15:51 by adsl-75-57-76-217)