Merge branch 'develop' into refresh
Conflicts: plugins/factoids.py plugins/geoip.py
This commit is contained in:
commit
014c4bdc4b
26 changed files with 72 additions and 63 deletions
|
@ -108,7 +108,7 @@ def info(inp, notice=None, db=None):
|
|||
|
||||
@hook.regex(r'^\? ?(.+)')
|
||||
def factoid(inp, message=None, db=None, bot=None, action=None, conn=None, input=None):
|
||||
"?<word> -- Shows what data is associated with <word>."
|
||||
"""?<word> -- Shows what data is associated with <word>."""
|
||||
|
||||
db_init(db)
|
||||
|
||||
|
@ -128,8 +128,8 @@ def factoid(inp, message=None, db=None, bot=None, action=None, conn=None, input=
|
|||
if data.startswith("<py>"):
|
||||
code = data[4:].strip()
|
||||
variables = 'input="""{}"""; nick="{}"; chan="{}"; bot_nick="{}";'.format(arguments.replace('"', '\\"'),
|
||||
input.nick, input.chan,
|
||||
input.conn.nick)
|
||||
input.nick, input.chan,
|
||||
input.conn.nick)
|
||||
result = pyexec.eval_py(variables + code)
|
||||
else:
|
||||
result = data
|
||||
|
|
Reference in a new issue