Cort's Constructs

Welcome Guest ( Log In | Register )

RTBot Introduction

Posted by Cort, Jul 29 2006, 04:46 PM in RTBot

Okay, I'm back in business. Not many university related tasks in the next months and family has been -- uuh -- handled. wink.gif

I spent pretty much all of Monday and Tuesday getting Rails running in Apache with Chriss, a friend of mine and co-owner of the server. I can tell you, administrating Apache is no fun when you have no clue what you're doing. smile.gif But while we were on it, we also cleaned up the Apache installation and updated to 2.2, so I guess it was worth it.

There have been no updates to the code of the webapp itself yet, but I think it's time for the promised RTBot introduction.


A short history of a lovely bot by the name of 'RTBot'

RTBot was raised in an IRC-channel that was founded on Sunday the 29th of May, 2005. He was born at 22:57 UTC (yeah, he's very picky about timezones, probably inherited that from his father) in the warm night of Wednesday the 8th of June, 2005. You know, one of those beautiful nights where you can see thousands of stars but I digress. His birth name was 'TestBot', but he applied for a name change to 'FriendlyRTBot' as soon as he had learned to write (which was roughly three hours later yeah, he's always been a fast learner). His friends considered that too long and nasty though, so he usually just goes by 'RTBot' nowadays.

Originally, he was built on top of some ugly IRC library, but on Saturday the 3rd of September 2005 he shook it off and since then is 100% hand-written in Python. (Some external libraries have been used later, but not for any core functionality.)

He saw his first aim in life in opping all RTs in the channel, but soon he learned more tricks. It quickly became apparent that a plugin interface is necessary. (And I've always been a big fan of well-structured, easy to use plugin interfaces.) He appeared for the first time with his shiny new plugins in the night of Saturday the 15th of October, 2005. A big part of this plugin interface has been contributed by Ksero (as well as a lot of other stuff).
Plugins can be added, removed or modified and are then automatically reloaded/unloaded without any user interaction and without any other part of the code being reloaded/restarted. (I admit it, I'm very proud of this hot-swapping feature.)

With the plugin interface ready and stable (and more contributers starting to work on plugins) and RTBot getting into his teenage years, he needed his own room. So he moved to his own Subversion repository later that day.

Since Thursday the 6th of April, 2006 we're working on a web application which is going online these days and that allows to activate/deactivate plugins, update plugins straight from the repository (making no administration on the server necessary to add/modify functionality), viewing stored logs or watching the logs in realtime, viewing the last errors in plugins and even to completely restart the bot.

A quick overview of some of RTBot's functions:
  • Give op- and voice-status to users based on their hostname and other meta-data. (AuthenticationPlugin)
  • Translate VCs in both directions in different dialects. (VoiceChatPlugin)
  • Respond to various VCs (to make him look a bit more human). (HumanBehaviourPlugin)
  • Roll various dice. (DieRollingPlugin)
  • Show the current time in, or translate a time to a given timezone. (ClockPlugin)
  • Convert currencies on the fly. (CurrencyPlugin)
  • Do some basic math. (MathEvalPlugin)
  • Deliver messages to other users when they are offline. (MailboxPlugin)
  • Calculate the miner loads per rock for given core/map/settings. (MinerLoadCalculationPlugin)
  • Display data about various items from a core file. (CoreReaderPlugin, based on Factoid's CoreDump)
  • Show a line of trivia for a film/series/game from the IMDB. (IMDBTriviaPlugin)
  • Play a game of AllegTacToe against a user. (AllegTacToePlugin)
  • and much more...

Upcoming projects are some bug fixes (the last major restructuring of the plugin interface has brought a lot of cool new features like plugin dependencies, but also broke some minor stuff), rewriting the MailboxPlugin, getting rid of the MODE-spam caused by the AuthenticationPlugin, adding a new EventPlugin that will announce events from the RT website and eventually the integration of Terra's social network bot. The webapp still isn't completely ready either, that will come first. And I was going to write a howto to writing plugins. I'm also working on three or four more secret new plugins, but you'll see. smile.gif


QUOTE
RTBot: "Hey Cort, did you just say my name?"
May you live forever somewhere in the cyberspace, RTBot!
RTBot: "Hey Cort, did you just say my name?"
Oh, shut up...