All pastes #99964 Raw Edit

skateinmars

public python v1 · immutable
#99964 ·published 2006-07-25 19:58 UTC
rendered paste body
#!/usr/bin/env python# -*- coding: UTF-8 -*-import xchat__module_name__ = "fastkick" __module_version__ = "1.0" __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 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   while xchat.get_list('users')[num].nick != xchat.get_info('nick') and xchat.get_list('users')[num].prefix == xchat.get_list('users')[0].prefix :      num = num + 1      if num > len(xchat.get_list('users')) :         num = 0   xchat.command(commande2)   xchat.command(commande3)   return xchat.EAT_ALLxchat.hook_command("FASTKICK", fastkick_cb, help="/FASTKICK <user> ask chanserv to op, kick user, then deop")print "Plugin fastkick chargé"#print "Plugin fastkick loaded" #uncomment this if you want an english sentence ;)