Small edits.
parent
f9aff27534
commit
2299ef2588
|
@ -43,9 +43,11 @@ quit.priority = 'low'
|
||||||
def msg(phenny, input):
|
def msg(phenny, input):
|
||||||
# Can only be done in privmsg by an admin
|
# Can only be done in privmsg by an admin
|
||||||
if input.sender.startswith('#'): return
|
if input.sender.startswith('#'): return
|
||||||
|
a, b = input.group(2), input.group(3)
|
||||||
|
if (not a) or (not b): return
|
||||||
if input.admin:
|
if input.admin:
|
||||||
phenny.msg(input.group(2), input.group(3))
|
phenny.msg(a, b)
|
||||||
msg.rule = (['msg'], r'(#?\S+) (.*)')
|
msg.rule = (['msg'], r'(#?\S+) (.+)')
|
||||||
msg.priority = 'low'
|
msg.priority = 'low'
|
||||||
|
|
||||||
def me(phenny, input):
|
def me(phenny, input):
|
||||||
|
|
|
@ -19,7 +19,6 @@ def json(text):
|
||||||
if r_json.match(r_string.sub('', text)):
|
if r_json.match(r_string.sub('', text)):
|
||||||
text = r_string.sub(lambda m: 'u' + m.group(1), text)
|
text = r_string.sub(lambda m: 'u' + m.group(1), text)
|
||||||
return eval(text.strip(' \t\r\n'), env, {})
|
return eval(text.strip(' \t\r\n'), env, {})
|
||||||
print text
|
|
||||||
raise ValueError('Input must be serialised JSON.')
|
raise ValueError('Input must be serialised JSON.')
|
||||||
|
|
||||||
def search(query):
|
def search(query):
|
||||||
|
|
|
@ -27,7 +27,7 @@ abbrs = ['etc', 'ca', 'cf', 'Co', 'Ltd', 'Inc', 'Mt', 'Mr', 'Mrs',
|
||||||
'syn', 'transl', 'sess', 'fl', 'Op'] \
|
'syn', 'transl', 'sess', 'fl', 'Op'] \
|
||||||
+ list('ABCDEFGHIJKLMNOPQRSTUVWXYZ') \
|
+ list('ABCDEFGHIJKLMNOPQRSTUVWXYZ') \
|
||||||
+ list('abcdefghijklmnopqrstuvwxyz')
|
+ list('abcdefghijklmnopqrstuvwxyz')
|
||||||
t_sentence = r'^.{5,}?(?<!\b%s)(?:\.(?= [A-Z0-9]|\Z)|\Z)'
|
t_sentence = r'^.{5,}?(?<!\b%s)(?:\.(?=[\[ ][A-Z0-9]|\Z)|\Z)'
|
||||||
r_sentence = re.compile(t_sentence % r')(?<!\b'.join(abbrs))
|
r_sentence = re.compile(t_sentence % r')(?<!\b'.join(abbrs))
|
||||||
|
|
||||||
def unescape(s):
|
def unescape(s):
|
||||||
|
|
Loading…
Reference in New Issue