Commit Graph

14 Commits

Author SHA1 Message Date
Brian S. Stephan 0589939137 support multiple strings as counting as nick highlights
also, treat @nicks as being addressed, since we are doing discord
through bitlbee now
2019-01-10 08:48:15 -06:00
Brian S. Stephan 474afe2576 do some ircbot prospector cleanup
bss/dr.botzo#17
2017-03-10 18:51:36 -06:00
Brian S. Stephan dbc4e6fe6f rename event._recursing to event.recursing 2017-03-10 18:29:31 -06:00
Brian S. Stephan a79d0cdd9f bot: add a bunch of event attrs related to msgs
- event.addressed - msg started with 'bot: '
- event.original_msg - the pub/privmsg
- event.addressed_msg - pub/privmsg minus 'bot: '
- event.sender_nick - nick of event.source
- event.sent_location - channel or nick of event.source
- event.in_privmsg - if the event was in a privmsg or not

closes bss/dr.botzo#32
2017-03-10 18:16:11 -06:00
Brian S. Stephan 0003c0c16e bot: default _recursing to False 2017-03-09 08:06:31 -06:00
Brian S. Stephan 6f9bbd304f bot: don't strip []s if no replacement happened 2017-02-26 10:42:32 -06:00
Brian S. Stephan 995bb643f3 attempt to have outbound recursion
same logic as replacing [subcommand] with the output of subcommand, but
on the outbound side, via {subcommand}. this lets you do something like,
say:

!echo {!facts buh}

and that won't get interpreted until '{!facts buh}' is on its way out of
the bot. thus, you could also put '{!facts buh}' into the output of some
other command, like a countdown reminder
2017-02-23 21:35:03 -06:00
Brian S. Stephan 1bbb64618d bot: capture exceptions, try to report on them
it beats crashing, probably
2017-02-22 22:08:04 -06:00
Brian S. Stephan 015eacbe53 xmlrpc: expose IRCBot.reply, use it over privmsg
converts dispatch and the admin form to reply

closes bss/dr.botzo#21
2017-02-12 11:41:29 -06:00
Brian S. Stephan 23bb5cdd78 allow IRCBot.reply() to work eventless
reply() used to require an event, but all it used it for was to
determine the destination and to identify recursion. basically, strictly
only -replies-. we can make this a more robust privmsg, too, by adding
explicit_target and inferring recursion as False. this will let
basically any code currently using privmsg to use reply instead, and
benefit from multi-line and line splitting

bss/dr.botzo#21
2017-02-12 11:33:13 -06:00
Brian S. Stephan 010afd05ce add some anti-flood protection stuff
this throttles multi-line messages in a way that probably doesn't affect
the normal cases much, and scales fairly well to far longer text. for
some reason long ascii art still triggers the flood detection, but with
this code at least it happens later in the process. so, success, for
now? i can fix the ascii art at some future point if i ever hit it
practically

closes bss/dr.botzo#23
2017-02-12 10:58:18 -06:00
Brian S. Stephan 8b4f8b2545 move message splitting into IRCBot.reply()
leaves IRCBot.privmsg() pretty vanilla. this should make it clearer
which version for modules/etc to use (hint: it's reply)

bss/dr.botzo#21
2017-02-12 10:47:27 -06:00
Brian S. Stephan 8f8af4e6b4 package updates and resulting compat stuff
changes to urls.py in the django views, trivial __init__ change for the
irc library stuff

bss/dr.botzo#16
2017-02-06 22:58:51 -06:00
Brian S. Stephan cd23f062a9 collapsing all of dr_botzo one directory 2017-02-04 11:51:22 -06:00