#!/usr/bin/python # -*- coding: utf-8 -*- import brathuhn ############################################## def notify_all(msg, args): message = ""; userJID = brathuhn.getUsers().items() for a in userJID: message += "{0}, ".format(a[0].getResource()); message = message[:-2]; if len(args)>=2 and args[1] != "": message += ": "; for a in args[1:]: message += "{0} ".format(a); brathuhn.sendMsg(brathuhn.ROOM, message,'groupchat') ############################################## brathuhn.addCommand("all","Usage: !all [msg]; Notify everyone in Channel", notify_all) ##############################################