On Sun, Aug 25, 2002 at 04:31:24PM -0700, Manoj Kasichainula wrote: > I've started work on a Python module for irssi, more for educational > purposes than anything else. So far, I can load python scripts from > ~/.irssi/python/ which have access to the irssi SERVER_REC. I'm only > working on it in my spare spare time, so don't expect it for a while. :)
nice :) > I don't have irssi-signal handling working quite yet. The main thing in > the way is that I need a good way to recognize the type of each > structure pointer (server, window, reconnect, etc.) and map it to the > python wrapper object I've written for it. I haven't quite parsed out > yet how the Perl module does this yet; what's the easiest way to go > here? Perl uses docs/signals.txt and generates perl-signals-list.h from it, using get-signals.pl. You'd probably do something similiar to that. > What kind of relationships (inheritance, delegation, etc.) should I try > to set up between the various irssi objects? For example, I haven't > quite figured out whether SERVERs should be considered subclasses of > SERVER_CONNECTs, vice versa, some form of containment/delegation, or > none of the above. Any advice here would be appreciated. They're not inherited too much. Mostly just IRC (and other protocol) objects inherit the core objects. Then CHANNEL_REC and QUERY_REC are inherited from WI_ITEM_REC. I'm not sure if there was others. You should be able to see these by looking if there's #include inside structure definition. SERVER_REC contains connrec which points to SERVER_CONNECT_REC, but I don't think it should be considered inherited or anything.. or .. um.. well.. :) Looks like my perl code just merges the server and server_connect into one perl object. I probably did it just because it was easier that way to use, guess you should too :)
