Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import supybot.utils as utils
- from supybot.commands import *
- import supybot.plugins as plugins
- import supybot.ircutils as ircutils
- import supybot.callbacks as callbacks
- import twitter
- class Twitt(callbacks.Plugin):
- """Add the help for "@plugin help Twitt" here
- This should describe *how* to use this plugin."""
- def tweet(self, message):
- api = twitter.Api(username="nozzlebot", password="#####")
- status = api.PostUpdate(message)
- def doPrivmsg(self, irc, msg):
- (recipients, text) = msg.args
- for channel in recipients.split(','):
- if irc.isChannel(channel):
- nick = msg.nick or irc.nick
- if nick == 'nozzlebot':
- self.tweet(text)
- Class = Twitt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement