]>
jfr.im git - irc/rizon/acid.git/blob - pyva/src/main/python/pseudoclient/sys_channels.py
1 from collection
import *
4 class Channel(CollectionEntity
):
5 def __init__(self
, id, name
):
6 CollectionEntity
.__init
__(self
, id)
11 class ChannelManager(CollectionManager
, Subsystem
):
12 def __init__(self
, module
, type = Channel
):
13 Subsystem
.__init
__(self
, module
, module
.options
, 'channels')
14 CollectionManager
.__init
__(self
, type)
16 def on_added(self
, channel
):
17 self
.module
.join(channel
)
19 def on_removed(self
, channel
):
20 self
.module
.part(channel
)
22 def on_banned(self
, channel
):
23 self
.module
.part(channel
)
25 def on_unbanned(self
, channel
):
27 self
.module
.join(channel
)