From: Vincent Le Gallic Date: Mon, 13 Oct 2014 18:29:11 +0000 (+0200) Subject: regexp buffer ++ X-Git-Url: http://gitweb.pimeys.fr/?a=commitdiff_plain;h=b63074792ab882652795ae62db50da3fe97575ff;p=bots%2Fbasile.git regexp buffer ++ --- diff --git a/config.py b/config.py index 8b424f1..d6ac42b 100644 --- a/config.py +++ b/config.py @@ -84,7 +84,9 @@ amplifier_regexp = u"(une? (?:(?:putain|enfoiré) d(?:e |'))*|)(?:| super )(?: ( gros = [u"gros", u"énorme", u"lourd"] #: config spéciale-iota -buffer_fail_regexp = u'(^\s*(\.|\\|§|!|/|\||:|)(w|b|win|window|buffer) [0-9]+$|^(\|§|!|/|\\|:|)b [A-Za-z-]+$)' +_prebuffer = u"(\.|\\|§|!|/|\||:|)" +_buffer = u"(w|b|win|window|buffer)" +buffer_fail_regexp = u'(^\s*%s%s [0-9]+$|^%s%s [A-Za-z-]+$)' % (_prebuffer, _buffer, _prebuffer, _buffer) buffer_fail_answers = [u"Pas de chance !", u"Révisez vos classiques !", u"Encore un effort, je sais que vous pouvez le faire. ;)", u"Where did you learn to type?"]