Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.
/ StatServ Public archive

Client statistics gathering service originally for the AustNet IRC network

License

Notifications You must be signed in to change notification settings

alieninternet/StatServ

Repository files navigation

This is a little program which connects to austhex servers via the P13
server protocol and counts CTCP version requests.

It isn't as dumb as it looks - it will avoid checking users on servers
during bursts (it only calls CTCP version if a user is signing on for real,
not a during-burst 'signon' which avoids heavy flooding during netsplits).

Users are able to set ignores on themselves - this allows them to avoid
being a part of the statistics if they so wish. Versions are stored with
counts rather than just a list of what has been received to avoid large
wasteful data files. Data is saved to the hard drive upon checkpoint times.

Users spoofing CTCP Versions has been avoided as much as possible by adding
users to a check-list when requesting. Version data is only accepted if it
is received within the reply time-out time. This should avoid as many
spoofed version requests as possible.

Testing modes are available too, with a small (cheap) clone-bot generator
built into the burst, capable of overloading servers very very easily as it
does not use up file descriptors! Very handy for testing servers.

Several files are used by this program. 'motd.txt' and 'help.txt' are simply
text files and are sent to clients who request them (motd via /MOTD, and
help via /msg Statistics help). 

'ignore.txt' is a list of nicknames (one per line) of nicknames to NOT send 
CTCP Version requests to. This program will overwrite this file during 
checkpoints if users are allowed to ignore themselves with the 
/msg Statistics ignore command, otherwise it will simply just load it upon 
startup.

'versions.txt' is the list of versions, in a very simple format:
<count> <version>
eg.
20 foo
1 bah
Would mean 20 'foo' replies have been received, and 1 'bah'. Version replies
are case sensitive, and this file may contain many duplicates due to many
clients adding additional information to version replies. This file is not
intended to be a definative source for statistics, but rather a starting
point for statistical analysis as it will have to be fed into something which
will grok it appropriately.

Undocumented in the help.txt file, by the way, is the 'stats' command. This
can be made available by commenting the 'STATS_PASSPHRASE' define in the
config.h file, however if the passphrase is available it needs to be
appended following the stats command when you privmsg the stats user. 

This is by no-means an elegant implementation, but it works efficiently
enough.

 - Simon Butcher
   <[email protected]>
   <[email protected]>

About

Client statistics gathering service originally for the AustNet IRC network

Topics

Resources

License

Stars

Watchers

Forks