Skip to content

Valodim/irclogd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

irclogd

This is a simple irc gateway server, which can be used to listen for data from various sources. It is written in python using the Twisted framework, and thus depends on python-twisted and python-twisted-words.

There is no buffering or state in the server - data is only immediately forwarded. To add buffering capabilities, connect to the irc server using a bouncer. I recommend znc.

Supported sources at this point:

  • udp
  • fifo

Usage

Start with python -m irclogd.irclogd for debug mode, or twistd -y irclogd.tac to run as a daemon. Connect to running server with any irc client. By default, the server will listen only on the localhost interface on port 6700. To change the listening port or the interface, edit irclogd.py (respectively irclogd.tac).

Join any channel with /join &channel or /join #channel. You can create virtual users by inviting them to any (existing) channel with /invite username &channel. You can remove them with /kick. Virtual users can be in multiple channels, and will be automatically destroyed when they aren't in any.

Each virtual user can have an input source, and will report the input from this source to all channels it is in.

The daemon keeps no state, once you disconnect all channels and virtual users are gone. To get a persistent configuration, the client's (or bouncer's) perform feature should be used to consecutively JOIN, INVITE and PRIVMSG.

Virtual User Commands

Virtual users support a number of commands. They can be either sent in any channel the user is in by directing it to them by name with a colon suffix, or directly using a privmsg.

Available commands are:

  • input: set an input source to listen on (see below)
  • reset: stop listening and reset the input
  • die: stops listening on input and removes the user from all channels

Input Sources

At this point, there are two input sources: udp, and fifo.

To create an udp input source, send an input command to a virtual user: input udp port [addr,..] If an optional comma-seperate list of hosts is given, only messages from these hosts will be accepted.

To create a fifo input source, send an input command to a virtual user: input fifo /path/to/fifo The fifo must already exist, and be readable by the user.

Status

At this point, irclogd is a small hack I wanted for personal use. I'm in the process of testing it, but it is by no means stable. Use at your own risk!

About

Simple IRC logging gateway daemon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages