ijgate

ijgate is to be a gateway from a jabber conference room to a channel on IRC and is being written by DG using his IRC_Engine component of his IRC client for the IRC half.

(Note from a random visitor: could this work be merged with bitlbee, which exists for a similar purpose and already has support for several protocols?)

All clients in the jabber conference room will be expressed as irc clients that the gateway will manage. In the inverse, all irc clients will be expressed as jabber clients by the gateway. I will do my best to make sure the link is loss-less with regards to embedded attributes and do my best to give the illusion that everyone appears to be in a single "channel".

3.5 hours into it on day one, I have the irc agent part done, but with no implemention for how to create gateway services for jabber, I'm still reading the specs.. And to think some people have stated that jabber is a "simple" protocol.. hahaha Go read the specs!

The job functions of the IRC Agent will be:

  • to sit as an operator in #tcl on irc.
  • when channel attributes and commands are given on the jabber side, the Agent shall execute those commands on the irc side if it appropriate for the context of the command.
  • same for the inverse. When channel commands are given by other opers, the Agent shall execute the same on the jabber side. Ex. When someone who is a gateway'd jabber client is /kick'd from the IRC chat room, they shall be /kick'd from the jabber conference room as well.
  • For each client in the channel that is not being gateway'd from jabber, the Agent shall create their mirror in the jabber conference room.
  • To act as a multiplexor in case we run out of allowed concurrent connections to freenode.

NEW! 6:38 PM 11/20/2004

JEP71 [L1 ] support is working great!

 /tcl say "this is mIrc \0034red"
 <body>
    this is mIrc red
 </body>
 <html xmlns='http://jabber.org/protocol/xhtml-im'>
    <body xmlns='http://www.w3.org/1999/xhtml'>
        this is mIrc <span style="color: rgb(255,0,0)">red</span>
    </body>
 </html>

 /tcl say "this is an ANSI color of \033\1331\;31mIntense Red"
 <body>
    this is an ANSI color of Intense Red
 </body>
 <html xmlns='http://jabber.org/protocol/xhtml-im'>
    <body xmlns='http://www.w3.org/1999/xhtml'>
        this is an ANSI color of <span style="color: rgb(255,0,0)">Intense Red</span>
    </body>
 </html>

 /tcl say "this is a CTCP/2 \006CC\006color"
 <body>
    this is a CTCP/2 color
 </body>
 <html xmlns='http://jabber.org/protocol/xhtml-im'>
    <body xmlns='http://www.w3.org/1999/xhtml'>
        this is a CTCP/2 <span style="color: rgb(255,0,0)">color</span>
    </body>
 </html>

 /tcl say "test \002bold \037underline \026reverse"
 <body>
    test bold underline reverse
 </body>
 <html xmlns='http://jabber.org/protocol/xhtml-im'>
    <body xmlns='http://www.w3.org/1999/xhtml'>
        test <span style="font-weight: bold">bold </span><span style="font-weight: bold; text-decoration: underline">underline </span><span style="font-weight: bold; color: expression(this.parentNode.currentStyle.backgroundColor) !important; background-color: expression(this.parentNode.currentStyle.color) !important; text-decoration: underline">reverse</span>
    </body>
 </html>

The style stuff for doing reverse is rather evil by its use of DHTML, but I didn't know how else to do it. Here's a shot of what you see from mIRC to what I translate it into for xhtml displayed in firefox: http://tomasoft.sourceforge.net/irc2xhtml1.jpg

[L2 ] [L3 ] [L4 ]

I just added an XHTML-IM to IRC converter to match the above for when sending from jabber to IRC. It's output looks like this (non printable chars replaced with \xxx for display here):

 (ijgate) 7 % t translateXhtml {
 <html xmlns='http://jabber.org/protocol/xhtml-im'>
    <body xmlns='http://www.w3.org/1999/xhtml'>
      En <span style='color: #FF9797; '><span style='font-size: small; '>un lugar</span></span>
      <span style='font-size: small; '><strong>Mancha</strong>, de cuyo <em>nombre</em> no 
      <span style='background: #0B4462; '><span style='color: #F0C9A3; '>quiero</span></span>
      <span style='text-decoration: underline;'>acordarme</span>
      <span style='color: #BAE258; '><span style='background: #036FA6; '>no ha mucho iempo
      </span></span>
      <strong><em><span style='text-decoration: underline;'>hidalgo</span></em></strong>
      </span><span style='font-size: xx-small; '>los</span><span style='font-size: small; '>
       de </span><span style='font-size: xx-large; '>lanza</span>
      <span style='font-size: small; '><span style='background: #C9E29D; '>astillero</span></span>
    </body>
 </html>}
 -->En \006C#FF9797\006\006F-1\006un lugar\006C.\006\006B+\006\006F-1\006Mancha\006B-\006, de cuyo 
 \006I+\006nombre\006I-\006 no \006C#F0C9A3\006\006C-#0B4462\006quiero
 \006C-.\006acordarme\006C#BAE258\006\006C-#036FA6\006no ha mucho tiempo\006C.\006
 \006B+\006\006I+\006hidalgo\006F-3\006los\006F-1\006 de \006F+3\006lanza\006C-#C9E29D\006
 \006F-1\006astillero<--

I have it running for strict CTCP/2 embedded codes, but am currently working on mIRC and BitchX compromises at the moment.


Category Internet