Bug 106204 - sheriffbot cannot return multiline responses to commands
Summary: sheriffbot cannot return multiline responses to commands
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-06 18:46 PST by Alan Cutter
Modified: 2013-01-07 11:41 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Cutter 2013-01-06 18:46:58 PST
At the moment the IRCBot class only allows for one reply per command.
It would be nice to have the option for multiline responses to let commands that need to respond with lots of information be able to format it for human readability.
Comment 1 Alan Cutter 2013-01-06 19:12:35 PST
Correction:
sheriffbot can post multiple responses via tool.irc().post(message).

The difference between:

return [
    "%s: Message line 1" + nick,
    "%s: Message line 2" + nick,
]

and: 

tool.irc().post("%s: Message line 1" + nick)
tool.irc().post("%s: Message line 2" + nick)
return

is probably not worth the additional interface complexity for IRCBot to support the former.
Comment 2 Adam Barth 2013-01-07 11:41:15 PST
Yeah, being able to return a string is just an shortcut for simple commands.