# -*- coding: utf-8 -*-

from pollirio.reactors import expose
from pollirio import choose_dest

import random

@expose('mappina')
def mappina(bot, ievent):
	bot.msg(choose_dest(ievent), 'aaaaah, la STREGA!')

@expose('linxys')
def linxys(bot, ievent):
	bot.msg(choose_dest(ievent), 'Linxys :***')

@expose(r'\bturid\b')
def turid(bot, ievent):
	sentences = [
		'che ha combinato Turid stavolta?!',
		'ma Turid ha bevuto?',
		'in alto i calici per Turid!',
		'evviva Turid!!!',
		'fate reclutare gente a Turid!',
		'Turid mi fa i dispetti :(',
		'Turid: ILLIMITATAMENTEEEEEEE',
	]
	msg = random.choice(sentences)
	bot.msg(choose_dest(ievent), msg)

@@ -108,149 +108,538 @@
 om%0A%0A
-@expose('mappina')%0Adef mappina(bot, ievent):%0A%09bot.msg(choose_dest(ievent), 'aaaaah, la STREGA!')%0A%0A@expose('linxys')%0Adef linxys(bot, ievent):%0A
+def randomize_msg(sentences):%0A%09times = random.randint(0, len(sentences) / 3)%0A%09while times %3E 0:%0A%09%09index = random.randint(0, len(sentences) - 1)%0A%09%09sentences.insert(index, None)%0A%09%09times -= 1%0A%09return random.choice(sentences)%0A%0A@expose('mappina')%0Adef mappina(bot, ievent):%0A%09bot.msg(choose_dest(ievent), 'aaaaah, la STREGA!')%0A%0A@expose('linxys')%0Adef linxys(bot, ievent):%0A%09sentences = %5B%0A%09%09'Linxys :***',%0A%09%09'Linxys ti difendo io!',%0A%09%09'hey, Linxys! Non tradirmi! :(',%0A%09%09'come recluta Linxys...',%0A%09%5D%0A%09msg = randomize_msg(sentences)%0A%09if msg:%0A%09
 %09bot
@@ -664,29 +664,19 @@
 event), 
-'Linxys :***'
+msg
 )%0A%0A@expo
@@ -961,31 +961,246 @@
 msg = random
-.choice
+ize_msg(sentences)%0A%09if msg:%0A%09%09bot.msg(choose_dest(ievent), msg)%0A%0A@expose('x3rr3x')%0A@expose(r'%5Cberre%5Cb')%0Adef erre(bot, ievent):%0A%09sentences = %5B%0A%09%09'vola, x3rr3x, vola!',%0A%09%09'x3rr3x sei carico stasera?',%0A%09%5D%0A%09msg = randomize_msg
 (sentences)%0A
@@ -1199,16 +1199,26 @@
 tences)%0A
+%09if msg:%0A%09
 %09bot.msg

Add more sentences, and make them look more random