[Toolserver-l] RC gateway

Merlijn van Deen valhallasw at arctus.nl
Sun Jul 29 12:35:56 UTC 2007

Hello all,

I have created a recent changes gateway that reads from IRC and outputs in
JSON format. Be aware that the variable None needs to be defined for some
packets. This behaviour may change later (by removing parameters that have
None as value)

It runs as a simple TCP server on port 8267 (listening only to localhost).

How to use:
* connect to localhost:8267
* join channels using 'J <wiki>' (alternatives: jAa)
       accepted formats: #en.wikipedia, en.wikipedia, en.wikipedia.org
       eg: J #en.wikipedia
           J pl.wikipedia
           J nl.wikipedia.org
* part channels using 'P <wiki>' (alternatives: pDdRr)
       eg: P en.wikipedia
           P pl.wikipedia.org
           P #nl.wikipedia

Every wiki has three possible parsed formats; page changed, new page,
special (i.e. new user, page move, etc). Some wikis have rcid's included,
others don't.
If a message cannot be parsed (which generally happens with too long page
titles, and unicode page titles like on ja.wikipedia), you will get a raw
data message. No encoding conversion is done; everything comes directly
from the irc bytestring.

{"comment": "/* Etymology */ modified the pov", "rcid": None, "title":
"Kalarippayattu", "diffsize": "-167", "flags": "", "user": "Bharatveer",
"diff": "147842174", "channel": "#en.wikipedia", "oldid": "147835786"}

{"comment": "deleted "[[\x0302Kline\"s\x0310]]": a7 no assertion of
notability content was: \"{{dated prod|concern = {{{concern|Local store,
unlikely to be notable.}}}|month = July|day = 29|year = 2007|time =
10:23|timestamp = 20070729102340}}...\"", "flags": "delete", "user":
"NawlinWiki", "channel": "#en.wikipedia", "title": "Special:Log/delete"}

{"comment": "new stub cat as per wss/p", "title": "Category:Wide receiver,
1950s birth stubs", "diffsize": "+181", "flags": "N", "user": "Waacstats",
"channel": "#en.wikipedia"}

and unparseable messages:
\x035*\x03 \x0303Dream100\x03 \x035*\x03 (+41) \x0310", "channel":

Comments, of course, are welcome. The source is available at


More information about the Toolserver-l mailing list