#!/usr/bin/env python # -*- coding: UTF-8 -*- import xchat __module_name__ = "fastkick" __module_version__ = "1.1" __module_description__ = "Little plugin to allow a fast op/kick/deop operation" __module_author__ = "Skateinmars and Gapz - #ubuntu-fr@irc.freenode.net" #Installation notes / Notes d'installation : # Copy this file under your ~/.xchat2/ directory # Copiez ce fichier dans votre repertoire ~/.xchat2/ # def trouvecs() : i = 0 bla = 0 while bla != 1 : laliste = xchat.get_list('users') if laliste[i].nick == 'ChanServ' : return i bla = 1 else : i = i+1 def fastkick_cb(word, word_eol, userakicker): userakicker = word[1] if len(word) == 3 : channel = word[2] else : channel = xchat.get_info('channel') luser = xchat.get_info('nick') commande1 = 'msg chanserv op '+channel+' '+luser commande2 = 'kick '+userakicker commande3 = 'deop '+luser xchat.command(commande1) num = 0 csnum = trouvecs() while xchat.get_list('users')[num].nick != xchat.get_info('nick') and xchat.get_list('users')[num].prefix != xchat.get_list('users')[csnum].prefix : num = num + 1 if num > len(xchat.get_list('users')) : num = 0 xchat.command(commande2) xchat.command(commande3) return xchat.EAT_ALL xchat.hook_command("FASTKICK", fastkick_cb, help="/FASTKICK ask chanserv to op, kick user, then deop") print "Plugin fastkick chargé" #print "Plugin fastkick loaded" #uncomment this if you want an english sentence ;)