Mr Toms is an IRC/Jabber/XMPP bot written in Scala. He can load plugins from jar files. Writing plugins is very simple, yet plugins can be very powerful.
% ./configure [--help for options] % make
You will need "sbt" in your path for this to succeed. You also need a local scala install of at least 2.9 (see --scala configure option). sbt will download a copy of scala itself because that is what it likes to do, but Mr Toms will build with your local scala.
You can configure Mr Toms entirely through IRC or XMPP but the first time Mr Toms is run he won't know about any servers. Fortunately command line arguments can be used to add the first server (and subsequent server connections if desired).
./bin/mrtoms -i irc.server.net -c channel -n botnick
Mr Toms will connect to the given server and channel, at which stage the first user to say !hello will become Mr Toms' master.
14:24 -!- mrToms [mrtoms@localhost] has joined #channel 14:24 < totoro> !hello 14:24 < mrToms> hello dad totoro 14:25 < totoro> i am so happy that I now have a mrtoms friend 14:25 < pcoffin> i am so jealous i wish i was cool
When messaging Mr Toms privately ! is not needed
A Jabber/XMPP connection can be added using:
% ./bin/mrtoms -x firstname.lastname@example.org -c channel -P <password>
This will cause Mr Toms to log in to the server at xmpp.server.net as email@example.com with the given password. After connecting Mr Toms will join the conference channel given. He will use the user part of the XMPP login unless -n is used to set the channel nickname.
Use !save to save Mr Toms' configuration so that he can be run in future without any arguments.
From here on issue !help to Mr Toms to see what he can do. Try loading some plugins also.
All command line options can be seen by running:
Checkout Mr Toms' git and copy one of the existing plugins from the “plugins” directory. Change the package definition to match the plugin name and write the description for the plugin in info.txt. The “register” method is used to register methods with bot commands. The arguments types of the method passed to register are used to work out how to parse the arguments in the command sent to the bot so they can be automatically converted and handed to your method. The other arguments to register relate to the permissions necessary to execute the command and the help string for the command.