From 3bb83b6f4af1893b6a8862a59bd289e809944b7a Mon Sep 17 00:00:00 2001 From: urlbot Date: Sun, 21 Jun 2015 23:03:54 +0200 Subject: [PATCH] mv moin_strings_* to string_constants --- plugins.py | 15 +-------------- string_constants.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/plugins.py b/plugins.py index 6c28b95..963f186 100644 --- a/plugins.py +++ b/plugins.py @@ -11,7 +11,7 @@ import traceback import urllib.parse from local_config import conf, set_conf from common import * -from string_constants import excuses +from string_constants import excuses, moin_strings_hi, moin_strings_bye from urlbot import extract_title from functools import wraps @@ -121,19 +121,6 @@ def parse_skynet(**args): @pluginfunction('moin', 'parse hi/bye', ptypes_PARSE) def parse_moin(**args): - moin_strings_hi = [ - 'Hi', - 'Guten Morgen', 'Morgen', - 'Moin', - 'Tag', 'Tach', - 'NAbend', 'Abend', - 'Hallo', 'Hello' - ] - moin_strings_bye = [ - 'Nacht', 'gN8', 'N8', - 'bye', - ] - for direction in [moin_strings_hi, moin_strings_bye]: for d in direction: words = re.split(r'\W+', args['data']) diff --git a/string_constants.py b/string_constants.py index 71a3bf5..9f32f95 100644 --- a/string_constants.py +++ b/string_constants.py @@ -473,3 +473,17 @@ The math co-processor had an overflow error that leaked out and shorted the RAM Leap second overloaded RHEL6 servers DNS server drank too much and had a hiccup '''.split('\n')[1:-1] + +moin_strings_hi = [ + 'Hi', + 'Guten Morgen', 'Morgen', + 'Moin', + 'Tag', 'Tach', + 'NAbend', 'Abend', + 'Hallo', 'Hello' +] +moin_strings_bye = [ + 'Nacht', 'gN8', 'N8', + 'bye', +] +