<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 10, 2012, at 6:24 PM, Art Scheel &lt;<a href="mailto:ascheel@gmail.com">ascheel@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">Now, is stackoverflow overriding that method or was it perhaps written prior to the implementation of the irc.py portion I linked to?</span><br style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "></blockquote><div><br></div><div>The StackOverflow answer is implementing a new method, on IRC<b>Client</b>. &nbsp;The implementation in irc.py that you're linking to is from the IRC <b>server</b>&nbsp;protocol implementation. &nbsp;They're not really related, except insofar as they are talking about the same protocol command - but they are opposite sides of the connection for that command.<br><br></div><div>For what it's worth, the StackOverflow answer <i>really</i>&nbsp;ought to be linking to a Twisted ticket for a method like .names() on IRCClient within Twisted itself. &nbsp;This is important functionality, and we're missing it; the right thing to do is always to file a bug, not to implement it without tests in a forum post.</div><div><br></div><div>Such a bug may already exist - if you wouldn't mind, would you search for it, and if you can't find it, file a new one?</div><div><br></div><blockquote type="cite"><span style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">My code is here.&nbsp; I am attempting to parse the names list at line 110</span><br style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><a href="http://bpaste.net/show/Fll7at9Z3b8nD6GDNN14/" style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">http://bpaste.net/show/Fll7at9Z3b8nD6GDNN14/</a><br style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">I don't know if I should be using twisted/words/protocols/irc.py or twisted/words/im/ircsupport.py.</span><br style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "></blockquote><div><br></div><div>twisted.words.im.* implements a multi-protocol chat abstraction. &nbsp;I don't think that your bot necessarily needs to be IRC specific, I think it would be a good idea for you to try to use twisted.words.im; you will probably discover a sad lack of documentation, but you can feel free to ask questions and file doc bugs. &nbsp;Or perhaps even contribute doc patches, once you've figured out what's going on!</div><div><br></div><div>At the very least, twisted.words.im.ircsupport already implements irc_RPL_NAMREPLY to convert this message into a series of memberJoined/memberLeft API calls, so you don't have to do something like that yourself. &nbsp;See here: &lt;<a href="http://twistedmatrix.com/trac/browser/trunk/twisted/words/im/ircsupport.py#L160">http://twistedmatrix.com/trac/browser/trunk/twisted/words/im/ircsupport.py#L160</a>&gt;.</div><br><blockquote type="cite"><span style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">Can someone point me in the right direction as to what I need to do to grab the list of names at that particular spot using Twisted's in methods?&nbsp; If it cannot be done with the Twisted's methods, am I to understand that's what the StackOverflow post was doing?</span><br style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "></blockquote><div><br></div><div>Yes, that's exactly what the SO post was doing. &nbsp;It is using Twisted's methods though, so clearly it can be done with them, it's just a small matter of work :).</div><br><blockquote type="cite"><span style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">Yes, I know the code is ugly.&nbsp; I can clean it up after I understand what I'm doing more fully.</span><br style="font-family: 'courier new', monospace; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "></blockquote></div><br><div>Ugliness is forgivable, but in the future, you should try to post much more <i>minimal</i>&nbsp;programs. &nbsp;It's a lot easier to help if one can read the whole thing. &nbsp;See &lt;<a href="http://sscce.org">http://sscce.org</a>&gt; for details.</div><div><br></div><div>-glyph</div><div><br></div></body></html>