diff options
author | Matt Behrens <matt@zigg.com> | 2012-01-18 13:32:28 -0500 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2012-07-01 18:36:48 +0200 |
commit | 5f64e56973deddd5f80ae0bf78cec2932fbb7b9a (patch) | |
tree | 88cc843627da66566ea04d8f9b5f773927a49b8e /miniircd | |
parent | 76ca97f33105ce5be47a405d52d70c485ce38473 (diff) | |
download | miniircd-5f64e56973deddd5f80ae0bf78cec2932fbb7b9a.tar.gz miniircd-5f64e56973deddd5f80ae0bf78cec2932fbb7b9a.zip |
ISON support
- ISON support, allows miniircd to be used with e.g. Pidgin's buddy list
and tell when people sign on or off
- add ISON to test suite
- little patch to test.py so that it doesn't break if socket.getfqdn()
returns something other than localhost
Diffstat (limited to 'miniircd')
-rwxr-xr-x | miniircd | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -221,6 +221,14 @@ class Client(object): def away_handler(): pass + def ison_handler(): + if len(arguments) < 1: + self.reply_461("ISON") + return + nicks = arguments + online = [n for n in nicks if server.get_client(n)] + self.reply("303 %s :%s" % (self.nickname, " ".join(online))) + def join_handler(): if len(arguments) < 1: self.reply_461("JOIN") @@ -500,6 +508,7 @@ class Client(object): handler_table = { "AWAY": away_handler, + "ISON": ison_handler, "JOIN": join_handler, "LIST": list_handler, "MODE": mode_handler, @@ -820,3 +829,5 @@ def main(argv): main(sys.argv) + +# ex:et:sw=4:ts=4 |