Bug 36235 - Add a way for the bots to send messages to IRC
Summary: Add a way for the bots to send messages to IRC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-17 12:48 PDT by Adam Barth
Modified: 2010-03-17 13:52 PDT (History)
1 user (show)

See Also:


Attachments
Patch (10.53 KB, patch)
2010-03-17 12:51 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch (22.33 KB, patch)
2010-03-17 13:43 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch (22.24 KB, patch)
2010-03-17 13:48 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch for landing (22.23 KB, patch)
2010-03-17 13:50 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2010-03-17 12:48:44 PDT
Add a way for the bots to send messages to IRC
Comment 1 Adam Barth 2010-03-17 12:51:58 PDT
Created attachment 50938 [details]
Patch
Comment 2 Eric Seidel (no email) 2010-03-17 13:03:34 PDT
Comment on attachment 50938 [details]
Patch

OK.  So I think this would need a few more comments.

At least to separate out the different interfaces that IRCBot is implementing.

IRCBot shoudl consider taking channel and nickname, etc. as arguments.  They obviously could default to the current ones.  Unless the model woudl be that you would subclass it to change the channel?

I think this all makes sense.

It also needs another comment in autoinstalled/__init__.py to indicate why both imports are needed.
Comment 3 Eric Seidel (no email) 2010-03-17 13:04:17 PDT
Comment on attachment 50938 [details]
Patch

I think it makes sense to test ThreadedMessageQueue, even if we don't test the threaded nature of it.  just to make sure that stop() does what you expect, etc.
Comment 4 Eric Seidel (no email) 2010-03-17 13:06:05 PDT
Comment on attachment 50938 [details]
Patch

You might add a comment to "setDeamon()"

We could use a mock "connection" object for testing, but it may not be worth it.  Tests for the queue make sense.  The rest is probably OK as is.
Comment 5 Eric Seidel (no email) 2010-03-17 13:07:37 PDT
Comment on attachment 50938 [details]
Patch

Actually, it woudl be nice to have a full-system test.

whereby which we mock out the connection, and call "post" and then "disconnect" and make sure that it posts before disconnect.

That would be a minimal test of the API and is probably worth the trouble.
Comment 6 Adam Barth 2010-03-17 13:43:42 PDT
Created attachment 50951 [details]
Patch
Comment 7 Eric Seidel (no email) 2010-03-17 13:47:29 PDT
Comment on attachment 50951 [details]
Patch

OK.  I'm sold.
Comment 8 Adam Barth 2010-03-17 13:48:58 PDT
Created attachment 50953 [details]
Patch
Comment 9 Adam Barth 2010-03-17 13:50:49 PDT
Created attachment 50954 [details]
Patch for landing
Comment 10 Adam Barth 2010-03-17 13:52:27 PDT
Comment on attachment 50954 [details]
Patch for landing

Clearing flags on attachment: 50954

Committed r56125: <http://trac.webkit.org/changeset/56125>
Comment 11 Adam Barth 2010-03-17 13:52:33 PDT
All reviewed patches have been landed.  Closing bug.