/lab-chat

IRC bot for spying on specified irc.freenode.net chat for juicy links

Primary LanguageJavaScript

Lab-chat

This software monitors the #l4rp irc channel on freenode for shared hyperlinks.

It was born out of a L4RP Hackday.

The intention of the software is to display these links somewhere on the L4RP website.

The possible hyperlinks are:

  • generic for any old website.
  • code for code shared as a gist or on pastebin (gists or pastebin).
  • image for a hyperlink linking directly to an image.

How it works

Links are collected in server memory and a client page requests all of them when its script first starts.

Links which are collected are pushed as an interesting json object to a listening client WebSocket. This client then draws them on the page.

Modules

app.js

Starts the application. Handles link caching. Handles HTTP fileserving and micro routing.

chatbot.js

Does the snooping for links.

Event subscription: foundLink. Passes a link url.

expander.js

Actually creates the shared link. Uses JDOM for scraping out code for Code type links.

Event subscription: expandedLink. Passes an expanded link. See link type schema.md

discover.js

Figures out what type of link it is.

Contributors

Aaron Acerboni & Adam Yeats

Also other hackers at the L4RP Hackday