# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Ecrit par Camille Huot sur une idée de Frédéric Souchon # variables xchat pour qu'il reconnaisse le script en tant que plugin __module_name__ = "fraifrai" __module_version__ = "1.0" __module_description__ = "ignore tous les nick.length > 15" # on utilise les fonctions fournies par xchat import xchat # la fonction qui fait tout def degage(nick): if len(nick) > 16: xchat.command("IGNORE "+nick+ "!*@* ALL") # on propage l'info du JOIN a xchat return xchat.EAT_NONE def on_join(word, menfous, junk): return degage(word[0]) def on_nick(word, prout, pouet): return degage(word[1]) # on connecte l'evenement Join a notre fonction xchat.hook_print("Join", on_join) xchat.hook_print("Change Nick", on_nick)