1 # synarere -- a highly modular and stable IRC bot.
2 # Copyright (C) 2010 Michael Rodriguez.
3 # Rights to this code are documented in docs/LICENSE.
5 # You're going to want to have this one threaded.
7 from core
import command
, shutdown
10 def list_end(conn
, origin
, parv
):
12 pprint
.pprint(channels
)
15 def list_chan(conn
, origin
, parv
):
17 groups
= re
.match(r
'^(.+) (\d+) :(.*)', parv
[1]).groups()
18 channels
.append(groups
)
20 def cmd_list(conn
, (nick
, user
, host
), target
, message
):
23 command
.add('323', list_end
, command
.irc
)
24 command
.add('322', list_chan
, command
.irc
)
28 command
.add('.list', cmd_list
, command
.chan
)
31 command
.delete('.list', cmd_list
, command
.chan
)