__module_name__ = "encodeur/decodeur rot13" 
__module_version__ = "1.0" 
__module_description__ = "encodeur/decodeur rot13" 

import xchat

def rot13_cb(word, word_eol, userdata): 
    if len(word) < 2: 
        print "Parametre manquant" 
    else:
        chaine = word_eol[1].encode('rot13')
        xchat.command("PRIVMSG %s %s" % (xchat.get_info("channel"), chaine))
        print word_eol[1]+" => "+chaine
    return xchat.EAT_ALL
 
xchat.hook_command("ROT13", rot13_cb, help="/ROT13 <message> encode/decode message en rot13")

