IRC

 

Every so often I'll ask Druplicon to remind me about something in the future, and then curse that I haven't yet written such functionality. Then everyone points and laughs at little ol' Morbus. Welp, NO MORE LAUGHING as that code has hit the CVS and Druplicon just now. From the integrated help: Reminders can be set with "BOTNAME: remind NICK (at|by|in|on) DURATION (about|how|that|to) MESSAGE". For example: "BOTNAME: remind Morbus in 1 hour and 6 minutes that his bot is awesome", "BOTNAME: remind me in 23 minutes to check my pot roast.", or even "BOTNAME: remind Monty on Wed, 12 May 2010 13:10:21 -0400 that this was when this code debuted."

Some examples:

<Morbus> Druplicon: remind me in 5 minutes to celebrate.
<Druplicon> Morbus: I'll remind you about that on Wed, 12 May 2010 13:32:55 -0400.
    (time passes)
<Druplicon> Morbus: You asked me to remind you to celebrate.

<EvanDonovan> Druplicon: remind me in 7 hours that I should still be working :(
<Druplicon> EvanDonovan: I'll remind you about that on Wed, 12 May 2010 20:17:34 -0400.

<Morbus> Druplicon: remind me by next week that this feature debuted!
<Druplicon> Morbus: I'll remind you about that on Wed, 19 May 2010 13:34:41 -0400.

I've added some new code to my Drupal IRC bot.module and Druplicon, the official Drupal IRC bot, is now running with these features. First up is feed aggregation: bot.module now integrates with aggregator.module to provide IRC announcements of new feed items. Feeds can be configured per channel or the items can be sent to multiple channels at once. If you run a channel on Freenode that currently has Druplicon and you'd like it to announce relevant news as it happens, don't hesitate to let me know.

A new bot_potpourri.module has been added, and its first feature is timezone display and conversion. From the integrated help: Display timezones with "BOTNAME: timezone BST". Convert timezones with "tz 10AM MST to EST" or "tz 14:27 UTC in Europe/London". Timestamps are allowed if combined and with no spaces: "tz 2010-10-23T10:00 EST to UTC". All returned dates are DST-aware.

Some examples:

<Morbus> find out what time it is somewhere:
<Morbus> Druplicon: tz EST
<Druplicon> 2010-05-11 12:05 EDT.

<Morbus> or convert from one timezone to another:
<Morbus> timezone 14:27 EST to Europe/London
<Druplicon> 2010-05-11 19:27 BST.
<Morbus> tz 10 A.M. America/New_York to MST
<Druplicon> 2010-05-11 08:00 MDT.
<Morbus> tz 6 pm EST in EST
<Druplicon> 2010-05-11 18:00 EDT.

<Morbus> or dates in the future. note that DST is always considered:
<Morbus> tz 2010-10-23T10:00 EST in UTC
<Druplicon> 2010-10-23 14:00 UTC.
<Morbus> timezone 2010-01-23T10:00 EST in UTC
<Druplicon> 2010-01-23 15:00 UTC.

I hope to squeeze in some more features later this week too.

My Drupal IRC bot.module received a new release today, bringing it to 6.x-1.1:

  • bot_seen ping prevention matched inside strings; now only word boundaries.
  • #284666: We now use preg_quote() for various nickname escaping.
  • #349245: bot_tell doesn't consume username whitespace (thanks drewish).
  • #356003: bot_tell sorts queued messages by oldest first (thanks litwol).
  • #343245: Better regex for usernames like betz--; supports betz---- now.
  • #338723: Missing decode_entities() on project statuses (thanks RobLoach).
  • #313025: Better regex for log filtering to prevent substring matches.
  • #300206: Better factoid-ignoring of tell-like messages (thanks RobLoach).
  • #275042: Randomized messages now centralized in bot_randomized_choice().
  • #274888: Move all INSERTs and UPDATEs to use drupal_write_record().
  • #218577: bot_tell.module added (thanks Rob Loach). Additions/changes:
    • pending message queue now exists to remove SELECT on every message.
    • received messages use format_interval(), not a date (thanks litwol).
  • bot_factoid: PM a factoid with "BOTNAME: tell <who> about <factoid>".
  • #190825: Get URL to current logged discussion with "BOTNAME: log pointer?"
  • bot_name_regexp() now exists for matching inside a regular expression.
    • #117876: if bot has a nick clash, it now responds to both nicks.
    • #184015: bot name with non-word characters failed regexp addressing.
  • #137171: bot_karma.module added (thanks walkah/Rob Loach). Additions:
    • patch supported only words: committed version supports phrases.
    • if someone tries to karma themselves, the response is customizable.
    • drupal_write_record() is your friend; get used to using it!
    • "BOTNAME: karma foo?" is required to prevent bad parsing.
    • highest/lowest karmas are available at example.com/bot/karma.
    • terms less than 3 and more than 15 characters are ignored.
  • #267560: OS-specific newlines broke comparisons (thanks Gurpartap Singh).
  • #245610: bot_agotchi greeting triggers now customizable (thanks Alan Evans).
  • #184032: ignore improper hook_help implementations (thanks John Morahan).
  • #229880: bot_factoid stopwords were case sensitive (thanks John Morahan).
  • #187137: Drupal 7 style concats, and other style fixes (thanks dmitrig01).
  • #167097: fixed undefined index and better host check (thanks czarphanguye).
  • #142812: auto reconnect and retry are now configurable (Morbus/Shiny).

I've also recently taken over maintenance of Node Adoption, which I've upgraded and released as 6.x-1.0: "Node Adoption allows you to automatically reassign nodes created by a deleted user to another user of your choice. Similarly, a form is provided to change ownership of all nodes from one user to another at any time. Node Adoption was originally maintained by Mark Dickson (ideaoforder) and sponsored by The Chicago Technology Cooperative. As of Druapl 6.x, Node Adoption is maintained by Morbus Iff."

Back on October 7th, 2007, I wrote that I was a judge over at Adrian Hon's newest project, Let's Change the Game, "a competition to fund development of an [alternate reality game (ARG)] that would raise money for Cancer Research UK". Besides building the Let's Change the Game site (in Drupal), I continued my involvement in the project by becoming an advisor to the winning team, Law 37. Now, a year later, the winner of that competition has just launched the alternate reality game Operation: Sleeper Cell, another Drupal site:

"Operation: Sleeper Cell will see teams of players from around the world working together to solve 'puzzle cells' in a grid. By donating money to the game, they can unlock extra cells for all players, and also advance the story, which takes place over websites, blogs, Twitter and even in real life."

My advisor role largely played to "how do ya do this in Drupal?" so, gladly, I've remained out of the content, missions, and puzzles produced. Gladly because, with the site launched, it looks so tasty that I'm quite happy to be along for the ride with all the other players. I hope to be sponsoring some cells, with proceeds donated to cancer research, sometime soon. Follow the progress of, or sponsor, team #swhack.

Operation: Sleeper Cell launches as another alternate reality experience closes: Liberty News, a companion to the BBC's Spooks: Code 9 from Kudos. The site was created by Adrian Hon's Six to Start and was built in Drupal by yours truly. Unfortunately, an IP filter denies non-UK residents, so you'll need to use Anonymouse.org to see it.

Those who have ever read my emails may know, love, or harbor resentment to, my random signatures. Now 81 entries long, I'm always on the lookout for phrases or words that titillate me in as few words as possible: 58 characters is the largest signature length I've saved. Shrinking an idea or emotion down to that many characters or less is a bit like Perl Golf, another game I enjoy.

<dopry> hey Morbus, how's it going... rough evening/morning?
<Morbus> nah, not at all.
<dopry> Ok.. You just seemed to have a chip on the old shoulder...
<Morbus> dopry: nah. not at all.
<Morbus> well, it's quite possible i've had a chip on my shoulder for so long that it's part of the shoulder now.
<eaton> that's an excellent motto.
<Morbus> "my chip has been there so long, it's part of my shoulder now"
<Morbus> no wait.
<Morbus> that's not poetic enough'
<Morbus> my chip has been there so long, it's no longer on, but is.
<Morbus> hrm. needs the word shoulder to associate though.
<eaton> "It's quite possible I've had a chip on my shoulder so long that it's part of the shoulder."
<Morbus> mottos are short and lyrical.
<Morbus> my chip's been there so long, it's no longer on, but is, my shoulder.
<Morbus> hrm.
<Morbus> no, that's not good either.
<Morbus> ooh! i goti t!
<Morbus> "i've no more shoulders, only chips"
<Morbus> now *that's* a good one.

82! 82 signatures! Ah ah ah!

I coulda swore I had posted this before, but from September 20th, 2001. Lines have been combined for readability:

<Morbus> you know, i'm so mad at kelloggs. they have chocolate frosted flakes, right? and they had a box at this market basket in town. so it was the ONLY flipping box. and after i got it home, i discovered why. the damn thing was like three months stale. but i still ate it, and i still loved it. but the stupid store never got them back
<Morbus> so i email kellogs. i'm like "yo bitches, gimme some cocoa"... they email me back and they're like "please talk to your manager". they thought i was some stock boy complaining about not getting a shipment in. i was like "whhhaa?" so then i went to mycereal.com and made my own cereal. it was frosted flakes, cocoa frosted flakes, lucky charms marshmallows, and some chocoloate marshmallows
<Morbus> i called it "indigestos".
<Morbus> i tell ya, it was the best damn cereal ever.
<Mishka> that sounds so gross
<djc> mmmm
<Morbus> no way, man, it was awesome. so flipping good.
<djc> how mcuh?
<Morbus> one serving (which are huuuge) was enough for like three days of sleepliess nights
<Morbus> well, cos i got all the sinful crap, it was like 20 bucks for seven servings.
<Morbus> but worth it man, worth it.
<djc> hhaaha
<mnickel> COOL
<djc> thats great
<Mishka> you americans are weird
<djc> i want my own cereal!
<Morbus> now, it looks like the site's closed. that sucks.
<Morbus> i only got in because i got a secret code.
<Morbus> well, you wanna hear my character for indigestos? see. actually, i wanted to make an all marshmallow cereal. but get this, mycereal.com said my cereal wasn't healthy enough and i had to pick some other shit. laughed my ass off. so anyways, the flippign character would be this pirate, who would go around to toehr cereals stealing thier marshmallows. and there'd be a prize in the cereal.
<djc> haha
<djc> cool
<djc> like a treasure!
<Morbus> the package would say "arrrr! hey kids? getting sick? try this?" and ripping open the pouch would be like a handful of normal cereal to sprinkle on your marshmallows
<djc> hahhahaaaaaaaaaaaaaa
<Morbus> it'd be fuckign awesome
<djc> dude
<mnickel> rotflmao!!!!
<djc> i am laughing my ass off here
<Mishka> oh my .....
<mnickel> dude, you are fricken' hilarious!!
<djc> +1
<djc> thats good stuff
<mnickel> Morbus++

Posted without permission, thus names obscured:

<user1> meaning, you have an amazing talent of spawning discussion about the most trivial things
<user2> Who, Morbus?
<Morbus> i take that as a compliment, you know.
<user2> That's soooo *true*!
<user1> Which is part of the problem, I thiink :)
<user2> I find everything Morbus has ever said to be trivial.
<user2> That's why I agree with him so often.
<user1> Morbus: Sorry if it comes off as a surprise, but I find that every discussion where you are involved only gets longer, rather than resolved. And so I find that not dealing with you makes me happier and less stressed.
<user1> it's surely better than bickering endlessly
<user1> and you've already indicated that we're not going to reach a compromise anyway
<Morbus> you'll find that i haven't commented on that issue since then.
<Morbus> i'm not sure how you can blame the other comments on me.
<user1> I don't know how the morbus effect works either
<user1> but it does

In order to test the stability of an IRC bot written as a Drupal module, I needed to get something useful running relatively soon so that I could watch it over a week of normal usage. As such, the first complete bot.module plugin has landed in Drupal CVS, which simply reports the titles of drupal.org nodes. In a development channel like #drupal, we're constantly mentioning issue URLs for followups, patch testing, sanity replicators, etc.. This module spits the issue title to prevent wasted clicks to a topic you know nothing about. Running live on #drupal as I type.

Been on my todo list for a while. Busted out a framework today:

Druplicon is an IRC bot that has been servicing #drupal, #drupal-support, and many other IRC channels since 2005, proving itself an invaluable resource. Originally a Perl Bot::BasicBot::Pluggable application coded by Morbus Iff, he always wanted to make the official #drupal bot an actual Drupal module.

This is the fruit of these labors. Whilst the needs of Druplicon are driving the future and design of the module, this is intended as a generic framework for IRC bots within Drupal, and usage outside of Druplicon is encouraged.

You can browse the source code online. It is very basic at the moment - mostly a proof of concept, but uses the Net_SmartIRC PEAR library, is a Drupal 5 module, and supports IRC plugins (ie., additional Drupal modules) via Drupal's hook system. I doubt I'll be converting the existing Druplicon bot over anytime soon, but I will be slowly finessing the plugin system (right after I add a "reload" function, right after I add all the IRC message types, right after I...).

Syndicate content