示例#1
0
文件: kick.py 项目: Corgano/pyrefly
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))
示例#2
0
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')
示例#3
0
文件: mode.py 项目: Corgano/pyrefly
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