import xchat, string, random, re, time __module_name__ = 'auto-slap' __module_version__ = '0.1' __module_description__ = 'Auto-slaps retour' objects = ['an apple', 'a freebox', 'a unix manual', 'a guitar'] def slap(word, word_eol, userdata): trig = re.split(' ',string.lower(word[1])) sender = word[0].strip('x0319') if trig[0] == 'slaps' and trig[1] == xchat.get_info('nick'): xchat.command('me slaps %s with %s' % (sender, random.choice(objects))) return xchat.EAT_NONE xchat.hook_print('Channel Action Hilight', slap) print 'Auto-slaps pret'