mirror of
http://aero2k.de/t/repos/urlbot-native.git
synced 2017-09-06 15:25:38 +02:00
add default parser; add \LaTeX parser
This commit is contained in:
15
plugins.py
15
plugins.py
@@ -102,6 +102,21 @@ def parse_skynet(**args):
|
||||
'msg': '''I'm an independent bot and have nothing to do with other artificial intelligence systems!'''
|
||||
}
|
||||
|
||||
@pluginfunction('latex', r'reacts on \LaTeX', ptypes_PARSE)
|
||||
def parse_skynet(**args):
|
||||
if r'\LaTeX' in args['data']:
|
||||
return {
|
||||
'msg': '''LaTeX is way too complex for me, I'm happy with fmt(1)'''
|
||||
}
|
||||
|
||||
#@pluginfunction('dummy_parser', 'dummy_parser desc', ptypes_PARSE)
|
||||
#def parse_skynet(**args):
|
||||
# if 'dummy_parser' in args['data'].lower():
|
||||
# logger('plugin', 'dummy_parser triggered')
|
||||
# return {
|
||||
# 'msg': 'dummy_parser triggered'
|
||||
# }
|
||||
|
||||
def data_parse_other(msg_obj):
|
||||
data = msg_obj['body']
|
||||
reply_user = msg_obj['mucnick']
|
||||
|
||||
Reference in New Issue
Block a user