Very Secure

Progress Report On TheFleet

Yesterday, the first ships set sail accross the sea of IRC Networks to four small islands: UniBG, ShadowWorld, QuickFox, and OptiLan. The channels on these networks were empty of human activity. Most of the rows in my log db contained botspam such as

Now playing on Radio Mega-Hit: >50 Cent - Candy Shop (Feat. Olivia) (Pro50 Cent

I also attempted to dock 23 bots at DalNet, a larger network. But after the 4th or 5th bot connected, they all were kicked off the network w/ the message:

The maximum allowed connections from your host has been exceeded.

So for the bigger networks I will either have to rotate through their channels or obtain a few more ip addresses.


There are two tasks I'm working on. The first is the channel-snagger, which keeps an updated list of all channels for all networks on a best effort basis. The second is fleetbot, the ircbot extension that keeps a set of bots logging the channels in that list, also on a best effort basis. Ideally channel-snagger puts the channels into a queue that fleetbot will draw from to assign channels to bots.

I. channel-snagger.lisp

Below is a list of (networkname, num_channels) for the 200 networks I found with at least one channel.

(freenode 12975)
(Frozyn 7182)
(EFnet 5070)
(DALnet 2712)
(OFTC 1874)
(synIRC 873)
(euIRC 719)
(IRCHighWay 579)
(FreeUniBG 465)
(P2P-NET 354)
(EuropNet 351)
(Mibbit 341)
(MindForge 307)
( 296)
(GIMPnet 286)
(SwiftIRC 278)
(SlashNET 272)
(GeekShed 269)
(PTnet 266)
(IndoGaul 238)
(AllNetwork 238)
(Aitvaras 202)
(2600net 185)
(DarkMyst 185)
(GeekNode 174)
(AnthroChat 153)
(Recycled-IRC 146)
(MagNET 122)
(UniBG 117)
(EnterTheGame 109)
(Tweakers 103)
(IdleChat 100)
( 99)
(Evolu.NET 99)
(Chattersworld 98)
(ForestNet 90)
(German-Elite 87)
(Otaku-IRC 86)
(VirtuaLife 84)
( 84)
(AnonNet 83)
(Chattersweb 78)
( 75)
(Gotham 74)
(DSNnet 72)
(OptiLan 66)
(Zoite 62)
(DejaToons 60)
(Sinsira 59)
(MagicStar 55)
(Apropo 54)
(ForeverChat 53)
(TwistedNet 52)
(ShadowFire 52)
(IRCstorm 52)
(Immortal-Anime 52)
(DarkVoltage 52)
(GigaIRC 50)
(Chat-Solutions 47)
(Buddy.IM 46)
(SiberChat.Org 45)
(IrcWorld 45)
(Abandoned-IRC 44)
(Subluminal 42)
(Hub4Ever.Org 41)
(Xerologic 38)
(TripSit 38)
(BrasIRC 37)
(ScoutLink 36)
(DigitalIRC 36)
(BSDUnix 36)
(Anynet 35)
(LunarIRC 34)
(Global-Irc.Org 34)
(ForumCerdas 33)
(Netrusk 32)
(WNet 31)
( 31)
(GreekIRC 31)
(P2PChat 30)
(BrasPort 30)
(LUGS 29)
(IRCsource 28)
(MaddShark 28)
(ChatIRC 28)
(LichtSnel 27)
(ECNet 27)
( 26)
(Andromeda.Fr 26)
(NFNet 25)
(AustNode 25)
(PSIGenix 24)
(PowaNet 24)
(PC-Logix 24)
(SoylentNews 23)
( 23)
(Chatters 22)
(Blafasel 22)
(QuickFox 21)
(AlphaIRC 21)
(ShadowWorld.Net 20)
(ZwergenIRC 20)
(SA-IRC 20)
(Everchat 20)
(CakeForceUK 20)
(RisposteInformatiche 19)
( 19)
( 19)
(IRC2 19)
(ChillNet 19)
( 19)
(tm-irc 18)
(MeFalcon 18)
(KernelPanic 18)
(Omninet 17)
(FDFnet 17)
( 17)
(Absoluty-IRC 17)
(FreshChat 16)
(Cognet 15)
( 15)
(IRCFreakz 15)
( 15)
(ChatLounge 15)
(AfterX 15)
(TransAdvice 14)
(PurpleSurge 14)
(Italian-Amici 14)
(GreekChat 14)
(EntropyNet 14)
(IRC-Mania 13)
(Griefplay 13)
(Futuragora 12)
(Crippler 12)
( 12)
(Blitzed 12)
(UplinkIRC 11)
(SomeNet 11)
(PhatNET 11)
(Teepi 10)
(Striked 10)
(SceneCritique 10)
(RelaxedIRC 10)
( 10)
(420-Hightimes 10)
( 9)
(StarLink-IRC 8)
(RelicNet 8)
(ExodusIRC 8)
(Pilgerer 7)
( 7)
(FyreChat 7)
(chatnets 7)
(BoredIRC 7)
( 6)
( 6)
(KewlFun 6)
(D4RCnet 6)
( 5)
(GTAXLnet 5)
(DynastyNet 5)
(byxnet 5)
(BSDnet 5)
(AsylumNet 5)
(UKChatBox 4)
(RootWorlD 4)
( 4)
(Genscripts 4)
(eXolia 4)
(Eagles-myIRC 4)
( 4)
(Ceviz 3)
(XeroMem 3)
(OSPnet 3)
( 3)
(ircHax0r 3)
(Fewona 3)
( 3)
(AureAWorld 3)
(DarkerNet 2)
(UnderMind 2)
(Snyde 2)
(SceneP2P 2)
( 2)
(MauriceRadioLibre 2)
(dreams-fr 2)
(DALNetwork 2)
(zeolia 1)
(kyunet 1)
(EsperNet 1)
(Canternet 1)
(AtomicEdge 1)

And here is the script I used to acquire the channels for these networks.1
For every network I:

  1. connect with an unauthed nick
  2. wait to receive the network's RPL_WELCOME-MESSAGE
  3. request a list of all the channels with /list
  4. wait for the RPL_LISTEND-MESSAGE, timing out after 35 seconds

I ran into a few errors related to connecting: 'BADHOST, 'USOCKET-TIMEOUT, and 'USOCKET-CONNECTION-REFUSED. I also saw an error from issuing the /list command

"You must be connected for at least 60 seconds before you can use this command."

I may want to try grabbing channels from different linknames2 to see if I can connect to the networks that threw USOCKET errors. I also need to do another scan for networks where I wait 60 seconds before issuing /list.

There are some big networks3 missing: IRCnet, Undernet, QuakeNet, Rizon, BSDUnix, Chatzona, IRC-HIspano to name a few. There are also discrepancies from the data I've collected and what's listed on lists EFnet having 9000+ channels but my EFnet responded to my /list command with only ~5000. It is possible this discrepancy is due to a large variance of number of channels on a day to day basis.

II. fleetbot.lisp

Before trying to connect the fleet of ships to a network I gave a look through the lisp cook book page on threads. The one tricky bit I did not see in that guide was how to do proper error handling. I'm surprised that a guide on this was excluded. From my experience dealing with threads often means dealing with file i/o or socket exceptions.

I learned that a thread cannot signal an error to its parent thread, so any error handling must occur inside the function that is passed to make-thread.4

;; handler-case is the basic "try-catch" tool of common lisp.
;; it takes an expression and then a list of error-clauses.
;; if an error occurs in the first expression, handler-case searches the error-clauses for a matching error and runs the corresponding code.
;; more details can be found here:

;; incorrectly handles error because handler case is defined outside of the child thread that throws the error
    (lambda () (error 'simple-error)))
  (simple-error () t))

;; catches error correctly since all error handling is done inside the child thread
  (lambda ()
      (error 'simple-error)
      (simple-error () t))))

The biggest TODO item is to figure out a way around the maximum connections per host limit. Networks usually drop me after I connect more than 3 bots. So with a 120-channel-per-nick limit that means I can only log 360 channels per ip. The connections-per-host is likely on a per server bases rather than per network, so I could conceivably connect to 10 different links which would bring me to 3600 channels per ip. This is an ugly solution since when an individual server goes down I will miss logs from channels assigned to that server.

Some other items on the TODO list:

  • obtain the max-channels-per-nick for every network
  • learn about file descriptors + sockets. Look into the Select (2) syscall error
  • figure out the Socket error in "connect": EINTR (Interrupted system call) [Condition of type SB-BSD-SOCKETS:INTERRUPTED-ERROR]
  • log when a ship joins or leaves a channel

Lastly, a note on my methodology. After speaking with trinque and diana_coman and doing a bit of reflection I realized I have a common Common Lisp problem. My reasons for using the language are essentially that I think it's in fashion.

CL+emacs+slime lubes up a workflow that is painful with languages like c.5 Instead of using this to my advantage once my program is well thought out, i've been whackin' away: testing half-baked-functions as they're written, tweaking knobs randomly until something appears to work, patting myself on the pack for functions that do work, etc. etc. Going forward I will focus on scoping out the problem and fixing my own misconceptions before putting anything into the repl.

  1. The function populate-networks-with-channels takes a plist of networks from the channel-snagger and attempts to insert into that plist a list of channels with key :channels. If no channels are found, the value of :channels becomes a symbol representing an error. []
  2. A linkname is the hostname of an individual server on a network. []
  3. Big in terms of reported number of users and channels, but as I saw the reports on may be wildly inaccurate. []
  4. This makes sense. The main thread continues executing and leaves the "try-catch" block when the subthread gets spawned. So if the error were to be caught in the main thread, then it would have to schedule the catch clause at some random point further in its execution. []
  5. The process of testing a function you wrote by sending it from the file you're working on into a repl. []

2 Responses to “Progress Report On TheFleet”

  1. [...] whaack 6326 273B 61A7 00AF 4CD9 5A7B 8C6C AB19 24A6 4DEC « Progress Report On TheFleet [...]

  2. [...] 3. Progress Report on TheFleet [...]

Leave a Reply