slate/slate-irc — pull request #11 by erming (2014-04-14 14:56:06+00:00)
Title: Minor fixes and two new plugins: "mode" and "motd"

Hello!

This pull request contains fixes and two new plugins: __MODE__ and __MOTD__.

### Fixes

__whois__
The list of channels didn't work. I've fixed this.

__topic__
The plugin only listened to ```TOPIC```. However, there are two other events: ```RPL_TOPIC``` and ```RPL_NOTOPIC```. I've added support for these events.

### New plugins

__mode__
Listens to ```MODE``` events and emits an event that looks like this:
```
{ nick: 'user',
target: '#chan',
mode: '-o',
client: 'other_user' }
```

__motd__
Listens to ```MOTD``` and emits this:
```
{ motd:
[ '- sendak.freenode.net Message of the Day -',
'- Welcome to sendak.freenode.net in Vilnius, Lithuania, EU.',
'- Thanks to Microlink Lietuva (http://www.microlink.lt) for providing this',
'- server!',
'-',
'- SENDAK, MAURICE [1928-2012]. The author of Seven Little',
'- Monsters and Where the Wild Things Are, Maurice Sendak was',
'- born in Brooklyn, NY, US, to a family of poor Polish',
'- immigrants who moved to the US before World War II. He',
'- became an illustrator while in high school.',
'-',
'- Welcome to freenode - supporting the free and open source',
'- software communities since 1998.',
'-',
'- By connecting to freenode you indicate that you have read and',
'- accept our policies as set out on http://www.freenode.net',
'- freenode runs an open proxy scanner. Please join #freenode for',
'- any network-related questions or queries, where a number of',
'- volunteer staff and helpful users will be happy to assist you.',
'-',
'- You can meet us at FOSSCON (http://www.fosscon.org) where we get',
'- together with like-minded FOSS enthusiasts for talks and',
'- real-life collaboration, if you\'re more keen on the outdoors why',
'- not attend or arrange a local geeknic (http://www.geeknic.org).',
'-',
'- We would like to thank Private Internet Access',
'- (https://www.privateinternetaccess.com/) and the other',
'- organisations that help keep freenode and our other projects',
'- running for their sustained support.',
'-',
'- In particular we would like to thank the sponsor',
'- of this server, details of which can be found above.',
'-',
'- ***************************************************************',
'- Please read http://blog.freenode.net/2010/11/be-safe-out-there/',
'- ***************************************************************',
'End of /MOTD command.' ] }
```

That's about it!

And one more thing..
I've recently changed from node-irc to slate-irc in one of my projects. It's been stable and I find the plugin system really easy to work with. +1!