mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Multiple bugs that couldn't be tested while the dict.org server was down have now been tested, found, and eradicated.
This commit is contained in:
parent
b40a7e7757
commit
02b2eddd45
@ -23,12 +23,7 @@ version = '1.0'
|
||||
def dequote(s):
|
||||
"""Will remove single or double quotes from the start and end of a string
|
||||
and return the result."""
|
||||
quotechars = "'\""
|
||||
while s and s[0] in quotechars:
|
||||
s = s[1:]
|
||||
while str and str[-1] in quotechars:
|
||||
s = s[0:-1]
|
||||
return s
|
||||
return s.strip('\'"')
|
||||
|
||||
def enquote(s):
|
||||
"""This function will put a string in double quotes, properly
|
||||
|
@ -85,7 +85,7 @@ class Dict(callbacks.Privmsg, plugins.Configurable):
|
||||
"""
|
||||
try:
|
||||
conn = dictclient.Connection(self.configurables.get('server'))
|
||||
dbs = conf.getdbdescs()
|
||||
dbs = conn.getdbdescs().keys()
|
||||
dbs.sort()
|
||||
irc.reply(msg, utils.commaAndify(dbs))
|
||||
except socket.timeout:
|
||||
@ -98,7 +98,7 @@ class Dict(callbacks.Privmsg, plugins.Configurable):
|
||||
"""
|
||||
try:
|
||||
conn = dictclient.Connection(self.configurables.get('server'))
|
||||
dbs = conf.getdbdescs()
|
||||
dbs = conn.getdbdescs().keys()
|
||||
irc.reply(msg, random.choice(dbs))
|
||||
except socket.timeout:
|
||||
irc.error(msg, replyTimeout)
|
||||
|
Loading…
Reference in New Issue
Block a user