Export to GitHub

djangobot - issue #7

enhance "who" command


Posted on Feb 9, 2008 by Grumpy Camel

The "who" command without arguments could reply with information about all recently active users.

It could also query multiple nicknames with a single command.

Additionally, the bot usage syntax could be printed if an unknown command is given.

The attached patch adds this functionality. Example:

/msg DjangoBot who DjangoBot: Active users during the last 60 seconds: DjangoBot: akaihola: Antti Kaihola, Hometown, URL DjangoBot: Brian Rosner, Hometown, URL

/msg DjangoBot who ubernostrum empty DjangoBot: James Bennett, Hometown, URL DjangoBot: Michael Trier, Hometown, URL

/msg DjangoBot someothercommand DjangoBot Unknown command 'someothercommand'. Available commands: who [<nickname> ...]

Attachments

Comment #1

Posted on Feb 9, 2008 by Grumpy Camel

Oops, had my test channel and bot name in the attachment. Fixed here.

Attachments

Comment #2

Posted on Feb 9, 2008 by Grumpy Bird

Fixed in r18. Refactored command handling and improved the who command. This also adds a very basic help command. who now accepts multiple nicknames. Thanks, akaihola for the good ideas.

The default case of who won't do anything now. Please reopen a ticket with a new patch for the empty case of who. I like the idea, but this refactor job broke the patch. Thanks for your contribution!

Status: Fixed

Labels:
Type-Defect Priority-Medium