Bug 36235

Summary: Add a way for the bots to send messages to IRC
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch for landing none

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.