Minor fixes, and important .commands fix, to be private only.

This commit is contained in:
Sean B. Palmer
2008-03-07 21:33:00 +00:00
parent 16ec61f4d6
commit 989ea13d02
5 changed files with 14 additions and 5 deletions

View File

@@ -49,6 +49,8 @@ def formatnumber(n):
def g(phenny, input):
query = input.group(2)
if not query:
return phenny.reply('.g what?')
uri = result(query)
if uri:
phenny.reply(uri)
@@ -58,6 +60,8 @@ g.priority = 'high'
def gc(phenny, input):
query = input.group(2)
if not query:
return phenny.reply('.gc what?')
num = count(query)
phenny.say(query + ': ' + num)
gc.commands = ['gc']
@@ -83,7 +87,7 @@ def gcs(phenny, input):
results = [(term, n) for (n, term) in reversed(sorted(results))]
reply = ', '.join('%s (%s)' % (t, formatnumber(n)) for (t, n) in results)
phenny.say(reply)
gcs.commands = ['gcs']
gcs.commands = ['gcs', 'comp']
if __name__ == '__main__':
print __doc__.strip()