summaryrefslogtreecommitdiff
path: root/plugins/status.py
blob: 7ff553822248bc5f1f060f4bc453d91006442aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
from plugin import BasePlugin

class Plugin(BasePlugin):
    """
    Adds several convenient aliases to /status command
    """
    def init(self):
        for st in ('dnd', 'busy', 'afk', 'chat', 'xa', 'away', 'available'):
            self.api.add_command(st,
                    lambda line,st=st: self.api.run_command('/status' + st + ' "'+line+'"'),
                    usage='[status message]',
                    short='Set your status as %s' % st,
                    help='Set your status as %s' % st)