~ensoft-opensource/endroid/xmpp-fonts

« back to all changes in this revision

Viewing changes to src/endroid/plugins/whosonline.py

  • Committer: Tarmac
  • Author(s): Martin Morrison
  • Date: 2013-08-14 11:15:50 UTC
  • mfrom: (31.6.1 endroid-roomowner)
  • Revision ID: tarmac-20130814111550-umpsnxhmp4ujnmqo
Merge whosonline fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
class WhosOnline(Plugin):
10
10
    name = "whosonline"
11
 
    
12
 
    def dependencies(self):
13
 
        return ['endroid.plugins.command']
14
 
    
15
 
    def enInit(self):
 
11
    dependencies = ('endroid.plugins.command',)
 
12
    help = "What? No. My name's not important. You must come with me, or you'll be late."
 
13
    
 
14
    def endroid_init(self):
16
15
        com = self.get('endroid.plugins.command')
17
16
        com.register_muc(self.show_online, 'whosonline')
18
17
        com.register_chat(self.show_online, 'whosonline')
28
27
    def show_rooms_in(self, msg, arg):
29
28
        rooms = self.usermanagement.get_available_rooms() or ["I'm not in any rooms!"]
30
29
        msg.reply('\n' + '\n'.join(rooms))
31
 
    
32
 
    def help(self):
33
 
        return "What? No. My name's not important. You must come with me, or you'll be late."
34
 
 
35
 
def get_plugin():
36
 
    return WhosOnline()