Add capability to delete unused channels to source plugin

This commit is contained in:
Stefan Hacker
2013-02-26 10:57:35 +01:00
parent deb9aba022
commit e09ba4fb93
5 changed files with 210 additions and 35 deletions

View File

@@ -106,4 +106,13 @@ class UserRegistry(object):
return False
return True
def usingChannel(self, sid, cid):
"""
Return true if any user in the registry is occupying the given channel
"""
for user in self.users[sid].itervalues():
if user.state and user.state.channel == cid:
return True
return False