Commit Graph

16 Commits

Author SHA1 Message Date
Brian S. Stephan 359ca24856 remove replypath and all the places it was used.
with alias calling do() internally, there is no need for all this
replypath nonsense, and if there's ever a module that needs to reply
to stuff on its own outside of do(), it'd have to be implementing
all of this anyway, so it was pretty irrelevant.

this makes DrBotIRC alias/recursion stuff a bit cleaner.
2011-01-07 23:09:07 -06:00
Brian S. Stephan 0bd681c324 convert most modules to use ! commands.
okay, it's time. we got around for a while with all sorts of silly
config options and exceptions and common strings triggering bot
commands. but now it's time to man up and expect modules to be
more strict and less loosey-goosey.

convert the popular modules (i.e. the ones that still work) to
trigger on !pi rather than pi, etc. usually, this is achieved via
regex searches, although there are some weird bugs (ones i'm hoping
are caused by other recursion/alias bugs and not this commit).

more code around this will be gutted soon, but this, at least,
means you can't say 'tweet that shit, yo' and accidentally trigger
the bot.
2011-01-07 20:37:24 -06:00
Brian S. Stephan 01d3c7c80c migrate some code that became pivotal to the bot into DrBotIRC.
this is a big change. DrBotIrc is now in charge of module loading
and unloading, aliases, and recursion. the Alias module is no more,
and a bunch of functionality was moved out of IrcAdmin, including
also config file saving, the sigint handler, and quitting the bot.

additionally, a lot of stuff got caught in the wake. dr.botzo.py
is simpler now, and lets DrBotIRC do the dynamic loading stuff.
Module.__init__ changed, modules no longer get modlist and instead
get a reference to the DrBotIRC object. IrcAdmin still has the same
exposed methods, but now calls out to DrBotIRC to achieve some of
them.

naturally, a recursion/alias rewrite was included with this change.
it is clearer now (i think), but probably brittle somewhere.
additionally, currently any module that has registered a pubmsg
handler can potentially fire more than once on one input (without
recursion). this may be the next thing to fix. do() may need to
be split, or maybe it's time to stop having modules deal with
pubmsg/privmsg entirely. need to decide.

WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
2011-01-07 17:38:26 -06:00
Brian S. Stephan 157d1145ea specify ellipses continuation as a python string 2011-01-05 09:34:19 -06:00
Brian S. Stephan 4241071b7e print tweet id when printing tweets.
will be necessary if we ever implement any kind of reply-to-id replying
2011-01-03 00:31:23 -06:00
Brian S. Stephan 0e7e2bf50c add tweet subcommand to twitter, to send tweets.
needs admin, until i figure out if i want more authentication for it
2010-12-24 13:19:50 -06:00
Brian S. Stephan d9b85f4364 track whether or not the twitter module has been authenticated 2010-12-24 13:19:11 -06:00
Brian S. Stephan 699f550ba3 change authentication to over IRC process 2010-12-16 20:15:49 -06:00
Brian S. Stephan 3ba38bd90d it would help if i got the < vs > right 2010-12-16 15:44:51 -06:00
Brian S. Stephan efafb95f5a ability to look up tweets for a user, relative to the latest 2010-12-16 15:23:35 -06:00
Brian S. Stephan 57ddba744e optionally print the source of the tweet in question
useful if you don't know it, such as if the tweet was specified
by id rather than by user
2010-12-16 15:22:34 -06:00
Brian S. Stephan a18897fcde print the native tweet of retweets (rather than the possibly-truncated one)
this now depends on a modified twitter.py, although i could probably
send my patch upstream
2010-12-16 13:04:58 -06:00
Brian S. Stephan 1bacfe047e fix (god i hope fix) unicode in Twitter
also remove some unnecessary unicode conversions right before printing?
commented out until i'm convinced there was no need for it.

protip: clearest description i've read to date:
http://stackoverflow.com/questions/368805/python-unicodedecodeerror-am-i-misunderstanding-encode#370199
2010-12-16 10:36:50 -06:00
Brian S. Stephan 37a677946d fetch more tweets in case the latest was a RT (which we are filtering)
comment about how i'm not really sure about this approach
2010-12-15 23:52:59 -06:00
Brian S. Stephan 7e4e6ab23f look up most recent tweet by username 2010-12-15 23:31:26 -06:00
Brian S. Stephan e4edc7f6f4 first bit of bot twitter functionality 2010-12-15 23:08:08 -06:00