Allow the user to configure the port in the config, and other fixes.

This commit is contained in:
Sean B. Palmer
2008-04-26 15:54:35 +01:00
parent 286d4a8497
commit 986953131d
8 changed files with 22 additions and 7 deletions

View File

@@ -19,6 +19,7 @@ def json(text):
if r_json.match(r_string.sub('', text)):
text = r_string.sub(lambda m: 'u' + m.group(1), text)
return eval(text.strip(' \t\r\n'), env, {})
print text
raise ValueError('Input must be serialised JSON.')
def search(query, n=1):
@@ -55,6 +56,9 @@ def g(phenny, input):
uri = result(query)
if uri:
phenny.reply(uri)
if not hasattr(phenny.bot, 'last_seen_uri'):
phenny.bot.last_seen_uri = {}
phenny.bot.last_seen_uri[input.sender] = uri
else: phenny.reply("No results found for '%s'." % query)
g.commands = ['g']
g.priority = 'high'