$ pisg 1.0a

Manual · pisg 1.0a

$ man pisg

How to set pisg up, how to upgrade, how to write pisg.cfg, and what every one of its 106 options does. Everything applies to 0.73 as well, except the options marked 1.0a.

01Start here

What is pisg?

pisg is an IRC statistics generator. It takes IRC logfiles and turns them into nice looking stats.

In general, you would do something like this to get it running:

  • Enable logging in an IRC bot, or in your IRC client. The log will be outputted into a file.
  • You set up pisg, you define the channel name, and the path to the logfile you created.
  • You run pisg, pisg runs the log through and create statistics, it then creates an HTML page which you can upload to a webserver.

What are the requirements to run pisg?

  • An IRC client or bot where pisg supports the output logfile.
  • Any operating system which Perl runs on, this includes popular OSes such as Linux, FreeBSD, Windows and Mac. You will have a hard time finding an OS where Perl isn't supported. For Windows this means that you need to download ActivePerl.
  • Optional - a system to host the statistics page 24 hours a day, 7 days a week.
  • Optional - a system to log the channel, 24 hours a day, 7 days a week.

02Start here

Setting up pisg

Most configuration happens through the pisg.cfg file, the file format is made to be easy to read, and easy to extend for further use. It uses an XML-like format, with elements and attributes.

Setting up a channel

An element called Channel is made for defining channels, a quick example of a channel is here:

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 Maintainer = "John"
 OutputFile = "mychan.html"
</channel>
The above will define a Channel called #channel, the logfile pisg will look for is called channel.log and the Format of the logfile will be mIRC. The Maintainer (which will be stated on the output page) is John.

That is basically it! Now, there are a lot more options that you can use for your channels, for this please refer to the reference documentation.

Also be-aware of the fact that pisg uses various images to show the time-related bars. These images are placed in the gfx/ folder and should be placed into the same directory as your outputted HTML file.

Specifying user options

User options are set with a simple XML-like syntax in the form:

<user nick="NICK" option="VALUE">
Remember, the nick is always required. For example to add aliases to a nick, then you could do this:
<user nick="Joe" alias="Joe^*">
The asterisk (*) means that it will match all nicks starting with 'Joe^'. So it will add all Joe^'s to 'Joe' in the stats. Another thing you can do is to add a picture to a user:
<user nick="Ben" pic="ben_holiday.jpg">
If you have a larger picture of the user as well, you can make the picture on the stats page link to it:
<user nick="Ben" pic="ben_holiday.jpg" bigpic="ben-big.jpg">
You can include * or ? to enable filename globbing to randomly choose one from several pictures: (see documentation for the ImageGlobPath option)
<user nick="Ben" pic="ben_*.jpg">
You can also set a user's sex. The sex setting can be "f"emale, "m"ale, or "b"ot:
<user nick="Ben" sex="m">
Also you can add links to URLs and e-mails:
<user nick="Christine" link="http://www.christine.com">
or
<user nick="Chris" link="chris@host.com">
The last thing you can do is to ignore nicks (for example bots):
<user nick="nameofbot" ignore="y">
You don't have to do all this in many lines, you could just as easily do:
<user nick="Joe" alias="Joe^away Joe^work" pic="joe.jpg" link="joe@joe.com" sex="m">
(Here the aliases are a space separated list of nicks, that also works! But * as a wildcard is smarter, although it is slower).

Setting global options

Many times, it will be useful to set up global options, global options are set like this:

<set option="VALUE">
Any global option will be overriden by anything defined within channel elements (see Setting up a channel)

For example, to change the background color of the stats page, you could do:

<set bgcolor="black">
You can set many options in a single set:
<set lang="DE" timeoffset="+1">
The above will set the language on the statistics page to DE (Deutsch, German) and set the time offset to +1. All options available are mentioned in the reference documentation.

Including common settings for various channels

If you have, for example, more than one channel, where the users are the same, or you don't want to maintain more than one user file, you can use the "include" setting in the main config file:

<include="/home/vetinari/pisg/users.cfg">
This will include the file /home/vetinari/pisg/users.cfg in the config at the place where the include statement is set.

Note, that you can NOT include a file from an included file!

Changing the layout of your stats page

The standard layout and colors in the outputted HTML page are made to be somewhat clean and neutral. But you have the chance to change the layout yourself.

There are predefined colour schemes for you to use — set one with the ColorScheme option. pisg 1.0a added four modern ones — modern, midnight, amoled and terminal; modern follows the reader's light/dark setting. The eight classic schemes are unchanged: default (still the default), darkgalaxy, darkred, justgrey, ocean, orange_grey, pisg and softgreen. See them side by side, or build your own.

When changing it, you need a fair knowledge of CSS (Cascading Style Sheets). CSS is what most of the web uses today to define styles and layout on HTML pages. With the pisg distribution, look in the layout directory. In it resides default.css which is the file being included onto the HTML page. Open it in a text editor like vi or notepad. Then change it until you're happy with it. Be aware that you might want to look at the HiCell and HiCell2 options through pisg.cfg for changing the last two colors.

The four modern schemes are generated from one palette by layout/build-themes.py, so to change them all at once — or add a fifth in the same style — edit the palette in that script and run it, rather than editing the CSS files one by one. There is also a theme creator on this site that builds the file for you.

If you have made a stylesheet others could use, open a pull request on GitHub so it can ship with the next version.

If you want to embed the statistics into another page, use the "none" color scheme. Pisg will then omit the HTML header and write only the body part.

Running pisg

When everything is set up in the pisg configuration file (pisg.cfg), then you simply run pisg on the command-line.

Using Linux, BSD or another UNIX-like system:

user@host:~/pisg$ ./pisg

Using Windows:

c:\pisg> perl pisg

The program will run and parse the logfiles you specified in the configuration file.

If you are using Linux, BSD or another UNIX-like system and want run pisg automatically several times a day, then see the crontab file in the scripts/ directory.

For Windows, see the windows-upload-ftp.txt file with the pisg distribution, this file is also placed in the scripts/ directory.

Obtaining help and reporting bugs

If this page did not answer it, ask in #pisg on Undernet (irc.undernet.org) — that is where the people who work on pisg are.

For bugs, patches and feature requests, use the issue tracker on GitHub. Say which pisg version you run and which log format, and paste the error: pisg prints the channel it was working on when it stopped.

The old SourceForge tracker and the pisg-general mailing list are read-only history now. They are still worth searching — fifteen years of answers are in there — at sourceforge.net/projects/pisg.

03Start here

Upgrading to 1.0a

Coming from 0.73 or one of the 0.80 previews? Upgrading is a copy, not a migration: 1.0a reads the same pisg.cfg, the same logs and the same log formats. The one thing you will notice is that your stats page gets longer — seven new sections are on by default. Everything else is opt-in.

Stays the same
  • Your pisg.cfg, every option in it, and the files it includes
  • Log formats and parsers
  • The default colour scheme, and how the classic ones look
  • Requirements: just Perl
Changes
  • Seven new sections, on by default
  • A section menu (ShowNavBar)
  • Exit status 1 when a run fails
  • A page is replaced only once it is complete
Yours to switch on
  • The modern themes (ColorScheme)
  • The landing page for several channels
  • BadUrls, HomeLink
  • The optional tools in scripts/

Before you start

Find out what you are running now, so you know which notes apply:

./pisg --version

Then put a copy of everything that is yours somewhere safe. A new release ships its own pisg.cfg, so unpacking one on top of your install would replace your configuration with the sample:

  • pisg.cfg, and every file it pulls in with <include="..."> — a users.cfg, an alias file;
  • any stylesheet you made or edited in layout/;
  • your changes to lang.txt, if you translated or reworded anything;
  • the crontab line or scheduled task that runs pisg (crontab -l shows it).

Upgrade in four steps

Install the new version next to the old one instead of over it. Then going back is only a matter of pointing your cron job at the old folder again.

upgrade 0.73 → 1.0a
1
git clone https://github.com/PISG/pisg.git ~/pisg-1.0a
Or unpack the archive from the releases page into a new folder.
2
cp ~/pisg/pisg.cfg ~/pisg/users.cfg ~/pisg-1.0a/
Bring your configuration across, with every file it includes. Use the names yours actually has — users.cfg is only an example.
3
cd ~/pisg-1.0a && ./pisg
Run it once by hand and read what it prints. A channel it cannot read is skipped with a reason, and the others are still made.
4
crontab -e
Point the scheduled run at ~/pisg-1.0a/pisg. Keep the old folder until you are happy with the new pages.

On Windows it is the same: a new folder, your pisg.cfg copied into it, and the scheduled task changed to run perl pisg from there.

The new sections are on by default

Your next page will have an overview, a who talks to whom map, closest pairs, social roles, time personalities, who carries the channel, signature words and a section menu. In the classic colour schemes they are drawn in a plain style that fits the old look.

To keep the page exactly as it was, switch them off in pisg.cfg:

<set ShowOverview="0">
<set ShowRelations="0">
<set ShowTimePersonalities="0">
<set ShowConcentration="0">
<set ShowSignatureWords="0">
<set ShowNavBar="0">

Or keep some: each is described in the option reference — ShowOverview, ShowRelations, ShowTimePersonalities, ShowConcentration, ShowSignatureWords, ShowNavBar. The relation map has two tuning options of its own, RelationNicks and RelationMinWeight, for channels where it is too crowded or too sparse.

Scripts and cron jobs: pisg now fails loudly

pisg 0.73 exited with status 0 even when it had failed. 1.0a exits with 1 — and it does so when one channel out of several was skipped, while still writing the pages for the others. If a wrapper script does pisg && upload, that upload will now stop on a partial failure. Decide which you want:

./pisg --silent && ./upload.sh     # upload only when every channel worked
./pisg --silent;    ./upload.sh     # upload whatever was made

The good news that comes with it: pages are written to a temporary file and moved into place only when complete, so a failed run can no longer leave a half-written page on your site.

If you use CacheDir

Empty the cache folder once after upgrading, so every log is parsed again by the new version. The cache holds the results of the old parser, and 1.0a gathers things 0.73 never collected — the relation map, for one. The CacheDir option already asks for this whenever the settings change; a new version is the same case.

Optional: the new look and the landing page

None of this happens unless you ask for it.

  • A modern theme — <set ColorScheme="modern">, or midnight, amoled, terminal. modern follows the reader’s light or dark setting. Compare them, or build your own.
  • A landing page for several channels — copy site/index.html into your output folder and run pisg once, so channels.json exists beside it (ChannelIndex). Add <set HomeLink="index.html"> to put an “All channels” button on every stats page. See it live.
  • Cleaner link statistics — BadUrls keeps spam and image-host links out of the URL tables.
  • The optional tools — they need Python 3, or Tcl 8.6 and an eggdrop. pisg itself still needs only Perl; JSON::PP, which ChannelIndex uses, is part of core Perl.
Something did not come across the way you expected? Ask in #pisg on Undernet or open an issue, and say which version you came from. The full list of changes is in the changelog.

04Option reference

General options

Channel

define channel name

Default Unset

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 Maintainer = "John"
</channel>

Channel is used in two contexts, globally when using <set> and when defining new channels. It sets the name of the channel.

Format

the logfile format

Default Unset

<channel="#channel">
 Logfile = "channel.log"
 Format = "eggdrop"
 Maintainer = "John"
</channel>

<set Format="mIRC">

Format is used to define the format of the logfile, pisg supports a various number of different logfiles, see the FORMATS file included with the pisg distribution. If your logfiles have the suffix .gz or .bz2, they will automatically be decompressed and read by pisg. See also Maintainer.

Network

the IRC network of the channel

Default SomeIRCNetwork

<channel="#channel">
 Logfile = "channel.log"
 Format = "eggdrop"
 Network = "Undernet"
</channel>

<set Network="Quakenet">

Network is used to set the network which the channel resides on, this name is displayed on the stats page.

OutputFile

name of the generated HTML page

Default index.html

<channel="#channel">
 Logfile = "channel.log"
 Format = "eggdrop"
 OutputFile = "mychan.html"
</channel>

<set OutputFile="mychan.html">

OutputFile is used to define the name of the generated statistics page.

OutputTag

tag to insert into OutputFile

Default unset

<channel="#channel">
 LogDir = "logs/"
 Format = "eggdrop"
 OutputFile = "mychan%t.html"
 OutputTag = "-week"
</channel>

<set OutputTag="-week">

OutputTag specifies a string that will replace occurrences of "%t" in OutputFile. This option is most useful when used as a command line switch (-t) to pisg in conjunction with NFiles (-nf). Example:

$ pisg -co pisg.conf
$ pisg -co pisg.conf -nf 8 -t -week
Leaving out the OutputTag settings from the above pisg.conf snippet, this writes both the full statistics (mychan.html) and statistics for the last week (mychan-week.html) using the same pisg config file. (Assuming that there are separate logfiles for each day.)

Logfile

name of logfile to parse

Default unset

<channel="#channel">
 Logfile="/home/foo/eggdrop/logs/mylog.txt"
 Format = "eggdrop"
</channel>

<set Logfile="foo.log">

This defines the filename of the logfile to parse for the channel. If you want to parse a directory full of logfiles, you should use the LogDir option instead. Providing this option multiple times will parse multiple files in the order the statements appear. Wildcards (* ? []) will be expanded. See also LogDir and NFiles.

LogDir

parse a directory full of logs

Default unset

<channel="#channel">
 LogDir="/home/foo/eggdrop/logs/"
 Format = "eggdrop"
</channel>

<set LogDir="dailylogs/">

When LogDir is defined to valid path to a directory, then pisg will run through that directory, parse all logfiles in it and create one HTML page from it. Useful with for example eggdrop logs. Providing this option multiple times will parse all the files in multiple directories in the order the statements appear. See also NFiles, LogPrefix, and LogSuffix.

NFiles

parse only the last files in

Default 0 (process all files)

<channel="#channel">
 LogDir="/home/foo/eggdrop/logs/"
 NFiles="8"
 Format="eggdrop"
</channel>

<set NFiles="8">

When NFiles is set to a positive integer, pisg will process only the last that much logfiles from Logfile and LogDir options. Useful to create statistics that cover the last week or month (assuming there are separate logfile per day/week/etc.).

Maintainer

name of the maintainer

Default MAINTAINER

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 Maintainer = "Benny"
</channel>

<set Maintainer="Benny">

Maintainer is used to define the name of the maintainer of the statistics page, this can be either the person generating the stats or the bot/client doing the logging. The maintainer is displayed in the outputted stats page. This setting is also used by some log parsers where "You" is used instead of the nick in the log (e.g. "You have been kicked"). See also Format, NickTracking.

ColorScheme

use a different color scheme for stats page

Default default

<channel="#channel">
 Logfile = "channel.log"
 ColorScheme = "darkgalaxy"
 Maintainer = "John"
</channel>

<set ColorScheme="default">

ColorScheme is used to define the color scheme used for the statistics page. Actually it's the CSS file being included. CSS files distributed with pisg are: darkgalaxy, darkred, default, justgrey, ocean, orange_grey, pisg, softgreen (omit the .css). The file will be included statically in the generated HTML page. If you give a file name or URL (i.e. a color scheme name with .css or a path), the file will be linked to instead. Using "none" will cause pisg to write only the body of the page; use this to include the statistics into a custom page. See also CssDir, AltColorScheme, HiCell/HiCell2.

AltColorScheme

alternate stylesheets for stats page

Default default

<channel="#channel">
 Logfile = "channel.log"
 ColorScheme = "darkgalaxy"
 AltColorScheme = "layout/ocean.css"
 Maintainer = "John"
</channel>

<set AltColorScheme="layout/darkgalaxy.css layout/justgrey.css">

AltColorScheme defines an alternate CSS file to be used for the statistics page. Multiple files can be given (space separated.) Note that this is not supported by all browsers. See also ColorScheme and CssDir.

Lang

define the language / translation to use

Default EN (English)

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 Lang = "DE"
 OutputFile = "mychan-%l.html"
</channel>

<set Lang="FR,SE">

Lang defines the language to use for the stats. Currently, lang.txt includes: EN (English), BG (Bulgarian), CA (Catalan), CZ (Czech), DA (Danish), DE (German), EE (Estonian), ES (Spanish), FI (Finnish), FR (French), GR (Greek), HE (Hebrew), HU (Hungarian), IS (Icelandic), IT (Italian), NL (Dutch), NL_BE (Flemish), NO (Norwegian), PL (Polish), PT (Portuguese), PT_BR (Portuguese/Brazil), RO (Romanian), RU (Russian), SE (Swedish), SI (Slovenian), SK (Slovak), SQ (Albanian), TR (Turkish), YU (Serbian). Output in several languages can be generated at the same time, separate the languages by comma. The tag %l in the output file name will be replaced by the language name. See also LangFile.

LogPrefix

only parse logs LogPrefixed with a user defined string

Default unset

<channel="#channel">
 LogDir="/home/foo/eggdrop/logs/"
 Format = "eggdrop"
 LogPrefix = "logjun"
</channel>

<set LogPrefix="logjanuary">

When using the LogDir option and you only want to use a slew of the files in it, you can have pisg choose only files which are prefixed with a special string.

LogSuffix

Regexp to sort logfiles by format month||day||year

Default Unset

<set LogSuffix="\.\d\d([A-Za-z]+)\d\d\d\d||\.(\d\d)[A-Za-z]+\d\d\d\d||\.\d\d[A-Za-z]+(\d\d\d\d)">

LogSuffix is used to define the suffix of a logfile, it only works when LogDir is defined. The example in the synopsis is for the eggdrop bots default format.

Silent

make pisg silent, suppress messages

Default 0 (disabled)

<set Silent="1">

This option is useful mainly from command line when invoking pisg with --silent 1. But it can also used in the configuration file. It will suppress all standard output from pisg. Error messages will still be sent.

CacheDir

use a cache to speed up log parsing

Default Unset

<set CacheDir="pisg_cache">
<set CacheDir="/path/to/pisg_cache">

Setting this option makes pisg dump the results of log parsing into cache files. The next time pisg is run, it compares the timestamp of the log(s) with the timestamp stored in the cache file. When the log was not changed, the cached data is used. (This means that it does not work if you only have a single big logfile. Split the log at arbitrary points and use LogDir or Logfile="dir/*".)

Note that the cache files should be deleted when the pisg config file is changed since the cache data uses the old config settings. NickTracking does not work especially well with the cache when using different NFiles settings.

ChannelIndex 1.0a

name of the channel list file for a landing page

Default channels.json

<set ChannelIndex="channels.json">

Each time pisg writes a channel page, it also updates a small JSON file, next to that page, listing the channels found in the same directory: the channel name as written in the Channel setting, the page file name, the network, when it was updated, and the number of days, nicks and lines. A landing page can read this file to offer a drop-down list of channels (see site/index.html), so nothing has to scan or scrape the HTML pages. Each run only changes the entry of its own channel, and entries whose page no longer exists are removed. Set it to "none" to switch this off.

ShowNavBar 1.0a

enable/disable the section bar at the top of the page

Default 1 (enabled)

<set ShowNavBar="1">

Adds a slim bar at the top of the stats page that stays in view while scrolling. It shows which section is being read, and a "Sections" button opens a list of every section, laid out in columns so nothing has to be scrolled sideways, whatever the number of sections or the language. It also works without JavaScript. The bar is left out when ColorScheme is "none", since the page is then meant to be embedded in another one.

05Option reference

Statistics options

DailyActivity

number of days to show in "Daily Actitity"

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 DailyActivity = "0"
</channel>

<set DailyActivity="31">

This option sets the number of days to show in the "Daily activity" section. Pisg will generate a graph that shows the actitivy during this timeframe. Setting the option to 0 disables the section.

ShowActiveTimes

enable/disable "Most Active Times"

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowActiveTimes = "0"
</channel>

<set ShowActiveTimes="1">

With this option you can disable the "Most Active Times" section on the stats page. It will simply disappear when specifying 0.

ShowActiveNicks

enable/disable "Most Active Nicks"

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowActiveNicks = "0"
</channel>

<set ShowActiveNicks="1">

With this option you can disable the "Most Active Nicks" section on the stats page.

ShowBigNumbers

enable/disable "Big Numbers" sections

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowBigNumbers = "0"
</channel>

<set ShowBigNumbers="1">

With this option you can disable the "Big Numbers" and "Other Interesting numbers" sections on the stats page. They will simply disappear when specifying 0.

ShowTopics

enable/disable "Latest topics" sections

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowTopics = "0"
</channel>

<set ShowTopics="1">

With this option you can disable the "Latest topics" section on the stats page. It will simply disappear when specifying 0.

ShowLines

enable/disable "number of lines"

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowLines = "0"
</channel>

<set ShowLines="1">

The default behaviour is to add a column to the "Most Active Nicks" section displaying the number of lines a user wrote. With this option it can be disabled.

ShowWpl

enable/disable "words per line"

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowWpl = "0"
</channel>

<set ShowWpl="1">

With this option you can enable the "words per line" column in the "Most Active Nicks" section. It will add a column describing the average words per line for a person.

ShowCpl

enable/disable "characters per line"

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowCpl = "0"
</channel>

<set ShowCpl="1">

With this option you can enable the "characters per line" column in the "Most Active Nicks" section. It will add a column describing the average number of characters per line for a person.

ShowWords

enable/disable "number of words"

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowWords = "0"
</channel>

<set ShowWords="1">

The ShowWords option adds a column to the "Most Active Nicks" list which list the total number of words a user has typed.

ShowLastSeen

show when a user was last seen on a channel

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowLastSeen = "0"
</channel>

<set ShowLastSeen="1">

With this option enabled, a column will be added to the "Most Active Nicks" section to display when a user was last seen. E.g. "2 days ago".

ShowTime

show when a nick was active

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowTime = "0"
</channel>

<set ShowTime="1">

The default behaviour is to add a column to the "Most Active Nicks" section displaying a fancy time bar to show when a user was active. With this option it can be disabled.

ShowLineTime

mIRCStats like behaviour of time bar

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "bobot"
 ShowLineTime = "0"
</channel>

<set ShowLineTime="1">

The default behaviour is to add a column to the "Most Active Nicks" section displaying a fancy time bar to show when a user was active. With this option it can be done the same way as mIRCStats does it; that is, by putting that time bar next to the number of lines, in the same column.

ShowWordTime

ShowLineTime like behavior of words column

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "bobot"
 ShowWordTime = "0"
</channel>

<set ShowWordTime="1">

The default behaviour is to add a column to the "Most Active Nicks" section displaying a fancy time bar to show when a user was active. With this option it can be done similarly to mIRCStats does it and like the ShowLineTime option, but using words instead of lines; that is, by putting that time bar next to the number of words, in the same column.

ShowRandQuote

enable or disable the random quotes

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "bobot"
 ShowRandQuote = "0"
</channel>

<set ShowRandQuote="1">

The default behaviour is to add a column to the "Most Active Nicks" section displaying a users random quote. With this option it can be disabled.

ShowLegend

enable or disable the legend of the time bars

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "bobot"
 ShowLegend = "0"
</channel>

<set ShowLegend="1">

By default, pisg shows a legend below the "Most Active Times" displaying what the different colors means. With this option it can be disabled.

ShowKickLine

enable or disable the kick line

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "bobot"
 ShowKickLine = "0"
</channel>

<set ShowKickLine="1">

By default, pisg shows an example kick line in the "Most kicked"-stats. With this option it can be disabled.

ShowActionLine

enable or disable the action line

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "bobot"
 ShowActionLine = "0"
</channel>

<set ShowActionLine="1">

By default, pisg shows an example action line in the "Most actions"-stats. With this option it can be disabled.

ShowShoutLine

enable or disable the shout line

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "bobot"
 ShowShoutLine = "0"
</channel>

<set ShowShoutLine="1">

By default, pisg shows an example shout line in the "Most shouting people"-stats. With this option it can be disabled.

ShowFoulDecimals

set how many decimals to show

Default 1 decimal

<channel="#channel">
 Logfile = "channel.log"
 Format = "bobot"
 ShowFoulDecimals = "2"
</channel>

<set ShowFoulDecimals="1">

By default, pisg uses 1 decimal. With this option you could change it to whatever you like. Negative is treated as the default value.

ShowFoulLine

enable or disable the foul line

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "bobot"
 ShowFoulLine = "0"
</channel>

<set ShowFoulLine="1">

By default, pisg doesn't show an example foul line in the "Most fouls"-stats. With this option it can be enabled.

ShowViolentLines

enable or disable the violent lines

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "bobot"
 ShowViolentLines = "0"
</channel>

<set ShowViolentLines="1">

By default, pisg shows example violent lines in the "Most aggressive" and "Most attacked"-stats. With this option it can be disabled.

ShowMuw

enable or disable "Most used words"

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowMuw = "0"
</channel>

<set ShowMuw="1">

By default, pisg adds an "Most used words" section to the stats page. With this option you can disable it from being shown. See also WordHistory.

ShowMrn

enable or disable "Most referenced nicks"

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowMrn = "0"
</channel>

<set ShowMrn="1">

By default, pisg adds an "Most referenced nicks" section to the stats page. With this option you can disable it from being shown. See also NickHistory.

ShowMru

enable or disable "Most referenced URLs"

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowMru = "0"
</channel>

<set ShowMru="1">

By default, pisg adds an "Most referenced URLs" section to the stats page. With this option you can disable it from being shown. See also UrlHistory.

ShowCharts

enable or disable channel music charts

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowCharts = "0"
</channel>

<set ShowCharts="1">

With this option set, pisg creates a chart listing of the top songs played on the channel. See also ChartsHistory and ChartsRegexp.

ShowOps

enable or disable op statistics

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowOps = "0"
</channel>

<set ShowOps="0">

By default, pisg has op statistics in the "Most interesting numbers" section. Here you can disable the feature, it's useful if you don't feel that the information is of any value, or your log format doesn't support ops/deops.

ShowVoices

enable or disable voice statistics

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowVoices = "0"
</channel>

<set ShowVoices="1">

By default, pisg doesn't have voice statistics like it has op statistics. Enabling this option will add a section to the "Most interesting numbers" displaying who got most voices.

ShowHalfops

enable or disable halfop statistics

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowHalfops = "0"
</channel>

<set ShowHalfops="1">

By default, pisg doesn't have halfop statistics (+h on some servers) like it has op statistics. Enabling this option will add a section to the "Most interesting numbers" displaying who gave most half-ops.

ShowMostNicks

show who changed nick most often

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowMostNicks = "0"
</channel>

<set ShowMostNicks="1">

By enabling this option, pisg will add a section to the stats showing who had the most nicks, and what the nicks were. This option only works properly when NickTracking is enabled or user aliases have been defined. See also MostNicksHistory, MostNicksVerbose, and NickLimit.

ShowActiveGenders

show stats on which gender talked most

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowActiveGenders = "0"
</channel>

<set ShowActiveGenders="1">

Setting this option will make pisg create statistics on which gender (female/male/bot) talked most (see the "sex" option in Specifying user options). See also NickLimit.

ShowSmileys

show most used smileys

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowSmileys = "0"
</channel>

<set ShowSmileys="1">

With this option, pisg will make a list of the most used smileys in the channel. See also SmileyHistory.

ShowKarma

show channel karma

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowKarma = "0"
</channel>

<set ShowKarma="1">

With this option, pisg will analyze the channel karma. Users can give other users (or things) good or bad karma by saying "nickname++" or "nickname--"; "nickname==" resets it to zero. Only the last karma is remembered per nick/nick combination, so there is at most +- 1 karma point. See also KarmaHistory and NickLimit.

ShowMostActiveByHour

show most active nicks by hour

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowMostActiveByHour = "0"
</channel>

<set ShowMostActiveByHour="1">

By enabling this option, pisg will add a section to the stats showing "Most Active Nicks By Hour" - also look at the ShowMostActiveByHourGraph and ActiveNicksByHour settings.

ShowOnlyTop

only count stats for top talkers, ignore less-active users

Default 0 (disabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowOnlyTop = "1"
</channel>

<set ShowOnlyTop="1">

By enabling this option, stats in the "Big Numbers" and "Interesting Numbers" section will only be counted for users who were the most active. E.g. users who appear in the "Most Active Nicks" section, as respected by the ActiveNicks and ActiveNicks2 options. See also BigNumbersThreshold.

ShowMostActiveByHourGraph

show graphs in most active nicks by hour

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 ShowMostActiveByHourGraph = "0"
</channel>

<set ShowMostActiveByHour="1">
<set ShowMostActiveByHourGraph="1">

By enabling this option and the ShowMostActiveByHour option, pisg will show graphs in the "Most Active Nicks By Hour" section.

ShowOverview 1.0a

enable/disable the channel overview

Default 1 (enabled)

<set ShowOverview="1">

Shows a row of key numbers at the top of the page: lines, words, nicks, days covered, lines per day, the busiest and quietest hour, questions, links shared, the top talker and the number of joins and kicks.

ShowRelations 1.0a

enable/disable the relation map and its tables

Default 1 (enabled)

<set ShowRelations="1">

Shows who talks to whom: an interactive map (click a nick or a line for details), a table of the closest pairs, and the "social roles" (who is talked to the most, the best listener, ...). Two people are connected when one starts a line with the other's nick ("Bob: hi"), mentions them, or answers right after them. A line addressed to someone counts three times as much as a mention or a quick reply. Nicks that are joined by NickTracking or a user alias count as one person. Bots are left out: mark a bot with <user nick="Bot" sex="b"> to keep it in the other statistics but off the map, or with ignore="y" to remove it altogether. Nicks that are also ordinary words (and the channel name) are not counted as mentions. See also RelationNicks and RelationMinWeight.

RelationNicks 1.0a

number of nicks on the relation map

Default 30

<set RelationNicks="30">

The map shows this many of the most active people (bots excluded). More than about 40 makes the picture crowded.

RelationMinWeight 1.0a

minimum connection strength shown as a line on the relation map

Default 3

<set RelationMinWeight="3">

Connections weaker than this are not drawn, which keeps the map readable. A line addressed to someone is worth 3, a mention 1 and a quick reply 1. Raise it for a busy channel, lower it for a quiet one.

ShowTimePersonalities 1.0a

enable/disable the time personalities section

Default 1 (enabled)

<set ShowTimePersonalities="1">

Shows who chats mostly at night (0-5h), in the morning (6-11h), in the afternoon (12-17h) and in the evening (18-23h), for the people with enough lines. The hours follow TimeOffset.

ShowConcentration 1.0a

enable/disable the "who carries the channel" section

Default 1 (enabled)

<set ShowConcentration="1">

Shows how much of the channel the busiest people write: the share of all lines written by the top 1, 3, 5, 10 and 20 nicks, and how many nicks wrote half of everything.

ShowSignatureWords 1.0a

enable/disable the signature words section

Default 1 (enabled)

<set ShowSignatureWords="1">

Shows, for each of the regular talkers, the word they use a lot and that hardly anyone else uses. Short words, nicks and links are ignored (see WordLength and IgnoreWords).

IgnoreWords

ignore specified words

Default unset

<set IgnoreWords="there about">

Sometimes words in the "most used words" appears which you don't want to see, with this option you can ignore these words. It also applies to the "most referenced nicks" section. It's a space separated list of words. You can use * like in nick aliases. Can not be used in a channel-only context.

NoIgnoredQuotes

Control random quote output

Default 0

<set NoIgnoredQuotes="1">

When set to "1", pisg will not output quotes containing ignored words. Pisg will output a blank line after trying 20 random quotes if all 20 random quotes were ignored.

FoulWords

specify words considered to be bad/FoulWords language

Default ass fuck bitch shit scheisse kacke arsch ficker ficken schlampe

<set FoulWords="ass fuck bitch">

There is a section in the "Most interesting numbers" which tells who had a "dirty mouth" - here you can define which words are considered being bad/foul. It is a space separated list of words. You can use * like in nick aliases. Can not be used in a channel-only context.

ViolentWords

specify words considered to be aggressive/violent

Default slaps beats smacks

<set ViolentWords="slaps beats kick">

There is a section in the "Most interesting numbers" which tells who is most "aggressive" - here you can define which words are considered being "violent". It is a space separated list of words. You can use * like in nick aliases. Can not be used in a channel-only context.

BadUrls 1.0a

words that keep a URL out of the URL statistics

Default unset (no URLs are removed)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 BadUrls = "imagetwist imgur.com postimg.cc/*"
</channel>

<set BadUrls="imagetwist imgur.com postimg.cc/*">

BadUrls is a list of words, separated by spaces, much like FoulWords. A URL that contains any of the words is not counted, so it never shows up in "Most referenced URLs" (see ShowMru). Use it to keep spam and unwanted image hosts out of the statistics. A word matches anywhere in the URL, whatever the case, so "imgur.com" also removes "https://i.imgur.com/abc.png". Two wildcards are understood: * stands for any run of characters and ? for exactly one character. So "postimg.cc/*" removes every link to postimg.cc (including "i.postimg.cc/x.png") but not "example.org/postimg.cc", where nothing follows the name, and "*.example.org/*" removes links on any subdomain of example.org but not on example.org itself. Apart from the wildcards the words are plain text, not regular expressions, so characters such as . + ( ) [ ] | mean exactly themselves. A lone * would remove every URL. To hide a single exact address instead, use the link ignore setting.

MinQuote

minimum numbers of letters for a random quote

Default 25

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 MinQuote = "10"
</channel>

<set MinQuote="5">

The random quotes displayed in the "Most Active Nicks" section will be picked from a length range. With this option you can change the minimum number of letters required for a random quote. Also see the MaxQuote option. Note that pisg will still choose a short quote if it cannot find a longer one.

MaxQuote

maximum numbers of letters for a random quote

Default 65

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 MaxQuote = "70"
</channel>

<set MaxQuote="100">

The random quotes displayed in the "Most Active Nicks" section will be picked from a length range. With this option you can change the maximum number of letters required for a random quote. Also see the MinQuote option.

WordLength

minimum number of characters in an interesting word

Default 5

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 WordLength = "10"
</channel>

<set WordLength="2">

The "Most Used Words" section on the stats page display the most used words. The default is that a word only appears if it is longer than 5 characters. With this option you can change that minimum.

QuoteWidth

maximum allowed length of a "word" with no spaces

Default 80

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 QuoteWidth = "48"
</channel>

<set QuoteWidth="48">

Pisg will automatically insert a space in words that have a length over the amount QuoteWidth is set to. When used in breaking up URLs it will insert a space in the displayed URL, but not in the actual URL referenced by the HREF.

BigNumbersThreshold

Minimum number of lines per user for some "Big Numbers" statistics

Default sqrt

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 BigNumbersThreshold = "10"
</channel>

<set BigNumbersThreshold="sqrt">

Pisg will ignore users with less than this setting lines in the "questions asked", "shouts loudest", "CAPSLOCK", "longest line", "most sad", and "most happy" sections. If the setting is "sqrt" (the default), it will be dynamically replaced with the square root of the number of lines of the most active nick. See also ShowOnlyTop.

ActiveNicks

nicks to show in "Most Active Nicks"

Default 25

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 ActiveNicks = "50"
</channel>

<set ActiveNicks="10">

With this option you can define how many nicks you want to appear in the "Most Active Nicks" section on the stats page.

ActiveNicks2

nicks to show in "These didn't make it.."

Default 30

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 ActiveNicks2 = "25"
</channel>

<set ActiveNicks2="10">

With this option you can define how many nicks you want to appear in the "These didn't make it" section on the stats page.

ActiveNicksByHour

number of nicks to show in "Most Active Nicks By Hour"

Default 10

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 ActiveNicksByHour = "25"
</channel>

<set ActiveNicksByHour="10">

With this option you can define how many nicks you want to appear in the "Most Active Nicks By Hour" section on the stats page.

MostNicksHistory

maximum number of nicks to show in "users with most nicknames"

Default 5

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 MostNicksHistory = "2"
</channel>

<set MostNicksHistory="10">

With this option you can define how many nicks you want to appear in the "Users with most nicknames" section. See also ShowMostNicks and MostNicksVerbose.

MostNicksVerbose

show nicks used in "most nicks"

Default 1 (enabled)

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 MostNicksVerbose = "0"
</channel>

<set MostNicksVerbose="1">

By disabling this option you can stop pisg from displaying all the nicks a user has had in the "Most used nicks" section. See also ShowMostNicks, MostNicksHistory, and NickLimit.

TopicHistory

maximum number of topics to show

Default 3

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 TopicHistory = "2"
</channel>

<set TopicHistory="10">

With this option you can define how many topics you want to appear in the "Latest topics" section.

UrlHistory

maximum number of URLs to show

Default 5

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 UrlHistory = "2"
</channel>

<set UrlHistory="10">

With this option you can define how many URLs you want to appear in the "Most referenced URLs" section. See also ShowMru.

ChartsHistory

number of songs to show

Default 5 (the Top Five)

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 ChartsHistory = "10"
</channel>

<set ChartsHistory="5">

This option sets the number of songs that will be show in the channel music charts. See also ShowCharts and ChartsRegexp.

ChartsRegexp

how to recognize songs played

Default "(?:np:|(?:now )?playing:? (?:MPEG stream from)?)\s*(.*)"

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 ChartsRegexp = "(?:is )?(?:np:|(?:now )?playing:? |listening to:? )(?:MPEG stream from)?\s*(.*)"
</channel>

This option is a perl regexp that is used to recognize songs played. Please open an issue at https://github.com/PISG/pisg/issues if you have a better default. The regexp MUST contain a single () pair to extract the song name. See also the perlre(1) manpage, ShowCharts and ChartsHistory.

WordHistory

maximum number of words to show

Default 10

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 WordHistory = "5"
</channel>

<set WordHistory="15">

With this option you can define how many words you want to appear in the "Most used words" section. See also ShowMuw.

NickHistory

maximum number of nicks to show in "Most referenced nicks"

Default 5

<channel="#channel">
 logfile = "channel.log"
 format = "mIRC"
 NickHistory = "3"
</channel>

<set NickHistory="15">

With this option you can define how many nicks you want to appear in the "Most referenced nicks" section. See also ShowMrn.

SmileyHistory

maximum number of smileys to show in smiley stats

Default 10

<channel="#channel">
 logfile = "channel.log"
 format = "mIRC"
 SmileyHistory = "3"
</channel>

<set SmileyHistory="15">

At most this many smileys will appear in smiley stats. See also ShowSmileys.

KarmaHistory

maximum number of nicks to show in "Karma"

Default 5

<channel="#channel">
 logfile = "channel.log"
 format = "mIRC"
 KarmaHistory = "3"
</channel>

<set KarmaHistory="15">

At most this many nicks will appear in the good and bad karma stats. See also ShowKarma and NickLimit.

NickTracking

track nick changes and create aliases

Default 0 (disabled)

<set NickTracking="1">

Enabling this option will track nick changes as well as it can. It will then automatically create aliases for these nicks. Useful for ShowMostNicks and other stats. Nick tracking does not work for log formats that do not use the nickname for the person running the logger, but only show "You" there. See Maintainer.

NickLimit

maximum number of nicks in lists

Default 10

<set NickLimit="0">

This option trims lists of nicks to a maximum length, replacing the rest with "...". Setting to 0 disables trimming. Affected are the used nicks in the "Users with most nicknames" section, nicks in "Most active genders", and nicks in the "Good/bad karma by" columns. See ShowMostNicks, ShowKarma, and ShowActiveGenders.

SortByWords

sort "most active nicks" by words

Default 0 (disabled)

<channel="#channel">
 logfile = "channel.log"
 format = "xchat"
 SortByWords = "0"
</channel>

<set SortByWords="1">

The default for the "Most Active Nicks" section - is to sort users by lines. Enabling this will sort it by words instead.

06Option reference

Options added in 1.0a

The seven sections added in 1.0a are on by default in every colour scheme. Set them to 0 for the page pisg wrote before 1.0a — see the upgrade notes. Each option is described in its chapter, marked 1.0a.

07Option reference

Picture options

PicLocation

path to images on stats page

Default Current directory

<set PicLocation="gfx/">

The location to the pictures used on the stats page - not the user pictures but the different bars in "Most Active Times".

UserPics

number of user pictures per row

Default yes (1)

<channel="#channel">
 Logfile = "channel.log"
 UserPics = "no"
</channel>

<set UserPics="3">

UserPics allows you to configure the number of user pictures per row. Per default, one picture will be shown. Since pictures are usually higher than one line of text, this lets the table grow. With settings greater than 1, several pictures will be placed next to each other. A good setting would be UserPics=3 and pictures of size 60x60. Set UserPics to no or 0 to disable user pictures. The latter is useful if you share a user config file between channels and want to disable user pictures for some channels.

ImagePath

path to user pictures (HTML page)

Default current directory

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 ImagePath = "userpics/"
</channel>

<set ImagePath="users/">

ImagePath defines the path to where user pictures are located, relative to the HTML page generated. The default is that user pictures is located in the same directory as the HTML page.

DefaultPic

use a default user picture

Default unset

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 DefaultPic = "not_available.jpg"
</channel>

<set DefaultPic="unknown.gif">

DefaultPic defines a picture to be displayed for all users which have no other picture defined in the user element. This is good for showing "No picture available" or something. May contain globbing patterns, see ImageGlobPath below.

ImageGlobPath

path to user pictures (output generation)

Default current ImagePath setting

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 ImageGlobPath = "users/"
</channel>

<set ImageGlobPath="/var/www/pisg/">
<set DefaultPic="default-??.gif">

ImageGlobPath defines the path to the directory where user pictures are located, relative to the current directory. This setting is used to choose random pictures if ? or * (globbing characters) are used in the picture name. ? matches a single character, * matches a (possibly empty) string. The default is the ImagePath setting. (NB: This setting will be different from ImagePath if the latter is not relative to the current directory, e.g. if you are writing the HTML file outside of the current directory.)

PicWidth

define a standard width for user pictures

Default unset

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 PicWidth = "500"
</channel>

<set PicWidth="500">

PicWidth defines the standard width for user pictures. Setting the 'width' attribute of image-elements on the outputted stats page. See also PicHeight.

PicHeight

define a standard height for user pictures

Default unset

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 PicHeight = "500"
</channel>

<set PicHeight="500">

PicHeight defines the standard height for user pictures. Setting the 'height' attribute of image-elements on the outputted stats page. See also PicWidth.

08Option reference

Misc options

Charset

character set to use for stats page

Default iso-8859-1

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 Charset = "utf-8"
</channel>

<set Charset="iso-8859-15">

The pisg stats page defines a character set in a meta tag, this can be used if your country is using a different one than the default. Pisg will also use this setting to convert the language templates from LangFile if the language defines a source charset. Note: you also have to tell your webserver to transmit the charset to the browser. With Apache, use "AddDefaultCharset off" in the server config.

LogCharset

character set for logfiles

Default empty (no conversion)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 Charset = "iso-8859-1"
 LogCharset = "utf-8"
</channel>

<set Charset="iso-8859-15">
<set LogCharset="iso-8859-15">

If LogCharset is set and different from Charset, pisg will convert the charset using Text::Iconv. Using this option slows down log processing.

LogCharsetFallback

fallback character set for logfiles

Default empty (no fallback conversion)

<channel="#channel">
 Logfile = "channel.log"
 Format = "xchat"
 Charset = "utf-8"
 LogCharset = "utf-8"
 LogCharsetFallback = "iso-8859-1"
</channel>

<set Charset="utf-8">
<set LogCharset="utf-8">
<set LogCharsetFallback="iso-8859-15">

LogCharsetFallback defines a fallback charset for the LogCharset conversion. This is useful if you have mixed unicode/iso-8859-* logs. Pisg will first try the conversion from LogCharset. If that fails, LogCharsetFallback is used. Note that this only works for charsets where certain byte sequences are illegal, like UTF-8. (In short: LogCharset = utf-8, LogCharsetFallback = iso-8859-15 works, the other way round does not.)

TimeOffset

use a different time zone than the local machine

Default +0

<channel="#channel">
 Logfile = "channel.log"
 Format = "mIRC"
 Maintainer = "John"
 TimeOffset = "+5"
</channel>

<set TimeOffset="+2">

By default, pisg uses the time of the local machine to display the time of the generated stats. Sometimes when you have a shell on an external box, and it's in another country, you want to use another time. This is accomplished by the TimeOffset command.

RegexpAliases

use regular expressions in user aliases

Default 0 (disabled)

<user nick="Joe" alias="Joe\d+">

<set RegexpAliases="1">

Enabling this option will make all aliases in <user> lines be parsed as regular expressions; this setting also applies to the IgnoreWords, FoulWords, and ViolentWords settings.

LangFile

filename of language file

Default lang.txt

<set LangFile="mylang.txt">

With this option you have an alternative way to define the name and/or path to the language file. Usually you don't have to touch this option.

CssDir

path to directory with CSS files

Default layout/ (in current directory)

<set CssDir="/usr/share/pisg/layout/">

CssDir is used to define the paths to the CSS files (the ColorSchemes). Usually you don't need to change this. This setting is only used when statically including the CSS file.

HiCell

colors for color gradient in most active nicks section

Default #BABADD, #CCCCCC

<set HiCell="#BABADD" HiCell2="#CCCCCC">
<set HiCell="">

HiCell and HiCell2 define the colors to be used for the color gradient in the most active nicks section. They should match your ColorScheme. When setting HiCell the empty string (""), pisg will not generate a color gradient; you might want to use this with ColorScheme="none" or AltColorScheme.

LogType

type of log (not the format of the log)

Default Logfile

<set LogType="Logfile">

The type of logs kept for your channel. Currently only "Logfile" is supported, so you don't need to change this option.

StatsDump

dump raw statistics into file

Default Unset

<set StatsDump="statsdump">

This option is intended for debugging pisg, but might be useful to process the parsed logs with another program. The file contains the %stats and %lines hashes in perl's Data::Dumper format.

09More

Optional tools

None of these are needed to run pisg. They live in scripts/ and each one solves something that otherwise means editing config files by hand. Every one of them refuses to overwrite work you did yourself.

eggdrop-pisg.tcl — profiles people manage from IRC

A Tcl script for an eggdrop (Tcl 8.6) that lets the people in your channel set their own <user> options, so you do not have to. The bot writes a config file; pisg reads it:

<include="users.cfg">

Nothing is stored inside pisg itself, and the file is plain text you can read and edit. Commands work in the channel with ! and in a private message without it:

CommandWhat it does
!pisghelp [command]Explains the commands, one at a time.
!pisginfoSet your sex, your picture and your link.
!pisgmergeCount another of your nicks as the same person.
!pisgunmergeUndo that.
!pisgshowShow what the bot has stored for you.
!pisgdelDelete your own entry.
!pisgdeluserDelete somebody else’s entry. Bot masters only.
!pisgstatsReply with the address of the stats page. Open to everyone; in the channel only.

The rules it enforces, which are what make opening this up safe:

  • People are identified by their network account (getaccount, or the account host on Undernet), not by the nick they happen to be using.
  • Somebody can only claim the nick they are currently using.
  • A <user> line you wrote by hand can never be overwritten by the bot.
  • Changes are rate limited.
  • !pisgstats does not run pisg inside the bot — it only answers with a link.

A test suite, eggdrop-pisg-test.tcl, ships with it: 107 checks. Run it before you load the script on a busy bot.

pisg-autoalias.py — merge nicks automatically

Python 3. On a network with account services the same person shows up as nick, nick|afk, nick_ and nick2 — but all of them share one authenticated host, such as *.users.undernet.org. This script reads your logs, groups nicks by that host, and writes an include file of <user> lines with aliases. Run it before pisg, from the same cron job.

python3 scripts/pisg-autoalias.py --logdir ~/eggdrop/logs --prefix nightshift.log. \
    --manual ~/pisg/pisg.cfg --out ~/pisg/aliases.auto.cfg
<include="/home/you/pisg/aliases.auto.cfg">

--manual names the config files whose <user> lines are yours (repeat it for each); --hosts changes the host pattern for another network; --report prints what was merged and what was skipped, and why.

What it will not do: merge a shared host, a gateway, or a bouncer several people use; and it never touches a nick you already described yourself — your own lines always win. A test suite ships with it.

adiirc2eggdrop.py — turn client logs into bot logs

Python 3. You have years of channel history in your client’s log folder and a bot that only started logging last spring. This converts the client logs into the format a bot writes, so the old history can join the statistics:

python3 scripts/adiirc2eggdrop.py "#nightshift.log" logs/ --channel '#nightshift' --nick YourNick \
    --tz Europe/Paris --before '2026-01-31 03:00' --prefix nightshift.log.

--tz is the time zone your client logged in, --before the moment (UTC) your bot started logging, and --nick your own nick. Add --dry-run to see what it would write. --format znc writes what the ZNC log module writes instead: one YYYY-MM-DD.log per day, read with Format="energymech". The rules it follows:

  • Public channel events only. Private messages, notices, /whois output and server text are dropped.
  • Local timestamps are converted to UTC, which is what bots log in.
  • It never overwrites an existing file.
  • It stops at --before, where your real logging starts, so nothing is counted twice.

znc-setup.sh — let pisg read a ZNC log folder

Shell. ZNC’s logs live under the ZNC user’s home directory, and pisg usually runs as somebody else. This script puts converted logs into the right ZNC account folder and opens up read access to exactly the channel folders pisg needs — not the whole home directory.

Put the converted logs in ~/znc-import/#channel/ of the pisg user, then, as the ZNC account (or with sudo):

PISG_USER=stats bash scripts/znc-setup.sh            # shows what it found and what it would do
PISG_USER=stats bash scripts/znc-setup.sh --apply    # does it

Without --apply it changes nothing, so you can read the plan first. It never deletes or replaces a file, and it links each channel folder to ~/znc-logs/ of the pisg user, so the configuration does not need to know ZNC’s layout:

<channel="#nightshift">
 Format = "energymech"
 LogDir = "/home/stats/znc-logs/nightshift/"
</channel>

10More

Example configuration

A ready-to-use pisg.cfg for a channel called #example. It lists every option pisg understands, with what it does, so you can copy it and change only the lines marked EDIT: the log file, its format, the network name, the output file and your name. Options are at pisg's own defaults unless the comment says recommended.

  1. Copy the file below (or download it) and save it as pisg.cfg next to pisg.
  2. Change the EDIT values in the <channel> block.
  3. Run ./pisg.
pisg.cfg Download
# pisg.cfg.example - a complete configuration for pisg, ready to copy.
#
#   1. Copy this file to pisg.cfg
#   2. Change the values marked  EDIT  (log path, format, network, output file, name)
#   3. Run ./pisg
#
# Every option pisg understands is listed below with its meaning. Options are set to
# pisg's own default unless the comment says "recommended". Lines starting with # are
# comments; an option shown commented out is off/unset - remove the # to use it.
#
# Syntax reminders:
#   <set Name="value">      a global option, applies to every channel
#   <channel="#name"> ... </channel>   settings for one channel (they override <set>)
#   <user nick="..." ...>   per-user settings
# Each <set> must be on one line, and every value must be in quotes.


##############################################################################
#  GLOBAL OPTIONS - apply to every channel below
##############################################################################

# ---- General options -------------------------------------------------------

# use a different color scheme for stats page - recommended: modern, light/dark theme;
# try midnight, amoled, terminal, or default
<set ColorScheme="modern">

# alternate stylesheets for stats page - extra stylesheets the visitor can switch to
#<set AltColorScheme="midnight.css amoled.css">

# define the language / translation to use
<set Lang="EN">

# define a file as page header - HTML file inserted above the statistics
#<set PageHead="header.html">

# define a file as page footer - HTML file inserted below the statistics
#<set PageFoot="footer.html">

# make pisg silent, suppress messages
<set Silent="0">

# use a cache to speed up log parsing - cache parsed logs here to speed up runs (delete
# it when you change settings)
#<set CacheDir="cache/">

# name of the channel list file for a landing page
<set ChannelIndex="channels.json">

# adds a button at the top of every stats page that leads back to your landing page
<set HomeLink="">

# enable/disable the section bar at the top of the page
<set ShowNavBar="1">

# ---- Options for various statistics features -------------------------------

# number of days to show in "Daily Actitity" - recommended: show the last 14 days as a
# bar chart
<set DailyActivity="14">

# enable/disable "Most Active Times"
<set ShowActiveTimes="1">

# enable/disable "Most Active Nicks"
<set ShowActiveNicks="1">

# enable/disable "Big Numbers" sections
<set ShowBigNumbers="1">

# enable/disable "Latest topics" sections
<set ShowTopics="1">

# enable/disable "number of lines"
<set ShowLines="1">

# enable/disable "words per line" - recommended: also show words per line
<set ShowWpl="1">

# enable/disable "characters per line" - recommended: also show characters per line
<set ShowCpl="1">

# enable/disable "number of words" - recommended: also show total words
<set ShowWords="1">

# show when a user was last seen on a channel
<set ShowLastSeen="1">

# show when a nick was active
<set ShowTime="1">

# mIRCStats like behaviour of time bar
<set ShowLineTime="0">

# ShowLineTime like behavior of words column
<set ShowWordTime="0">

# enable or disable the random quotes
<set ShowRandQuote="1">

# enable or disable the legend of the time bars
<set ShowLegend="1">

# enable or disable the kick line
<set ShowKickLine="1">

# enable or disable the action line
<set ShowActionLine="1">

# enable or disable the shout line
<set ShowShoutLine="1">

# set how many decimals to show
<set ShowFoulDecimals="1">

# enable or disable the foul line
<set ShowFoulLine="0">

# enable or disable the violent lines
<set ShowViolentLines="1">

# enable or disable "Most used words"
<set ShowMuw="1">

# enable or disable "Most referenced nicks"
<set ShowMrn="1">

# enable or disable "Most referenced URLs"
<set ShowMru="1">

# enable or disable channel music charts
<set ShowCharts="0">

# enable or disable op statistics
<set ShowOps="1">

# enable or disable voice statistics
<set ShowVoices="0">

# enable or disable halfop statistics
<set ShowHalfops="0">

# show who changed nick most often - recommended: show who changed nick most often
<set ShowMostNicks="1">

# show stats on which gender talked most
<set ShowActiveGenders="0">

# show most used smileys - recommended: show the most used smileys
<set ShowSmileys="1">

# show channel karma - recommended: show karma (nick++ / nick--)
<set ShowKarma="1">

# show most active nicks by hour - recommended: show the most active nicks by time of
# day
<set ShowMostActiveByHour="1">

# only count stats for top talkers, ignore less-active users
<set ShowOnlyTop="0">

# show graphs in most active nicks by hour
<set ShowMostActiveByHourGraph="1">

# enable/disable the channel overview
<set ShowOverview="1">

# enable/disable the relation map and its tables
<set ShowRelations="1">

# number of nicks on the relation map
<set RelationNicks="30">

# minimum connection strength shown as a line on the relation map
<set RelationMinWeight="3">

# enable/disable the time personalities section
<set ShowTimePersonalities="1">

# enable/disable the "who carries the channel" section
<set ShowConcentration="1">

# enable/disable the signature words section
<set ShowSignatureWords="1">

# ignore specified words - words to leave out of the word statistics
#<set IgnoreWords="badword otherword">

# Control random quote output
<set NoIgnoredQuotes="0">

# specify words considered to be bad/FoulWords language
<set FoulWords="ass fuck bitch shit scheisse scheiße kacke arsch ficker ficken schlampe">

# specify words considered to be aggressive/violent
<set ViolentWords="slaps beats smacks">

# words that keep a URL out of the URL statistics - matched anywhere in a URL, any case;
# * = any characters, ? = one; for spam and unwanted image hosts
#<set BadUrls="imagetwist imgur.com postimg.cc/*">

# minimum numbers of letters for a random quote
<set MinQuote="25">

# maximum numbers of letters for a random quote
<set MaxQuote="65">

# minimum number of characters in an interesting word
<set WordLength="5">

# maximum allowed length of a "word" with no spaces
<set QuoteWidth="80">

# Minimum number of lines per user for some "Big Numbers" statistics
<set BigNumbersThreshold="sqrt">

# nicks to show in "Most Active Nicks"
<set ActiveNicks="25">

# nicks to show in "These didn't make it.."
<set ActiveNicks2="30">

# number of nicks to show in "Most Active Nicks By Hour"
<set ActiveNicksByHour="10">

# maximum number of nicks to show in "users with most nicknames"
<set MostNicksHistory="5">

# show nicks used in "most nicks"
<set MostNicksVerbose="1">

# maximum number of topics to show - recommended: show the last 5 topics
<set TopicHistory="5">

# maximum number of URLs to show
<set UrlHistory="5">

# number of songs to show
<set ChartsHistory="5">

# how to recognize songs played
<set ChartsRegexp="(?:is )?(?:np:|(?:now )?playing:? |listening to:? )(?:MPEG stream from)?\s*(.*)">

# maximum number of words to show
<set WordHistory="10">

# maximum number of nicks to show in "Most referenced nicks"
<set NickHistory="5">

# maximum number of smileys to show in smiley stats
<set SmileyHistory="10">

# maximum number of nicks to show in "Karma"
<set KarmaHistory="5">

# track nick changes and create aliases - recommended: follow nick changes so Alice,
# Alice_ and Alice- count as one person
<set NickTracking="1">

# maximum number of nicks in lists
<set NickLimit="10">

# sort "most active nicks" by words
<set SortByWords="0">

# ---- Picture options -------------------------------------------------------

# path to images on stats page
<set PicLocation=".">

# number of user pictures per row
<set UserPics="1">

# path to user pictures (HTML page) - folder of user pictures, as seen by the web page
#<set ImagePath="images/">

# use a default user picture - picture shown for users who have none
#<set DefaultPic="images/nobody.png">

# path to user pictures (output generation) - folder of user pictures, as seen by pisg
# (for pic="x_*.jpg" globs)
#<set ImageGlobPath="/var/www/pisg/images/">

# define a standard width for user pictures - show every user picture this wide, in
# pixels
#<set PicWidth="55">

# define a standard height for user pictures - show every user picture this tall, in
# pixels
#<set PicHeight="55">

# ---- Misc options ----------------------------------------------------------

# character set to use for stats page - recommended: UTF-8 shows accents, emoji and non-
# Latin scripts correctly
<set Charset="utf-8">

# character set for logfiles - convert logs from this charset (needs the Text::Iconv
# perl module)
#<set LogCharset="iso-8859-1">

# fallback character set for logfiles - used for lines that are not valid in LogCharset
# (needs Text::Iconv)
#<set LogCharsetFallback="iso-8859-1">

# use a different time zone than the local machine
<set TimeOffset="+0">

# use regular expressions in user aliases
<set RegexpAliases="0">

# filename of language file
<set LangFile="lang.txt">

# path to directory with CSS files
<set CssDir="layout/">

# colors for color gradient in most active nicks section
<set HiCell="#BABADD">
<set HiCell2="#CCCCCC">

# colors for color gradient in most active nicks section
<set HiCell2="#CCCCCC">

# dump raw statistics into file - debugging: dump the raw statistics to this file
#<set StatsDump="stats.dump">

# ---- Advanced (not in the original documentation) -------------------------

# nicks of bots, for log formats that cannot tell bots from people (DCpp)
#<set BotNicks="bot1 bot2">

# width in pixels of the statistics tables
<set TableWidth="574">

# image id of the horizontal bar for hours 0-5
<set Pic_H_0="blue-h">

# image id of the horizontal bar for hours 6-11
<set Pic_H_6="green-h">

# image id of the horizontal bar for hours 12-17
<set Pic_H_12="yellow-h">

# image id of the horizontal bar for hours 18-23
<set Pic_H_18="red-h">

# image id of the vertical bar for hours 0-5
<set Pic_V_0="blue-v">

# image id of the vertical bar for hours 6-11
<set Pic_V_6="green-v">

# image id of the vertical bar for hours 12-17
<set Pic_V_12="yellow-v">

# image id of the vertical bar for hours 18-23
<set Pic_V_18="red-v">


##############################################################################
#  YOUR CHANNEL - copy this block for each extra channel
##############################################################################

<channel="#example">
  # Logfile: the log to read; you can list several Logfile lines  EDIT
  Logfile="/path/to/example.log"

  # LogDir: use INSTEAD of Logfile to read a whole folder of dated logs
  #LogDir="/path/to/logs/"

  # LogPrefix: with LogDir: only read files starting with this
  #LogPrefix="example.log."

  # LogSuffix: with LogDir: date format at the end of the file names, so they sort by
  # date
  #LogSuffix=".%d%b%Y"

  # NFiles: with LogDir: only parse the newest N files (0 = all)
  #NFiles="30"

  # Format: your log format: eggdrop, mIRC, xchat, irssi, ... (see docs/FORMATS)  EDIT
  Format="eggdrop"

  # Network: the IRC network, shown on the page  EDIT
  Network="ExampleNet"

  # OutputFile: the page pisg writes  EDIT
  OutputFile="/var/www/html/example.html"

  # OutputTag: replaces %t in OutputFile; used with the -nf / -t command line options
  #OutputTag="-week"

  # Maintainer: who is named as maintainer on the page  EDIT
  Maintainer="Your Name"

  # LogType: only "Logfile" exists, leave it
  LogType="Logfile"

  # Any global option can be overridden for this channel only, for example:
  #Lang="FR"
  #ColorScheme="midnight"
</channel>


##############################################################################
#  USERS - link nicks together, add pictures, mark bots
##############################################################################
# nick    the name shown in the stats (required)
# alias   other nicks of the same person, space separated; * matches anything
#         (Joe* also counts Joe_, Joe^away ...). NickTracking="1" also finds many
# pic     picture shown next to the user      bigpic  larger picture it links to
# link    a web address or e-mail address      sex     m, f or b (bot)
# ignore  y = leave this nick out of the stats altogether (for bots)

<user nick="Alice" alias="Alice_ Alice-* AliceAway" pic="alice.png" link="https://example.com/alice" sex="f">
<user nick="Bob" alias="Bob_ Bobby" pic="bob.png" bigpic="bob-big.png" link="bob@example.com" sex="m">
<user nick="ChanBot" sex="b" ignore="y">
<user nick="Seb" alias="Seb- Seb_" pic="https://r2.fivemanage.com/X8I0LGoLdHY2Wx9DdTrvx/Pics/me.png" sex="m" link="https://dooubletap.github.io/">

##############################################################################
#  LINKS - keep addresses out of "Most referenced URLs"
##############################################################################
<link url="https://example.com/spam" ignore="y">

##############################################################################
#  INCLUDE - share users between channels or config files
##############################################################################
# Put your <user> lines in users.cfg and load them here (an included file cannot
# include another file):
#<include="users.cfg">