Commit a1b20551 authored by mathieui's avatar mathieui

Fix #2500 (better “C’est toi le”)

Thanks, anonymous contributor
parent e451041f
......@@ -21,6 +21,7 @@ from plugin import BasePlugin
import tabs
import string
import xhtml
import random
char_we_dont_want = string.punctuation+' ’„“”…«»'
......@@ -29,9 +30,10 @@ class Plugin(BasePlugin):
for tab_type in (tabs.MucTab, tabs.PrivateTab, tabs.ConversationTab):
self.api.add_tab_command(tab_type, 'stoi',
help="Repeats the last word of the last message "
"in the conversation, and use it in an "
"annoying “C’est toi le” sentence.",
help="Repeats the last word of the last "
"message in the conversation, and "
"use it in an annoying “C’est toi "
"le” sentence.",
short='C’est toi le stoi.')
def stoi(self, args):
......@@ -47,4 +49,10 @@ class Plugin(BasePlugin):
last_word = txt.split()[-1]
last_word = "vide"
self.api.send_message("C’est toi le %s." % last_word)
intro = "C'est toi " if random.getrandbits(1) else "Stoi "
if last_word[0] in 'aeiouAEIOUÀàÉéÈè':
msg = intro + ('l’%s' % last_word)
msg = intro + ('le %s' % last_word)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment