diff --git a/others/dictclient.py b/others/dictclient.py index 63b87860e..30575ca58 100644 --- a/others/dictclient.py +++ b/others/dictclient.py @@ -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 diff --git a/plugins/Dict.py b/plugins/Dict.py index 98979bcd1..47ce8d1ac 100644 --- a/plugins/Dict.py +++ b/plugins/Dict.py @@ -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)