Some documentation and minor fixes.

This commit is contained in:
Sean B. Palmer
2008-03-10 19:58:28 +00:00
parent 5cad6661c9
commit fb2cd452e9
10 changed files with 34 additions and 4 deletions

View File

@@ -67,7 +67,9 @@ def f_title(self, origin, match, args):
uri = (uri or '').encode('utf-8')
if not uri and hasattr(self, 'last_seen_uri'):
uri = self.last_seen_uri
uri = self.last_seen_uri.get('#swhack')
if not uri:
return phenny.msg(origin.sender, 'I need a URI to give the title of...')
if not ':' in uri:
uri = 'http://' + uri
@@ -140,7 +142,9 @@ f_title.commands = ['title']
def noteuri(phenny, input):
uri = input.group(1).encode('utf-8')
phenny.bot.last_seen_uri = uri
if not hasattr(phenny.bot, 'last_seen_uri'):
phenny.bot.last_seen_uri = {}
phenny.bot.last_seen_uri[input.sender] = uri
noteuri.rule = r'.*(http://[^<> "]+)[,.]?'
noteuri.priority = 'low'