62 lines
1.4 KiB
Python
62 lines
1.4 KiB
Python
|
import random
|
||
|
import threading
|
||
|
import time
|
||
|
|
||
|
client = None
|
||
|
next = None
|
||
|
|
||
|
def on_die():
|
||
|
next.cancel()
|
||
|
|
||
|
def vide_blanc():
|
||
|
i = random.randint(0, len(meublage)-1)
|
||
|
client.pubchat("#pno", meublage[i])
|
||
|
rearmer()
|
||
|
|
||
|
def rearmer():
|
||
|
global next
|
||
|
if next is not None:
|
||
|
next.cancel()
|
||
|
next = threading.Timer(random.randint(1200, 9000), vide_blanc)
|
||
|
next.start()
|
||
|
|
||
|
def mod_init(cl):
|
||
|
global client, next
|
||
|
client = cl
|
||
|
random.seed()
|
||
|
rearmer()
|
||
|
|
||
|
|
||
|
reponses = [
|
||
|
"bien dit !",
|
||
|
"pfff...",
|
||
|
"serieux ? o_O",
|
||
|
"Hello guiniolBot!",
|
||
|
"au fait, juste comme ca, sans vouloir balancer des fleurs ou quoi, mais mon createur est un type bien",
|
||
|
"oh ! mais il parle !",
|
||
|
"je sais que je ne fais que repeter des phrases aleatoires, mais si je peux aider a meubler un peu...",
|
||
|
"bwaaAAaaHahhahahaaahaahahaaaa!!",
|
||
|
"ou pas.",
|
||
|
"nan mais meme si c'etait vrai, t'as vu ta tronche ?"
|
||
|
]
|
||
|
|
||
|
meublage = [
|
||
|
"Aaa.. TCHA!",
|
||
|
"Hello guiniolBot :D",
|
||
|
"Celui qui lit ceci ferait mieux de lire autre chose",
|
||
|
"mais dis donc c'est aussi anime qu'a une soiree scrabble chez les grand-parents ici...",
|
||
|
"bwaarggll"
|
||
|
]
|
||
|
|
||
|
def on_pubchat(who, chan, msg):
|
||
|
if (msg.find('bwaarggll') != -1):
|
||
|
client.pubchat(chan, "BwAaRgGlL!1!!")
|
||
|
|
||
|
i = random.randint(0, len(reponses)-1)
|
||
|
if random.randint(0, 1024) < 42:
|
||
|
client.pubchat(chan, reponses[i])
|
||
|
|
||
|
rearmer()
|
||
|
|
||
|
|