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:
James Vega 2004-01-29 23:51:20 +00:00
parent 9423cbc97c
commit 17174d134d

View File

@ -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: