mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Fixed the configure() definition. Fixed Debian.file so that something like
"@debian file ntpq" actually works without the user needing meta-characters.
This commit is contained in:
parent
9423cbc97c
commit
17174d134d
@ -57,7 +57,7 @@ import webutils
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart):
|
def configure(advanced):
|
||||||
# This will be called by setup.py to configure this module. onStart and
|
# This will be called by setup.py to configure this module. onStart and
|
||||||
# afterConnect are both lists. Append to onStart the commands you would
|
# afterConnect are both lists. Append to onStart the commands you would
|
||||||
# like to be run when the bot is started; append to afterConnect the
|
# like to be run when the bot is started; append to afterConnect the
|
||||||
@ -133,6 +133,8 @@ class Debian(callbacks.Privmsg,
|
|||||||
if rest:
|
if rest:
|
||||||
glob = rest.pop()
|
glob = rest.pop()
|
||||||
regexp = fnmatch.translate(glob.lstrip('/'))
|
regexp = fnmatch.translate(glob.lstrip('/'))
|
||||||
|
regexp = regexp.rstrip('$')
|
||||||
|
regexp += ".* "
|
||||||
try:
|
try:
|
||||||
re_obj = re.compile(regexp, re.I)
|
re_obj = re.compile(regexp, re.I)
|
||||||
except re.error, e:
|
except re.error, e:
|
||||||
|
Loading…
Reference in New Issue
Block a user