def process(sender, type, args, client): comSend = sender.getResource() room = sender.getStripped() if xmppUtils.isModerator(room, comSend): if len(args) > 0: senderNick = sender.getResource() xmppUtils.setRole(room, args, 'none', '...cause the kickin\' boot has granted its powers to %s' %(comSend))
def process(sender, type, args, client): room = sender.getStripped() comSend = sender.getResource() if xmppUtils.isModerator(room, comSend): if len(args) > 0: senderNick = sender.getResource() xmppUtils.setRole(room, args, 'visitor', 'Requested by ' + senderNick) elif not xmppUtils.isAdmin(room, comSend): xmppUtils.sendMessage(room, 'Unauthorized.', type='groupchat')
def checkmode(who, room): if len(who) < 1: return -1 if xmppUtils.isAdmin(room, who): xmppUtils.sendMessage(room, 'Administrator', type='groupchat') elif xmppUtils.isModerator(room, who): xmppUtils.sendMessage(room, 'Moderator', type='groupchat') elif xmppUtils.isMember(room, who): xmppUtils.sendMessage(room, 'Member', type='groupchat') return 0