├── LICENSE.md ├── Makefile ├── README.md ├── docs ├── CREDITS ├── Changelog ├── FORMATS ├── Makefile ├── dev │ └── API ├── modifytxt.pl ├── pisg-doc.xml ├── pisg-faq.txt └── pisg.sgml ├── lang.txt ├── lang ├── bg.dat ├── ca.dat ├── cz.dat ├── da.dat ├── de.dat ├── ee.dat ├── en.dat ├── es.dat ├── fi.dat ├── fr.dat ├── gr.dat ├── he.dat ├── hu.dat ├── is.dat ├── it.dat ├── nl.dat ├── nl_be.dat ├── no.dat ├── pl.dat ├── pt.dat ├── pt_br.dat ├── readme.txt ├── ro.dat ├── ru.dat ├── se.dat ├── si.dat ├── sk.dat ├── sq.dat ├── sr_ec.dat ├── sr_el.dat └── tr.dat ├── layout ├── darkgalaxy.css ├── darkred.css ├── default.css ├── justgrey.css ├── new.css ├── ocean.css ├── orange_grey.css ├── pisg.css └── softgreen.css ├── modules ├── Pisg.pm └── Pisg │ ├── Common.pm │ ├── HTMLGenerator.pm │ └── Parser │ ├── Format │ ├── DCpp.pm │ ├── IRCAP.pm │ ├── RacBot.pm │ ├── Template.pm │ ├── Trillian.pm │ ├── Vision.pm │ ├── axur.pm │ ├── blootbot.pm │ ├── bobot.pm │ ├── bxlog.pm │ ├── dancer.pm │ ├── dircproxy.pm │ ├── eggdrop.pm │ ├── energymech.pm │ ├── grufti.pm │ ├── hydra.pm │ ├── infobot.pm │ ├── ircII.pm │ ├── ircle.pm │ ├── irssi.pm │ ├── javabot.pm │ ├── konversation.pm │ ├── kvirc.pm │ ├── lulubot.pm │ ├── mIRC.pm │ ├── mIRC6.pm │ ├── mIRC6hack.pm │ ├── mbot.pm │ ├── miau.pm │ ├── moobot.pm │ ├── mozbot.pm │ ├── muh.pm │ ├── muh2.pm │ ├── oer.pm │ ├── perlbot.pm │ ├── pircbot.pm │ ├── psybnc.pm │ ├── rbot.pm │ ├── sirc.pm │ ├── supy.pm │ ├── virc98.pm │ ├── weechat.pm │ ├── weechat3.pm │ ├── winbot.pm │ ├── xchat.pm │ └── zcbot.pm │ └── Logfile.pm ├── pisg ├── pisg.cfg ├── scripts ├── Cleaner Index │ ├── README.txt │ ├── dark-style.css │ ├── index.php │ └── recache.php ├── addalias │ ├── README │ └── addalias.pl ├── bxlog-pisg.bx ├── crontab ├── dropegg.pl ├── egg2mirc.awk ├── eggdrop-pisg.tcl ├── mirc2egg.sed ├── mirc6hack.mrc ├── pisg-addchan.tcl ├── pum │ ├── pum.conf │ └── pum.pl ├── sirc-timestamp.pl └── windows-ftp-upload.txt └── speedtest.sh /Makefile: -------------------------------------------------------------------------------- 1 | # Bloated Makefile to make new releases of pisg 2 | 3 | all: release 4 | 5 | # Ugly hack to get the version number from Pisg.pm 6 | VER = $(shell grep "version =>" modules/Pisg.pm | sed 's/[^"]*"\([^"]*\)".*/\1/') 7 | 8 | # append date if SNAPSHOT is defined 9 | ifeq ($(SNAPSHOT),) 10 | VERSION = $(VER) 11 | else 12 | VERSION = $(VER)_$(shell date +%Y%m%d) 13 | endif 14 | 15 | DIRNAME = pisg-$(VERSION) 16 | 17 | TARFILE = pisg-$(VERSION).tar.gz 18 | ZIPFILE = pisg-$(VERSION).zip 19 | 20 | FILES = pisg \ 21 | COPYING \ 22 | README \ 23 | pisg.cfg \ 24 | lang.txt 25 | 26 | DOCS = docs/FORMATS \ 27 | docs/Changelog \ 28 | docs/CREDITS \ 29 | docs/pisg-doc.html \ 30 | docs/pisg-doc.txt \ 31 | docs/pisg-doc.xml \ 32 | docs/pisg.sgml \ 33 | docs/pisg.1 \ 34 | 35 | DEVDOCS = docs/dev/API 36 | 37 | GFX = gfx/green-h.png \ 38 | gfx/green-v.png \ 39 | gfx/blue-h.png \ 40 | gfx/blue-v.png \ 41 | gfx/yellow-h.png \ 42 | gfx/yellow-v.png \ 43 | gfx/red-h.png \ 44 | gfx/red-v.png \ 45 | 46 | SCRIPTS = scripts/crontab \ 47 | scripts/dropegg.pl \ 48 | scripts/egg2mirc.awk \ 49 | scripts/eggdrop-pisg.tcl \ 50 | scripts/mirc2egg.sed \ 51 | scripts/sirc-timestamp.pl \ 52 | scripts/windows-ftp-upload.txt 53 | 54 | ADDALIAS = scripts/addalias/addalias.pl \ 55 | scripts/addalias/README 56 | 57 | PUM = scripts/pum/pum.pl \ 58 | scripts/pum/pum.conf 59 | 60 | MODULESDIR = modules 61 | 62 | MAIN_MODULE = $(MODULESDIR)/Pisg.pm 63 | 64 | PISG_MODULES = $(MODULESDIR)/Pisg/Common.pm \ 65 | $(MODULESDIR)/Pisg/HTMLGenerator.pm 66 | 67 | PARSER_MODULES = $(MODULESDIR)/Pisg/Parser/Logfile.pm 68 | 69 | FORMAT_MODULES = $(MODULESDIR)/Pisg/Parser/Format/axur.pm \ 70 | $(MODULESDIR)/Pisg/Parser/Format/bxlog.pm \ 71 | $(MODULESDIR)/Pisg/Parser/Format/bobot.pm \ 72 | $(MODULESDIR)/Pisg/Parser/Format/blootbot.pm \ 73 | $(MODULESDIR)/Pisg/Parser/Format/dancer.pm \ 74 | $(MODULESDIR)/Pisg/Parser/Format/dircproxy.pm \ 75 | $(MODULESDIR)/Pisg/Parser/Format/DCpp.pm \ 76 | $(MODULESDIR)/Pisg/Parser/Format/eggdrop.pm \ 77 | $(MODULESDIR)/Pisg/Parser/Format/energymech.pm \ 78 | $(MODULESDIR)/Pisg/Parser/Format/grufti.pm \ 79 | $(MODULESDIR)/Pisg/Parser/Format/hydra.pm \ 80 | $(MODULESDIR)/Pisg/Parser/Format/ircle.pm \ 81 | $(MODULESDIR)/Pisg/Parser/Format/infobot.pm \ 82 | $(MODULESDIR)/Pisg/Parser/Format/IRCAP.pm \ 83 | $(MODULESDIR)/Pisg/Parser/Format/irssi.pm \ 84 | $(MODULESDIR)/Pisg/Parser/Format/ircII.pm \ 85 | $(MODULESDIR)/Pisg/Parser/Format/javabot.pm \ 86 | $(MODULESDIR)/Pisg/Parser/Format/konversation.pm \ 87 | $(MODULESDIR)/Pisg/Parser/Format/kvirc.pm \ 88 | $(MODULESDIR)/Pisg/Parser/Format/lulubot.pm \ 89 | $(MODULESDIR)/Pisg/Parser/Format/oer.pm \ 90 | $(MODULESDIR)/Pisg/Parser/Format/mbot.pm \ 91 | $(MODULESDIR)/Pisg/Parser/Format/miau.pm \ 92 | $(MODULESDIR)/Pisg/Parser/Format/mIRC.pm \ 93 | $(MODULESDIR)/Pisg/Parser/Format/mIRC6.pm \ 94 | $(MODULESDIR)/Pisg/Parser/Format/mIRC6hack.pm \ 95 | $(MODULESDIR)/Pisg/Parser/Format/mozbot.pm \ 96 | $(MODULESDIR)/Pisg/Parser/Format/muh.pm \ 97 | $(MODULESDIR)/Pisg/Parser/Format/muh2.pm \ 98 | $(MODULESDIR)/Pisg/Parser/Format/moobot.pm \ 99 | $(MODULESDIR)/Pisg/Parser/Format/perlbot.pm \ 100 | $(MODULESDIR)/Pisg/Parser/Format/pircbot.pm \ 101 | $(MODULESDIR)/Pisg/Parser/Format/psybnc.pm \ 102 | $(MODULESDIR)/Pisg/Parser/Format/sirc.pm \ 103 | $(MODULESDIR)/Pisg/Parser/Format/supy.pm \ 104 | $(MODULESDIR)/Pisg/Parser/Format/virc98.pm \ 105 | $(MODULESDIR)/Pisg/Parser/Format/Vision.pm \ 106 | $(MODULESDIR)/Pisg/Parser/Format/Trillian.pm \ 107 | $(MODULESDIR)/Pisg/Parser/Format/Template.pm \ 108 | $(MODULESDIR)/Pisg/Parser/Format/RacBot.pm \ 109 | $(MODULESDIR)/Pisg/Parser/Format/rbot.pm \ 110 | $(MODULESDIR)/Pisg/Parser/Format/xchat.pm \ 111 | $(MODULESDIR)/Pisg/Parser/Format/winbot.pm \ 112 | $(MODULESDIR)/Pisg/Parser/Format/weechat.pm \ 113 | $(MODULESDIR)/Pisg/Parser/Format/weechat3.pm \ 114 | $(MODULESDIR)/Pisg/Parser/Format/zcbot.pm \ 115 | 116 | docs: 117 | $(MAKE) -C docs VERSION=$(VERSION) 118 | 119 | release: docs 120 | mkdir -p newrelease 121 | 122 | cat lang/readme.txt >> lang.txt 123 | cat lang/*.dat >> lang.txt 124 | 125 | mkdir $(DIRNAME) 126 | cp $(FILES) $(DIRNAME) 127 | 128 | mkdir $(DIRNAME)/scripts 129 | cp $(SCRIPTS) $(DIRNAME)/scripts 130 | 131 | mkdir $(DIRNAME)/gfx 132 | cp $(GFX) $(DIRNAME)/gfx 133 | 134 | mkdir $(DIRNAME)/docs 135 | cp -r $(DOCS) $(DIRNAME)/docs 136 | 137 | mkdir $(DIRNAME)/layout 138 | cp layout/*.css $(DIRNAME)/layout 139 | 140 | mkdir $(DIRNAME)/docs/dev 141 | cp $(DEVDOCS) $(DIRNAME)/docs/dev 142 | 143 | mkdir $(DIRNAME)/scripts/addalias 144 | cp $(ADDALIAS) $(DIRNAME)/scripts/addalias 145 | 146 | mkdir $(DIRNAME)/scripts/pum 147 | cp $(PUM) $(DIRNAME)/scripts/pum 148 | 149 | mkdir $(DIRNAME)/$(MODULESDIR) 150 | 151 | mkdir $(DIRNAME)/$(MODULESDIR)/Pisg 152 | mkdir $(DIRNAME)/$(MODULESDIR)/Pisg/Parser 153 | mkdir $(DIRNAME)/$(MODULESDIR)/Pisg/Parser/Format 154 | cp $(MAIN_MODULE) $(DIRNAME)/$(MODULESDIR)/ 155 | cp $(PISG_MODULES) $(DIRNAME)/$(MODULESDIR)/Pisg/ 156 | cp $(PARSER_MODULES) $(DIRNAME)/$(MODULESDIR)/Pisg/Parser 157 | cp $(FORMAT_MODULES) $(DIRNAME)/$(MODULESDIR)/Pisg/Parser/Format 158 | 159 | perl -i -pe 's/^(.*version => ")[^"]*(".*)/$${1}$(VERSION)$${2}/' $(DIRNAME)/$(MODULESDIR)/Pisg.pm 160 | 161 | tar zcfv newrelease/$(TARFILE) $(DIRNAME) 162 | zip -r pisg $(DIRNAME) 163 | mv pisg.zip newrelease/$(ZIPFILE) 164 | mv $(DIRNAME) newrelease 165 | 166 | clean: 167 | cd docs && make clean 168 | rm -f lang.txt 169 | rm -rf newrelease/$(TARFILE) 170 | rm -rf newrelease/$(ZIPFILE) 171 | rm -rf newrelease/$(DIRNAME) 172 | rm -rf $(DIRNAME) 173 | 174 | distclean: clean 175 | rm -rf newrelease/ 176 | 177 | .PHONY: all release docs clean distclean 178 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Perl IRC Statistics Generator (pisg) is a Perl script which takes IRC 2 | logfiles and turns them into nice looking stats, which can be amusing to 3 | show for the users of your channel. 4 | 5 | The supported logfile formats is explained in the FORMATS file included with 6 | this distribution in the 'docs' directory. 7 | 8 | SETTING UP PISG 9 | --------------- 10 | Full documentation for pisg is located in 'docs/pisg-doc.txt' and 11 | 'docs/html/index.html' for a HTML version. 12 | 13 | Quick usage instructions below: 14 | 15 | It's quite simple to set up pisg. You have 2 choices: 16 | 17 | * Set settings from commandline (try pisg --help) 18 | * Configure pisg from the pisg.cfg file (more flexible and configurable) 19 | 20 | If you look in the example pisg.cfg, you will see a small working sample 21 | where you can insert your own data. 22 | 23 | The commandline version has the disadvantage that you can only set up one 24 | channel to be run. 25 | 26 | RUNNING PISG 27 | ------------ 28 | With ZNC, you might need to use this: 29 | /msg *status loadmod log -sanitize /home/YOURUSER/.znc/users/YOURUSER/moddata/log/$NETWORK/$WINDOW.log 30 | (edit YOURUSER) with your own info. This will enable logging in a clean way for PISG to read them 31 | 32 | If you have setup everything inside the config file, then you just need to 33 | run it. If you're on a Linux/BSD/Unix system, this should do the work: 34 | 35 | $ ./pisg 36 | 37 | Running pisg like this will just use the settings in pisg.cfg. 38 | 39 | If you want to specify things on commandline instead of in the config file, 40 | you could do: 41 | 42 | $ ./pisg -ch \#channel -l logfile.log -f mIRC -o index.html 43 | 44 | The syntax and options is explained when doing: 45 | 46 | $ ./pisg --help 47 | 48 | Setting settings on commandline, will override the relevant settings in 49 | pisg.cfg. 50 | 51 | NOTES 52 | ----- 53 | There is some graphics in the gfx/ folder which pisg uses, you should put 54 | these in the same directory as your stats file(s) or use the 'PicLocation' 55 | configuration option. 56 | 57 | The stats will look best with a logfile which is at least one day long. 58 | Some stats (like smilies, exclamation marks, etc) doesn't get counted before 59 | a special amount of time. 60 | 61 | pisg supports multiple languages so the texts on the stats page will 62 | be in your own language; look in lang.txt to see the supported languages. 63 | The language can be changed from within the pisg.cfg file. 64 | 65 | If you have any corrections to the language file, or you want to add a new 66 | translation, then send it to the mailing list. 67 | 68 | CONTACT INFORMATION 69 | ------------------- 70 | If you have any issues with pisg, such as problems with installing or 71 | running pisg, then join us on the freenode IRC Network: chat.freenode.net on #pisg 72 | 73 | The pisg homepage is located at http://pisg.github.io/. 74 | 75 | Have fun :) 76 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS := pisg-doc.txt pisg-doc.html pisg-faq.html pisg-formats.html pisg.1 2 | VERSION := $(shell grep "version =>" ../modules/Pisg.pm | sed 's/[^"]*"\([^"]*\)+CVS".*/\1/') 3 | 4 | all: $(TARGETS) 5 | 6 | pisg-doc.xml: .version 7 | .version: ../modules/Pisg.pm 8 | perl -i -pe 's/(pisg ).*(documentation<\/title>)/$${1}$(VERSION) $${2}/' pisg-doc.xml 9 | touch .version 10 | 11 | pisg-doc.txt: pisg-doc.xml 12 | docbook2txt pisg-doc.xml 13 | mv pisg-doc.txt pisg-tmp.txt 14 | cat pisg-tmp.txt | ./modifytxt.pl > pisg-doc.txt 15 | rm -f pisg-tmp.txt 16 | 17 | pisg-doc.html: pisg-doc.xml 18 | docbook2html pisg-doc.xml -V "%use-id-as-filename%" -V nochunks 19 | 20 | pisg-faq.html: pisg-faq.txt 21 | a2x -f xhtml pisg-faq.txt 22 | 23 | pisg-formats.html: FORMATS 24 | a2x -f xhtml FORMATS 25 | mv FORMATS.html pisg-formats.html 26 | 27 | pisg.1: pisg.sgml 28 | docbook2man $< > $@ 29 | 30 | clean: 31 | rm -f $(TARGETS) .version 32 | 33 | .PHONY: all clean 34 | 35 | # vim:noexpandtab: 36 | -------------------------------------------------------------------------------- /docs/dev/API: -------------------------------------------------------------------------------- 1 | With the advent of the modules, an API becomes necessary. This 2 | file is the place to document anything along those lines. 3 | 4 | The main parts of pisg operate by passing around a %stats hash. That 5 | hash is pretty big: 6 | 7 | Key Type Index Description 8 | -------------------------------------------------------------------------- 9 | words hash <nick> Number of words typed by given nick. 10 | wordcounts hash <word> Number of times given word was used. 11 | wordnicks hash <word> The last nick to use the given word. 12 | times hash <hour> Number of lines typed in the channel during 13 | the given hour (0..23). 14 | lines hash <nick> Number of lines typed by the given nick (both 15 | "normal" and action lines). 16 | line_times hash <nick> $line_times{nick}[index] index ranges from 17 | 0 to 3 and contains a count of the number of 18 | lines typed by that nick in the given time 19 | period. Each index is a 6-hour block. 20 | (e.g. 3 is from 18:00 to 23:59.) 21 | monologues hash <nick> Number of times the given nick had a 22 | monologue. 23 | sayings hash <nick> Random normal line from the given nick. 24 | questions hash <nick> Number of lines from the given nick that 25 | ended in question marks. 26 | shouts hash <nick> Number of lines ending in exclamation points. 27 | allcaps hash <nick> Number of lines in ALL CAPS. 28 | allcaplines hash <nick> Random line containing ALL CAPS. 29 | foul hash <nick> Number of lines containing foul words. 30 | foullines hash <nick> Lines containing foul words. 31 | smiles hash <nick> Number of lines containing smiling faces. 32 | frowns hash <nick> Number of lines containing sad faces. 33 | urlcounts hash <url> Number of times each URL was mentioned. 34 | urlnicks hash <url> Last nick to mention each URL. 35 | lengths hash <nick> Total length of all lines from the given 36 | nick. 37 | actions hash <nick> Number of actions. 38 | actionlines hash <nick> Random action line. 39 | violence hash <nick> Number of times the given nick attacked 40 | someone else. 41 | violencelines hash <nick> Random example of the given nick attacking 42 | someone. 43 | attacked hash <nick> Number of times the given nick was attacked. 44 | attackedlines hash <nick> Ramdom example of the given nick being 45 | attacked. 46 | gaveops hash <nick> Number of times the given nick granted ops. 47 | tookops hash <nick> Number of times the given nick removed ops. 48 | gavevoice hash <nick> Number of times the given nick granted voice. 49 | tookvoice hash <nick> Number of times the given nick removed voice. 50 | kicked hash <nick> Number of times the given nick kicked 51 | someone. 52 | gotkicked hash <nick> Number of times the give nick was kicked. 53 | kicklines hash <nick> Random example of the given nick being 54 | kicked. 55 | joins hash <nick> Number of times the given nick joined the 56 | channel. 57 | topics array Each array element is a hash with the 58 | following indices: 59 | topic - The new channel topic. 60 | nick - The person who set the topic. 61 | hour - The hour in which the change took 62 | place. 63 | min - The minute in which the change took 64 | place. 65 | days scalar Number of days the reporting period spanned. 66 | totallines scalar Total number of lines seen in file(s). 67 | parsedlines scalar Total number of parseable lines (normal, 68 | action, and third) seen in channel. 69 | processtime hash A hash containing 'hours', 'mins' and 'secs', 70 | describing the time elapsed while processing 71 | this channel. 72 | nicks hash A hash containing all nicks a user had through 73 | a logfile. The keys are the nicks, and the values 74 | is an array with their alternative nicknames. 75 | -------------------------------------------------------------------------------- /docs/modifytxt.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | # This is a small script which modifies the outputted txt docs into a more 4 | # readable one, by adding some lines to the output. 5 | 6 | use strict; 7 | 8 | my $cacheword; 9 | while (<>) { 10 | if ($_ =~ /^(\w+)$/ && $_ !~ /^Name$/) { 11 | $cacheword = $1; 12 | } 13 | if ($_ =~ /^Name$/) { 14 | print "-----------------------\n$cacheword option\n-----------------------\n"; 15 | } elsif ($_ =~ /^Description$/) { 16 | print "Description\n-----------\n"; 17 | } elsif ($_ =~ /^Synopsis$/) { 18 | print "Synopsis\n--------\n"; 19 | } else { 20 | print $_; 21 | } 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /docs/pisg-faq.txt: -------------------------------------------------------------------------------- 1 | Pisg FAQ 2 | ======== 3 | 4 | My stats only show lots of numbers instead of colored bars 5 | ---------------------------------------------------------- 6 | 7 | You forgot to copy the .png files from the gfx directory (blue-h.png etc) to 8 | your web server, or put them in the wrong location. If you right-click on the 9 | numbers, and select "View Image", you will most likely see a 404 error message. 10 | Put the .png files in that location. 11 | 12 | Alternatively, you can use <set PicLocation="gfx/"> to set other path. 13 | 14 | Can I use pisg as bot for my channel? 15 | ------------------------------------- 16 | 17 | No. Pisg will only read log files that some other program has written. Pick an 18 | IRC client or bot from the list of supported formats. 19 | -------------------------------------------------------------------------------- /lang.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang.txt -------------------------------------------------------------------------------- /lang/bg.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/bg.dat -------------------------------------------------------------------------------- /lang/ca.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/ca.dat -------------------------------------------------------------------------------- /lang/cz.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/cz.dat -------------------------------------------------------------------------------- /lang/da.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/da.dat -------------------------------------------------------------------------------- /lang/de.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/de.dat -------------------------------------------------------------------------------- /lang/ee.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/ee.dat -------------------------------------------------------------------------------- /lang/fi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/fi.dat -------------------------------------------------------------------------------- /lang/fr.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/fr.dat -------------------------------------------------------------------------------- /lang/gr.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/gr.dat -------------------------------------------------------------------------------- /lang/he.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/he.dat -------------------------------------------------------------------------------- /lang/hu.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/hu.dat -------------------------------------------------------------------------------- /lang/is.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/is.dat -------------------------------------------------------------------------------- /lang/it.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/it.dat -------------------------------------------------------------------------------- /lang/nl.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/nl.dat -------------------------------------------------------------------------------- /lang/no.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/no.dat -------------------------------------------------------------------------------- /lang/pt.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/pt.dat -------------------------------------------------------------------------------- /lang/pt_br.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/pt_br.dat -------------------------------------------------------------------------------- /lang/readme.txt: -------------------------------------------------------------------------------- 1 | # To use a translation, set 'lang' in the pisg configuration file, e.g.: 2 | # 3 | # <set lang="DA"> 4 | # 5 | # to get a page in Danish. 6 | # 7 | # Translations in this file with current maintainers: 8 | # 9 | # (EN) English 10 | # (DE) German - Christoph Berg <cb@df7cb.de> (2005-07-28) 11 | # (NO) Norwegian - Andreas Blaafladt <andreas@blaafladt.no> 12 | # (PT) Portuguese - MrWho <mrwho@softhome.net> 13 | # (PT_BR) Portuguese/BR(Brazil) - francisco lopes <falmp@terra.com.br> 14 | # (DA) Danish - Morten Brix Pedersen <morten at wtf dot dk> 15 | # (FR) French - Molator <molator@ifrance.com> 16 | # (ES) Spanish - Sheuron Azxe <xeron@cfutura.com> 17 | # last update: 2005-01-14 by Anonymous 18 | # (PL) Polish - Gandalf the Grey <gandalf@irc.pl> 19 | # (NL_BE) Flemish - Tiniduske <tiniduske@telenet.be> (2004-10-15) 20 | # (NL) Dutch - Jeroen van Nimwegen <jeroen.van.nimwegen@gmail.com> (2005-02-17) 21 | # (SE) Swedish - Andreas Henriksson <andreas@fjortis.info> (2005-01-12) 22 | # (FI) Finnish - Kirler@paincreators <kirler@paincreators.net> 23 | # last update: Mikko Nissinen <gwadj79@gmail.com> (2005-07-10) 24 | # (SI) Slovenian - Ales Tepina <??> (2005-01-09: bounces) 25 | # (HU) Hungarian - Gyuri Horak <??> (2005-01-09: bounces) 26 | # (EE) Estonian - Hannes Tarien <comcute@perses.net> (2005-09-06) 27 | # (IT) Italian - Michele Venturi (2005-04-29) 28 | # (CA) Catalan - Nikoru Kimochi <??> (2005-01-09: bounces) 29 | # (TR) Turkish - cti- <??> (2005-01-09: bounces) 30 | # (RO) Romanian - Parcalabior Vald <vlad@ifrance.com> 31 | # (IS) Icelandic - Birkir Hreinsson <dkf@visir.is> 32 | # (CZ) Czech - Jaroslav Ostadal <??> (2005-01-14: bounces) 33 | # last update: Pavel Kouril <paulway@gmail.com> (2006-04-30) 34 | # (SK) Slovak - Gabriel Svajko <snowman@ew.sk> 35 | # (RU) Russian - Anton Tretiakov <manager@ykt.ru> 36 | # (GR) Greek - Konstantinos Tzanidis <erebus@irc.gr> (2005-07-22) 37 | # (HE) Hebrew - Shimi <shimi@shimi.net> 38 | # (BG) Bulgarian - Dimitar <m9ck@sofiaclub.com> (2005-01-24) 39 | # last update: elseif <elseif@mail.bg> (2005-02-19) 40 | # (SR_EC) Serbian cyrillic - Sasa Stefanovic <djevrek@gmail.com> (2006-07-22) 41 | # (SR_EL) Serbian latin - Sasa Stefanovic <djevrek@gmail.com> (2006-07-22) 42 | # (SQ) Albanian - h3li0s <elbo_79@yahoo.it> 43 | # 44 | # A list of charsets is at http://www.w3.org/International/O-charset-list.html. 45 | -------------------------------------------------------------------------------- /lang/ro.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/ro.dat -------------------------------------------------------------------------------- /lang/ru.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/ru.dat -------------------------------------------------------------------------------- /lang/se.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/se.dat -------------------------------------------------------------------------------- /lang/si.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/si.dat -------------------------------------------------------------------------------- /lang/sk.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/sk.dat -------------------------------------------------------------------------------- /lang/sq.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/sq.dat -------------------------------------------------------------------------------- /lang/tr.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/lang/tr.dat -------------------------------------------------------------------------------- /layout/darkgalaxy.css: -------------------------------------------------------------------------------- 1 | /* to obtain a better result, then set the these pisg options: 2 | * <set hicell="#1a354d"> 3 | * <set hicell2="#444444"> 4 | */ 5 | 6 | A 7 | { 8 | TEXT-DECORATION: none 9 | } 10 | A:link 11 | { 12 | COLOR: #b5c6d5 13 | } 14 | A:visited 15 | { 16 | COLOR: #b5c6d5 17 | } 18 | A:hover 19 | { 20 | COLOR: #ffffff; 21 | TEXT-DECORATION: underline 22 | } 23 | A.background 24 | { 25 | TEXT-DECORATION: none 26 | } 27 | A.background:link 28 | { 29 | COLOR: #b5c6d5 30 | } 31 | A.background:visited 32 | { 33 | COLOR: #b5c6d5 34 | } 35 | A.background:hover 36 | { 37 | COLOR: #ffffff; 38 | TEXT-DECORATION: underline 39 | } 40 | BODY 41 | { 42 | FONT-SIZE: 13px; 43 | COLOR: #dedede; 44 | FONT-FAMILY: Verdana, Arial, sans-serif; 45 | BACKGROUND-COLOR: #000000 46 | } 47 | #green-h { 48 | height: 15px; 49 | background-repeat: repeat-x; 50 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px 0px; } 51 | #red-h { 52 | height: 15px; 53 | background-repeat: repeat-x; 54 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -15px; } 55 | #yellow-h { 56 | height: 15px; 57 | background-repeat: repeat-x; 58 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -30px; } 59 | #blue-h { 60 | height: 15px; 61 | background-repeat: repeat-x; 62 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -45px; } 63 | 64 | #green-v { 65 | width: 15px; 66 | background-repeat: repeat-y; 67 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) 0px 0px; } 68 | #red-v { 69 | width: 15px; 70 | background-repeat: repeat-y; 71 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -15px 0px; } 72 | #yellow-v { 73 | width: 15px; 74 | background-repeat: repeat-y; 75 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -30px 0px; } 76 | #blue-v { 77 | width: 15px; 78 | background-repeat: repeat-y; 79 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -45px 0px; } 80 | TD 81 | { 82 | border-radius: 5px; 83 | FONT-SIZE: 13px; 84 | COLOR: #dedede; 85 | FONT-FAMILY: Verdana, Arial, sans-serif; 86 | TEXT-ALIGN: left 87 | } 88 | .title 89 | { 90 | FONT-WEIGHT: bold; 91 | FONT-SIZE: 16px; 92 | FONT-FAMILY: Tahoma, Arial, sans-serif 93 | } 94 | .headtext 95 | { 96 | border-radius: 8px; 97 | FONT-WEIGHT: bold; 98 | COLOR: #dedede; 99 | BACKGROUND-COLOR: #6d0d14; 100 | TEXT-ALIGN: center 101 | } 102 | .headlinebg 103 | { 104 | border-radius: 8px; 105 | BACKGROUND-COLOR: #6d0d14 106 | } 107 | .tdtop 108 | { 109 | BACKGROUND-COLOR: #718292 110 | } 111 | .hicell 112 | { 113 | BACKGROUND-COLOR: #19354e 114 | } 115 | .hicell10 116 | { 117 | FONT-SIZE: 10px; 118 | BACKGROUND-COLOR: #444444 119 | } 120 | .rankc 121 | { 122 | BACKGROUND-COLOR: #444444 123 | } 124 | .hirankc 125 | { 126 | FONT-WEIGHT: bold; 127 | BACKGROUND-COLOR: #545454 128 | } 129 | .rankc10 130 | { 131 | FONT-SIZE: 10px; 132 | BACKGROUND-COLOR: #444444 133 | } 134 | .rankc10center 135 | { 136 | FONT-SIZE: 10px; 137 | BACKGROUND-COLOR: #444444; 138 | TEXT-ALIGN: center 139 | } 140 | .hirankc10center 141 | { 142 | FONT-WEIGHT: bold; 143 | FONT-SIZE: 10px; 144 | BACKGROUND-COLOR: #545454; 145 | TEXT-ALIGN: center 146 | } 147 | .small 148 | { 149 | FONT-SIZE: 10px; 150 | FONT-FAMILY: Verdana, Arial, sans-serif 151 | } 152 | .asmall 153 | { 154 | FONT-SIZE: 10px; 155 | COLOR: #dedede; 156 | FONT-FAMILY: "Arial narrow", Arial, sans-serif 157 | TEXT-ALIGN: center 158 | } 159 | -------------------------------------------------------------------------------- /layout/darkred.css: -------------------------------------------------------------------------------- 1 | /* <set hicell="#444444"> <set hicell2="#999999"> */ 2 | a { 3 | text-decoration:none; 4 | } 5 | a:link { 6 | color:#990000; 7 | } 8 | a:visited { 9 | color:#990000; 10 | } 11 | a:hover { 12 | text-decoration:underline; 13 | color:#990000; 14 | } 15 | 16 | a.background { 17 | text-decoration:none; 18 | } 19 | 20 | a.background:link { 21 | color:#990000; 22 | } 23 | 24 | a.background:visited { 25 | color:#990000; 26 | } 27 | 28 | a.background:hover { 29 | text-decoration:underline; 30 | color:#990000; 31 | } 32 | 33 | body { 34 | background-color:black; 35 | font-family: verdana, arial, sans-serif; 36 | font-size:13px; 37 | color:white; 38 | } 39 | 40 | #green-h { 41 | height: 15px; 42 | background-repeat: repeat-x; 43 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px 0px; } 44 | #red-h { 45 | height: 15px; 46 | background-repeat: repeat-x; 47 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -15px; } 48 | #yellow-h { 49 | height: 15px; 50 | background-repeat: repeat-x; 51 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -30px; } 52 | #blue-h { 53 | height: 15px; 54 | background-repeat: repeat-x; 55 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -45px; } 56 | 57 | #green-v { 58 | width: 15px; 59 | background-repeat: repeat-y; 60 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) 0px 0px; } 61 | #red-v { 62 | width: 15px; 63 | background-repeat: repeat-y; 64 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -15px 0px; } 65 | #yellow-v { 66 | width: 15px; 67 | background-repeat: repeat-y; 68 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -30px 0px; } 69 | #blue-v { 70 | width: 15px; 71 | background-repeat: repeat-y; 72 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -45px 0px; } 73 | 74 | table { 75 | border-collapse:collapse; 76 | } 77 | 78 | td { 79 | border-radius: 5px; 80 | font-family: verdana, arial, sans-serif; 81 | font-size: 13px; 82 | color:white; 83 | text-align:left; 84 | border-color:black; 85 | border-style:solid; 86 | border-width:1px; 87 | } 88 | 89 | .title { 90 | font-family: tahoma, arial, sans-serif; 91 | font-size: 16px; 92 | font-weight:bold; 93 | } 94 | 95 | .headtext { 96 | position: relative; 97 | top: -1%; 98 | left: -0.05%; 99 | border-radius: 10px; 100 | font-family: verdana, arial, sans-serif; 101 | font-size:13px; 102 | color:white; 103 | background-color:#444444; 104 | text-align:center; 105 | border-width: 0px; 106 | font-weight:bold; 107 | } 108 | 109 | .headlinebg { 110 | border-radius: 10.5px; 111 | background-color:#990000; 112 | } 113 | 114 | .tdtop { 115 | background-color:#444444; 116 | color:white; 117 | font-weight:normal; 118 | } 119 | 120 | .hicell { 121 | background-color:#AAAAAA; 122 | color:black; 123 | } 124 | 125 | .hicell10 { 126 | background-color:#AAAAAA; 127 | font-size:10px; 128 | color:black; 129 | } 130 | 131 | .rankc { 132 | background-color:#AAAAAA; 133 | color:black; 134 | } 135 | 136 | .hirankc { 137 | background-color:#444444; 138 | font-weight:bold; 139 | color:white; 140 | } 141 | 142 | .rankc10 { 143 | background-color:#AAAAAA; 144 | font-size:10px; 145 | color:black; 146 | } 147 | 148 | .rankc10center { 149 | background-color:#AAAAAA; 150 | font-size:10px; 151 | text-align:center; 152 | color:black; 153 | } 154 | 155 | .hirankc10center { 156 | background-color:#AAAAAA; 157 | font-weight:bold; 158 | font-size:10px; 159 | text-align:center; 160 | color:black; 161 | } 162 | 163 | .small { 164 | font-family: verdana,arial, sans-serif; 165 | font-size:10px; 166 | } 167 | 168 | .asmall { 169 | font-family: arial narrow, sans-serif; 170 | font-size:10px; 171 | color:white; 172 | } 173 | 174 | .asmallcenter { 175 | font-family: arial narrow, sans-serif; 176 | font-size:10px; 177 | color:black; 178 | text-align:center; 179 | } 180 | 181 | -------------------------------------------------------------------------------- /layout/justgrey.css: -------------------------------------------------------------------------------- 1 | /* to obtain a better result, then set the these pisg options: 2 | * <set hicell="#607080"> 3 | * <set hicell2="#8090a0"> 4 | * 5 | * Theme by ICU (me at 1cu.de) 6 | */ 7 | 8 | a 9 | { 10 | text-decoration: none; 11 | } 12 | a:link 13 | { 14 | color: #bdcddd; 15 | } 16 | a:visited 17 | { 18 | color: #bdcddd; 19 | } 20 | a:hover 21 | { 22 | color: #bdcddd; 23 | text-decoration: underline; 24 | font-weight: none; 25 | } 26 | a.background 27 | { 28 | color: none; 29 | text-decoration: none; 30 | } 31 | a.background:link 32 | { 33 | color: #314151; 34 | } 35 | a.background:visited 36 | { 37 | color: #415161; 38 | } 39 | a.background:hover 40 | { 41 | color: #003c60; 42 | text-decoration: underline; 43 | } 44 | body 45 | { 46 | font-size: 13px; 47 | color: white; 48 | font-family: verdana, arial, sans-serif; 49 | background-color: #647684; 50 | scrollbar-face-color: #647684; 51 | scrollbar-shadow-color: black; 52 | scrollbar-highlight-color: #647684; 53 | scrollbar-3dlight-color: black; 54 | scrollbar-darkshadow-color: #647684; 55 | scrollbar-track-color: #647684; 56 | scrollbar-arrow-color: black; 57 | } 58 | 59 | #green-h { 60 | height: 15px; 61 | background-repeat: repeat-x; 62 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px 0px; } 63 | #red-h { 64 | height: 15px; 65 | background-repeat: repeat-x; 66 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -15px; } 67 | #yellow-h { 68 | height: 15px; 69 | background-repeat: repeat-x; 70 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -30px; } 71 | #blue-h { 72 | height: 15px; 73 | background-repeat: repeat-x; 74 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -45px; } 75 | 76 | #green-v { 77 | width: 15px; 78 | background-repeat: repeat-y; 79 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) 0px 0px; } 80 | #red-v { 81 | width: 15px; 82 | background-repeat: repeat-y; 83 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -15px 0px; } 84 | #yellow-v { 85 | width: 15px; 86 | background-repeat: repeat-y; 87 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -30px 0px; } 88 | #blue-v { 89 | width: 15px; 90 | background-repeat: repeat-y; 91 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -45px 0px; } 92 | 93 | td 94 | { 95 | border-radius: 5px; 96 | font-size: 13px; 97 | color: white; 98 | font-family: verdana, arial, sans-serif; 99 | text-align: left; 100 | } 101 | .title 102 | { 103 | color: white; 104 | font-weight: bold; 105 | font-size: 16px; 106 | font-family: tahoma, arial, sans-serif; 107 | } 108 | .headtext 109 | { 110 | border-radius: 8px; 111 | font-weight: bold; 112 | color: white; 113 | background-color: none; 114 | text-align: center; 115 | } 116 | .headlinebg 117 | { 118 | border-radius: 8px; 119 | background-color: #344454; 120 | } 121 | .tdtop 122 | { 123 | background-color: #445464; 124 | } 125 | .hicell 126 | { 127 | background-color: #748494; 128 | } 129 | .hicell10 130 | { 131 | font-size: 10px; 132 | background-color: #94a4b4; 133 | } 134 | .rankc 135 | { 136 | background-color: #748494; 137 | } 138 | .hirankc 139 | { 140 | font-weight: bold; 141 | background-color: #94a4b4; 142 | } 143 | .rankc10 144 | { 145 | font-size: 10px; 146 | background-color: #748494; 147 | } 148 | .rankc10center 149 | { 150 | font-size: 10px; 151 | background-color: #748494; 152 | text-align: center; 153 | } 154 | .hirankc10center 155 | { 156 | font-weight: bold; 157 | font-size: 10px; 158 | background-color: #94a4b4; 159 | text-align: center; 160 | } 161 | .small 162 | { 163 | font-size: 10px; 164 | font-family: verdana, arial, sans-serif; 165 | } 166 | .asmall 167 | { 168 | font-size: 10px; 169 | color: white; 170 | font-family: "arial narrow", arial, sans-serif; 171 | text-align: center; 172 | } 173 | 174 | .male, .male a { 175 | color: #0000c7; 176 | } 177 | 178 | .female, .female a { 179 | color: #93006a; 180 | } 181 | 182 | .bot, .bot a { 183 | color: black; 184 | } 185 | 186 | -------------------------------------------------------------------------------- /layout/new.css: -------------------------------------------------------------------------------- 1 | 2 | a { 3 | text-decoration: none; 4 | font-weight: bold; 5 | } 6 | a:link { 7 | color: #015d82; 8 | } 9 | a:visited { 10 | color: #009fb2; 11 | } 12 | 13 | a:hover { 14 | text-decoration: underline; 15 | color: #0078a8; 16 | } 17 | 18 | /* Autres liens (bas de page) */ 19 | a.background { 20 | text-decoration: none; 21 | } 22 | 23 | a.background:link { 24 | color: #002597; 25 | } 26 | 27 | a.background:visited { 28 | color: #002597; 29 | } 30 | 31 | a.background:hover { 32 | text-decoration: underline; 33 | color: #002597; 34 | } 35 | 36 | body { 37 | background-color: #d7f4ff; 38 | font-family: Verdana, Arial, sans-serif; 39 | font-size: 13px; 40 | } 41 | 42 | #green-h { 43 | height: 15px; 44 | background-repeat: repeat-x; 45 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px 0px; } 46 | #red-h { 47 | height: 15px; 48 | background-repeat: repeat-x; 49 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -15px; } 50 | #yellow-h { 51 | height: 15px; 52 | background-repeat: repeat-x; 53 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -30px; } 54 | #blue-h { 55 | height: 15px; 56 | background-repeat: repeat-x; 57 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -45px; } 58 | 59 | #green-v { 60 | width: 15px; 61 | background-repeat: repeat-y; 62 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) 0px 0px; } 63 | #red-v { 64 | width: 15px; 65 | background-repeat: repeat-y; 66 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -15px 0px; } 67 | #yellow-v { 68 | width: 15px; 69 | background-repeat: repeat-y; 70 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -30px 0px; } 71 | #blue-v { 72 | width: 15px; 73 | background-repeat: repeat-y; 74 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -45px 0px; } 75 | 76 | td { 77 | border-radius: 5px; 78 | font-family: Verdana, Arial, sans-serif; 79 | font-size: 13px; 80 | text-align: left; 81 | } 82 | 83 | .male, .male a { 84 | color: #0000DD; 85 | } 86 | 87 | .female, .female a { 88 | color: #f013c5; 89 | } 90 | 91 | .bot, .bot a { 92 | color: #339933; 93 | } 94 | 95 | .title { 96 | font-family: verdana, Arial, sans-serif; 97 | font-size: 16px; 98 | font-weight: bold; 99 | } 100 | 101 | /* Les titres des rubriques */ 102 | .headtext { 103 | border-radius: 8px; 104 | color: #000000; 105 | font-weight: bold; 106 | font-size: 14px; 107 | text-align: center; 108 | background-color: #f0802b; 109 | } 110 | 111 | /* Bords des titres */ 112 | .headlinebg { 113 | border-radius: 8px; 114 | background-color: #000000; 115 | } 116 | 117 | /* Les sous-titres des rubriques */ 118 | .tdtop { 119 | background-color: #bbbbbb; 120 | color: #000000; 121 | } 122 | 123 | /* Cellules "Big Numbers" */ 124 | .hicell { 125 | background-color: #dddddd; 126 | } 127 | 128 | /* Cellules "Users with most nicknames" */ 129 | .hicell10 { 130 | background-color: #dddddd; 131 | font-size: 10px; 132 | } 133 | 134 | /* Nombres des listes (2+) */ 135 | .rankc { 136 | background-color: #bbbbbb; 137 | } 138 | 139 | /* Nombres des listes (1) */ 140 | .hirankc { 141 | background-color: #999999; 142 | font-weight: bold; 143 | } 144 | 145 | 146 | .rankc10 { 147 | background-color: #cccccc; 148 | font-size: 10px; 149 | } 150 | 151 | /* heure autre que la plus frequentee */ 152 | .rankc10center { 153 | background-color: #dddddd; 154 | font-size: 10px; 155 | text-align: center; 156 | } 157 | 158 | /* heure la plus frequentee */ 159 | .hirankc10center { 160 | background-color: #999999; 161 | color: #000000; 162 | font-weight: bold; 163 | font-size: 10px; 164 | text-align: center; 165 | } 166 | 167 | .small { 168 | font-family: Verdana, Arial, sans-serif; 169 | font-size: 10px; 170 | } 171 | 172 | .asmall { 173 | font-family: Verdana, Arial, sans-serif; 174 | font-size: 10px; 175 | text-align: center; 176 | } 177 | -------------------------------------------------------------------------------- /layout/ocean.css: -------------------------------------------------------------------------------- 1 | /* Ocean colorscheme made by: Mikko Nissinen <Gwadj> 2 | * To see it in action go to http://www.loiri.cjb.net 3 | * 4 | * 5 | * To obtain a better result, then set the these pisg options: 6 | * <set hicell="#3399cc"> 7 | * <set hicell2="#006699"> 8 | */ 9 | 10 | 11 | A 12 | { 13 | TEXT-DECORATION: none 14 | } 15 | A:link 16 | { 17 | COLOR: #99ccff 18 | } 19 | A:visited 20 | { 21 | COLOR: #99ccff 22 | } 23 | A:hover 24 | { 25 | COLOR: #ffffff; 26 | TEXT-DECORATION: underline 27 | } 28 | A.background 29 | { 30 | TEXT-DECORATION: none 31 | } 32 | A.background:link 33 | { 34 | COLOR: #3399cc 35 | } 36 | A.background:visited 37 | { 38 | COLOR: #3399cc 39 | } 40 | A.background:hover 41 | { 42 | COLOR: #99ccff; 43 | TEXT-DECORATION: underline 44 | } 45 | BODY 46 | { 47 | FONT-SIZE: 13px; 48 | COLOR: #dedede; 49 | FONT-FAMILY: Verdana, Arial, sans-serif; 50 | BACKGROUND-COLOR: #000033 51 | } 52 | 53 | #green-h { 54 | height: 15px; 55 | background-repeat: repeat-x; 56 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px 0px; } 57 | #red-h { 58 | height: 15px; 59 | background-repeat: repeat-x; 60 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -15px; } 61 | #yellow-h { 62 | height: 15px; 63 | background-repeat: repeat-x; 64 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -30px; } 65 | #blue-h { 66 | height: 15px; 67 | background-repeat: repeat-x; 68 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -45px; } 69 | 70 | #green-v { 71 | width: 15px; 72 | background-repeat: repeat-y; 73 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) 0px 0px; } 74 | #red-v { 75 | width: 15px; 76 | background-repeat: repeat-y; 77 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -15px 0px; } 78 | #yellow-v { 79 | width: 15px; 80 | background-repeat: repeat-y; 81 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -30px 0px; } 82 | #blue-v { 83 | width: 15px; 84 | background-repeat: repeat-y; 85 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -45px 0px; } 86 | 87 | TD 88 | { 89 | border-radius: 5px; 90 | FONT-SIZE: 13px; 91 | COLOR: #dedede; 92 | FONT-FAMILY: Verdana, Arial, sans-serif; 93 | TEXT-ALIGN: left 94 | } 95 | .title 96 | { 97 | FONT-WEIGHT: bold; 98 | FONT-SIZE: 16px; 99 | FONT-FAMILY: Tahoma, Arial, sans-serif 100 | } 101 | .headtext 102 | { 103 | border-radius: 8px; 104 | FONT-WEIGHT: bold; 105 | COLOR: #dedede; 106 | BACKGROUND-COLOR: #003366; 107 | TEXT-ALIGN: center 108 | } 109 | .headlinebg 110 | { 111 | border-radius: 8px; 112 | BACKGROUND-COLOR: #003366 113 | } 114 | .tdtop 115 | { 116 | BACKGROUND-COLOR: #336699 117 | } 118 | .hicell 119 | { 120 | BACKGROUND-COLOR: #000066 121 | } 122 | .hicell10 123 | { 124 | FONT-SIZE: 10px; 125 | BACKGROUND-COLOR: #336699 126 | } 127 | .rankc 128 | { 129 | BACKGROUND-COLOR: #336699 130 | } 131 | .hirankc 132 | { 133 | FONT-WEIGHT: bold; 134 | BACKGROUND-COLOR: #6699cc 135 | } 136 | .rankc10 137 | { 138 | FONT-SIZE: 10px; 139 | BACKGROUND-COLOR: #336699 140 | } 141 | .rankc10center 142 | { 143 | FONT-SIZE: 10px; 144 | BACKGROUND-COLOR: #336699; 145 | TEXT-ALIGN: center 146 | } 147 | .hirankc10center 148 | { 149 | FONT-WEIGHT: bold; 150 | FONT-SIZE: 10px; 151 | BACKGROUND-COLOR: #6699cc; 152 | TEXT-ALIGN: center 153 | } 154 | .small 155 | { 156 | FONT-SIZE: 10px; 157 | FONT-FAMILY: Verdana, Arial, sans-serif 158 | } 159 | .asmall 160 | { 161 | FONT-SIZE: 10px; 162 | COLOR: #dedede; 163 | FONT-FAMILY: "Arial narrow", Arial, sans-serif 164 | TEXT-ALIGN: center 165 | } 166 | 167 | -------------------------------------------------------------------------------- /layout/orange_grey.css: -------------------------------------------------------------------------------- 1 | /* 2 | CSS pour pisg 3 | maggic 2003/02/23 & 2003/04/26 4 | 5 | http://maggic.org 6 | */ 7 | 8 | /* Liens */ 9 | a { 10 | text-decoration: none; 11 | font-weight: bold; 12 | } 13 | a:link { 14 | color: #002597; 15 | } 16 | a:visited { 17 | color: #002597; 18 | } 19 | 20 | a:hover { 21 | text-decoration: underline; 22 | color: #002597; 23 | } 24 | 25 | /* Autres liens (bas de page) */ 26 | a.background { 27 | text-decoration: none; 28 | } 29 | 30 | a.background:link { 31 | color: #002597; 32 | } 33 | 34 | a.background:visited { 35 | color: #002597; 36 | } 37 | 38 | a.background:hover { 39 | text-decoration: underline; 40 | color: #002597; 41 | } 42 | 43 | body { 44 | background-color: #ededed; 45 | font-family: Verdana, Arial, sans-serif; 46 | font-size: 13px; 47 | } 48 | 49 | #green-h { 50 | height: 15px; 51 | background-repeat: repeat-x; 52 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px 0px; } 53 | #red-h { 54 | height: 15px; 55 | background-repeat: repeat-x; 56 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -15px; } 57 | #yellow-h { 58 | height: 15px; 59 | background-repeat: repeat-x; 60 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -30px; } 61 | #blue-h { 62 | height: 15px; 63 | background-repeat: repeat-x; 64 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -45px; } 65 | 66 | #green-v { 67 | width: 15px; 68 | background-repeat: repeat-y; 69 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) 0px 0px; } 70 | #red-v { 71 | width: 15px; 72 | background-repeat: repeat-y; 73 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -15px 0px; } 74 | #yellow-v { 75 | width: 15px; 76 | background-repeat: repeat-y; 77 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -30px 0px; } 78 | #blue-v { 79 | width: 15px; 80 | background-repeat: repeat-y; 81 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -45px 0px; } 82 | 83 | td { 84 | border-radius: 5px; 85 | font-family: Verdana, Arial, sans-serif; 86 | font-size: 13px; 87 | text-align: left; 88 | } 89 | 90 | .male, .male a { 91 | color: #0000DD; 92 | } 93 | 94 | .female, .female a { 95 | color: #DD3366; 96 | } 97 | 98 | .bot, .bot a { 99 | color: #00FFFF; 100 | } 101 | 102 | .title { 103 | font-family: verdana, Arial, sans-serif; 104 | font-size: 16px; 105 | font-weight: bold; 106 | } 107 | 108 | /* Les titres des rubriques */ 109 | .headtext { 110 | border-radius: 8px; 111 | color: #000000; 112 | font-weight: bold; 113 | font-size: 14px; 114 | text-align: center; 115 | background-color: #faa602; 116 | } 117 | 118 | /* Bords des titres */ 119 | .headlinebg { 120 | border-radius: 8px; 121 | background-color: #000000; 122 | } 123 | 124 | /* Les sous-titres des rubriques */ 125 | .tdtop { 126 | background-color: #bbbbbb; 127 | color: #000000; 128 | } 129 | 130 | /* Cellules "Big Numbers" */ 131 | .hicell { 132 | background-color: #dddddd; 133 | } 134 | 135 | /* Cellules "Users with most nicknames" */ 136 | .hicell10 { 137 | background-color: #dddddd; 138 | font-size: 10px; 139 | } 140 | 141 | /* Nombres des listes (2+) */ 142 | .rankc { 143 | background-color: #bbbbbb; 144 | } 145 | 146 | /* Nombres des listes (1) */ 147 | .hirankc { 148 | background-color: #999999; 149 | font-weight: bold; 150 | } 151 | 152 | 153 | .rankc10 { 154 | background-color: #cccccc; 155 | font-size: 10px; 156 | } 157 | 158 | /* heure autre que la plus frequentee */ 159 | .rankc10center { 160 | background-color: #dddddd; 161 | font-size: 10px; 162 | text-align: center; 163 | } 164 | 165 | /* heure la plus frequentee */ 166 | .hirankc10center { 167 | background-color: #999999; 168 | color: #000000; 169 | font-weight: bold; 170 | font-size: 10px; 171 | text-align: center; 172 | } 173 | 174 | .small { 175 | font-family: Verdana, Arial, sans-serif; 176 | font-size: 10px; 177 | } 178 | 179 | .asmall { 180 | font-family: Verdana, Arial, sans-serif; 181 | font-size: 10px; 182 | text-align: center; 183 | } 184 | -------------------------------------------------------------------------------- /layout/pisg.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | http://pisg.sourceforge.net/ pisg css layout by mite. (mite@megalixer.com) 4 | 5 | Here is a pisg layout I made which matches the official pisg website @ http://pisg.sourcefourge.net/ 6 | 7 | This file is edited from a modified version of one of the default layout files. 8 | I unfortuanantly don't recall which, as it's gone through many changes over the months. 9 | (My apologies.) 10 | 11 | I have tested this css with FireFox 0.8 and Internet Explorer 6.0 on Windows XP. 12 | Feel free to make changes to better suit other browsers. 13 | 14 | To obtain a better result, set the these pisg options in your cfg file: 15 | 16 | <set hicell="#EFEBEF"> 17 | <set hicell2="#FFFFFF"> 18 | 19 | 20 | Enjoy the scheme, 21 | mite (mite@megalixer.net) 22 | 23 | 24 | */ 25 | 26 | body { 27 | font-family: verdana, tahoma, sans-serif; 28 | font-size: 12px; 29 | color: black; 30 | color: #585858; 31 | background-color: #FFFFFF; 32 | } 33 | 34 | #green-h { 35 | height: 15px; 36 | background-repeat: repeat-x; 37 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px 0px; } 38 | #red-h { 39 | height: 15px; 40 | background-repeat: repeat-x; 41 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -15px; } 42 | #yellow-h { 43 | height: 15px; 44 | background-repeat: repeat-x; 45 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -30px; } 46 | #blue-h { 47 | height: 15px; 48 | background-repeat: repeat-x; 49 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -45px; } 50 | 51 | #green-v { 52 | width: 15px; 53 | background-repeat: repeat-y; 54 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) 0px 0px; } 55 | #red-v { 56 | width: 15px; 57 | background-repeat: repeat-y; 58 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -15px 0px; } 59 | #yellow-v { 60 | width: 15px; 61 | background-repeat: repeat-y; 62 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -30px 0px; } 63 | #blue-v { 64 | width: 15px; 65 | background-repeat: repeat-y; 66 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -45px 0px; } 67 | 68 | a:link { 69 | color: #0b407a; 70 | text-decoration: none; 71 | } 72 | 73 | a:hover { 74 | text-decoration: underline; 75 | } 76 | 77 | a:visited { 78 | color: #0b407a; 79 | text-decoration: none; 80 | } 81 | 82 | a:visited:hover { 83 | color: #0b407a; 84 | text-decoration: underline; 85 | } 86 | 87 | a.background:link { 88 | color: #0b407a; 89 | text-decoration: none; 90 | } 91 | 92 | a.background:hover { 93 | text-decoration: underline; 94 | } 95 | 96 | .asmall:link { 97 | text-decoration: none; 98 | } 99 | 100 | .asmall:hover { 101 | text-decoration: underline; 102 | } 103 | 104 | td { 105 | border-radius: 5px; 106 | background-color: white; 107 | font-size: 12px; 108 | font-family: verdana, tahoma, sans-serif; 109 | color: black; 110 | color: #585858; 111 | max-width: 100%; 112 | } 113 | 114 | .title { 115 | font-family: verdana, tahoma, sans-serif; 116 | font-weight: bold; 117 | font-size: 18px; 118 | } 119 | 120 | .headtext { 121 | border-radius: 8px; 122 | color: black; 123 | font-size: 15px; 124 | font-weight: bold; 125 | text-align: center; 126 | background-color: #FFFDBC; 127 | border-style: solid; 128 | border-width: 1px; 129 | border-color: #000000; 130 | } 131 | 132 | .tdtop { 133 | background-color: #F0F0F0; 134 | } 135 | 136 | 137 | .hicell { 138 | background-color: #F0F0F0; 139 | } 140 | 141 | .hicell10 { 142 | background-color: #F0F0F0; 143 | } 144 | 145 | .rankc { 146 | background-color: #F0F0F0; 147 | } 148 | 149 | .hirankc { 150 | background-color: #F0F0F0; 151 | font-weight: bold; 152 | } 153 | 154 | .rankc10center { 155 | background-color: #F0F0F0; 156 | font-size: 10px; 157 | text-align: center; 158 | } 159 | 160 | .hirankc10center { 161 | background-color: #F0F0F0; 162 | font-weight: bold; 163 | font-size: 10px; 164 | text-align: center; 165 | } 166 | 167 | .small { 168 | font-family: verdana, tahoma, sans-serif; 169 | } 170 | -------------------------------------------------------------------------------- /layout/softgreen.css: -------------------------------------------------------------------------------- 1 | /* 2 | This is a soft green theme that I created. It is the first of many that 3 | I 4 | will create. 5 | Visit http://ircstats.axelay.com to see it in action! 6 | 7 | Created by: Melody Mayberry, http://www.melbell.com 8 | 9 | Place this line in pisg.cfg 10 | <set hicell="#B4CEA9" hicell2="#CCEAC0"> 11 | */ 12 | 13 | /* These are for the regular links (in the stats) */ 14 | a { 15 | text-decoration: none; 16 | font-weight: bold; 17 | } 18 | a:link { 19 | color: #008800; 20 | } 21 | a:visited { 22 | color: #008800; 23 | } 24 | 25 | a:hover { 26 | text-decoration: underline; 27 | color: ##008800; 28 | } 29 | 30 | /* These are for other links EX: Links at the bottom of the page */ 31 | a.background { 32 | text-decoration: none; 33 | } 34 | 35 | a.background:link { 36 | color: #008800; 37 | } 38 | 39 | a.background:visited { 40 | color: #008800; 41 | } 42 | 43 | a.background:hover { 44 | text-decoration: underline; 45 | color: #008800; 46 | } 47 | 48 | body { 49 | background-color: #dfffd1; 50 | font-family: Verdana, Arial, sans-serif; 51 | font-size: 13px; 52 | color: black; 53 | } 54 | 55 | #green-h { 56 | height: 15px; 57 | background-repeat: repeat-x; 58 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px 0px; } 59 | #red-h { 60 | height: 15px; 61 | background-repeat: repeat-x; 62 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -15px; } 63 | #yellow-h { 64 | height: 15px; 65 | background-repeat: repeat-x; 66 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -30px; } 67 | #blue-h { 68 | height: 15px; 69 | background-repeat: repeat-x; 70 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA8AgMAAADanzhpAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAFElEQVQI12NoYMAHHfBC/OAAPggA1jQWgUt+qs4AAAAASUVORK5CYII=) 0px -45px; } 71 | 72 | #green-v { 73 | width: 15px; 74 | background-repeat: repeat-y; 75 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) 0px 0px; } 76 | #red-v { 77 | width: 15px; 78 | background-repeat: repeat-y; 79 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -15px 0px; } 80 | #yellow-v { 81 | width: 15px; 82 | background-repeat: repeat-y; 83 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -30px 0px; } 84 | #blue-v { 85 | width: 15px; 86 | background-repeat: repeat-y; 87 | background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAABAgMAAAD/diWSAAAADFBMVEXMzDPMMzNmzDMzZv+sVPgxAAAAGUlEQVQI12NYtWrVytDQ0AAGBgb7////AwA3TAczYjzlogAAAABJRU5ErkJggg==) -45px 0px; } 88 | 89 | td { 90 | border-radius: 5px; 91 | font-family: Verdana, Arial, sans-serif; 92 | font-size: 13px; 93 | color: black; 94 | text-align: left; 95 | } 96 | 97 | .title { 98 | font-family: Tahoma, Arial, sans-serif; 99 | font-size: 16px; 100 | font-weight: bold; 101 | } 102 | 103 | /* Cell Properties for Headlines EX: "Most Active Nicks" */ 104 | .headtext { 105 | border-radius: 8px; 106 | color: white; 107 | font-weight: bold; 108 | text-align: center; 109 | background-color: #54604F; 110 | } 111 | 112 | /* Has no apparent effect */ 113 | .headlinebg { 114 | border-radius: 8px; 115 | background-color: #000000; 116 | } 117 | 118 | /* Column Titles in Numbered Lists EX: "Most Active Nicks" */ 119 | .tdtop { 120 | background-color: #CDEBC1; 121 | } 122 | 123 | /* Cell in "Big Numbers" section, also the cells of the data in certain 124 | numbered lists (all except the "Most active nicks" and the "Users with 125 | most 126 | nicknames" sections) */ 127 | .hicell { 128 | background-color: #C1DDB5; 129 | } 130 | 131 | /* Cells of the data in "Users with most nicknames" section */ 132 | .hicell10 { 133 | background-color: #C1DDB5; 134 | font-size: 10px; 135 | } 136 | 137 | /* In numbered lists, the cell properties for 2+ */ 138 | .rankc { 139 | background-color: #B4CEA9; 140 | } 141 | 142 | /* In numbered lists, the cell properties for 1 */ 143 | .hirankc { 144 | background-color: #91AC87; 145 | font-weight: bold; 146 | } 147 | 148 | /* Name Cells in These Didn't Make It... */ 149 | .rankc10 { 150 | background-color: #CCEAC0; 151 | font-size: 10px; 152 | } 153 | 154 | /* Hours "1-23" in Most Active Times Cell */ 155 | .rankc10center { 156 | background-color: #B4CEA9; 157 | font-size: 10px; 158 | text-align: center; 159 | } 160 | 161 | /* Hour "0" in Most Active Times Cell */ 162 | .hirankc10center { 163 | background-color: #91AC87; 164 | font-weight: bold; 165 | font-size: 10px; 166 | text-align: center; 167 | } 168 | 169 | .small { 170 | font-family: Verdana, Arial, sans-serif; 171 | font-size: 10px; 172 | } 173 | 174 | 175 | .asmall { 176 | font-family: "Arial narrow", Arial, sans-serif; 177 | font-size: 10px; 178 | color: black; 179 | text-align: center; 180 | } 181 | -------------------------------------------------------------------------------- /modules/Pisg/Common.pm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/modules/Pisg/Common.pm -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/DCpp.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::DCpp; 2 | 3 | use strict; 4 | $^W = 1; 5 | 6 | sub new 7 | { 8 | my ($type, %args) = @_; 9 | my $self = { 10 | cfg => $args{cfg}, 11 | normalline => '^\[\d+\-\d+\-\d+\s(\d+):\d+\]\s+\<([^>]+)\> (.+)', 12 | actionline => '^NA', 13 | thirdline => '^\[\d+\-\d+\-\d+\s(\d+):(\d+)\]\s+\<([^>]+)\> (.+)', 14 | }; 15 | 16 | $self->{cfg}->{botnicks} .= ' Hub-Security'; 17 | bless($self, $type); 18 | return $self; 19 | } 20 | 21 | # Parse a normal line - returns a hash with 'hour', 'nick' and 'saying' 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | # Most log formats are regular enough that you can just match the 30 | # appropriate things with parentheses in the regular expression. 31 | 32 | $hash{hour} = $1; 33 | $hash{nick} = $2; 34 | $hash{saying} = $3; 35 | 36 | if ($self->{cfg}->{botnicks} =~ /\b\Q$hash{nick}\E\b/) { 37 | return; 38 | } 39 | return \%hash; 40 | } else { 41 | return; 42 | } 43 | } 44 | 45 | # Parse an action line - returns a hash with 'hour', 'nick' and 'saying' 46 | sub actionline 47 | { 48 | my ($self, $line, $lines) = @_; 49 | my %hash; 50 | 51 | if ($line =~ /$self->{actionline}/o) { 52 | 53 | # Most log formats are regular enough that you can just match the 54 | # appropriate things with parentheses in the regular expression. 55 | 56 | $hash{hour} = $1; 57 | $hash{nick} = $2; 58 | $hash{saying} = $3; 59 | 60 | return \%hash; 61 | } else { 62 | return; 63 | } 64 | } 65 | 66 | # Parses the 'third' line - (the third line is everything else, like 67 | # topic changes, mode changes, kicks, etc.) 68 | # thirdline() has to return a hash with the following keys, for 69 | # every format: 70 | # hour - the hour we're in (for timestamp logging) 71 | # min - the minute we're in (for timestamp logging) 72 | # nick - the nick 73 | # kicker - the nick which kicked somebody (if any) 74 | # newtopic - the new topic (if any) 75 | # newmode - deops or ops, must be '+o' or '-o', or '+ooo' 76 | # newjoin - a new nick which has joined the channel 77 | # newnick - a person has changed nick and this is the new nick 78 | # 79 | # It should return a hash with the following (for formatting lines in html) 80 | # 81 | # kicktext - the kick reason (if any) 82 | # modechanges - data of the mode change ('Nick' in '+o Nick') 83 | # 84 | # The hash may also have a "repeated" key indicating the number of times 85 | # the line was repeated. (Used by eggdrops log for example.) 86 | sub thirdline 87 | { 88 | my ($self, $line, $lines) = @_; 89 | my %hash; 90 | 91 | if ($line =~ /$self->{thirdline}/o) { 92 | 93 | $hash{hour} = $1; 94 | $hash{min} = $2; 95 | $hash{nick} = $3; 96 | my $text = $4; 97 | my @line = split(/\s+/, $text); 98 | 99 | 100 | # Format-specific stuff goes here. 101 | 102 | if ($self->{cfg}->{botnicks} =~ /\b\Q$hash{nick}\E\b/) { 103 | 104 | if (lc($hash{nick}) eq 'hub-security') { 105 | if (defined $line[3] && $line[1].$line[2] eq 'isin') { 106 | $hash{newjoin} = $line[0]; 107 | $hash{nick} = $hash{newjoin}; 108 | } elsif (defined $line[6] && $line[3].$line[4] eq 'waskicked') { 109 | $hash{kicker} = $line[6]; 110 | $hash{nick} = $line[2]; 111 | } 112 | } 113 | return \%hash; 114 | } else { 115 | return; 116 | } 117 | 118 | } else { 119 | return; 120 | } 121 | } 122 | 123 | 1; 124 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/IRCAP.pm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/modules/Pisg/Parser/Format/IRCAP.pm -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/RacBot.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::RacBot; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\[(\d+):\d+:\d+\]\s+<([^>]+)> (.*)', 14 | actionline => '^\[(\d+):\d+:\d+\]\s+\*(\S+)\s+(.*)', 15 | thirdline => '^\[(\d+):(\d+):\d+\]\s+([^-\$!#].*)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | # Parse a normal line - returns a hash with 'hour', 'nick' and 'saying' 23 | sub normalline 24 | { 25 | my ($self, $line, $lines) = @_; 26 | my %hash; 27 | 28 | if ($line =~ /$self->{normalline}/o) { 29 | 30 | $hash{hour} = $1; 31 | $hash{nick} = $2; 32 | $hash{saying} = $3; 33 | 34 | return \%hash; 35 | } else { 36 | return; 37 | } 38 | } 39 | 40 | # Parse an action line - returns a hash with 'hour', 'nick' and 'saying' 41 | sub actionline 42 | { 43 | my ($self, $line, $lines) = @_; 44 | my %hash; 45 | 46 | if ($line =~ /$self->{actionline}/o) { 47 | 48 | $hash{hour} = $1; 49 | $hash{nick} = $2; 50 | $hash{saying} = $3; 51 | 52 | return \%hash; 53 | } else { 54 | return; 55 | } 56 | } 57 | 58 | sub thirdline 59 | { 60 | my ($self, $line, $lines) = @_; 61 | my %hash; 62 | 63 | if ($line =~ /$self->{thirdline}/o) { 64 | 65 | $hash{hour} = $1; 66 | $hash{min} = $2; 67 | my @line = split /\s+/, $3; 68 | if ($#line >= 5 && $line[1].$line[2].$line[3] eq 'hasbeenkicked') { 69 | ($hash{kicker} = $line[5]) =~ s/!.*$//; 70 | ($hash{nick} = $line[0]) =~ s/!.*$//; 71 | } elsif ($line[0].$line[1] eq 'Topicchanged') { 72 | if ($line[2] eq 'to') { 73 | $hash{newtopic} = join ' ', @line[3 .. ($#line-2)]; 74 | $hash{newtopic} =~ s/^"//; 75 | $hash{newtopic} =~ s/"$//; 76 | ($hash{nick} = $line[$#line]) =~ s/!.*$//; 77 | } elsif ($line[2] eq 'on') { 78 | $hash{newtopic} = join ' ', @line[7 .. $#line]; 79 | $hash{newtopic} =~ s/^"//; 80 | $hash{newtopic} =~ s/"$//; 81 | ($hash{nick} = $line[5]) =~ s/!.*$//; 82 | } else { 83 | return; 84 | } 85 | } elsif ($#line >= 4 && $line[2].$line[3] eq 'hasjoined') { 86 | $hash{newjoin} = $line[0]; 87 | } elsif ($#line >= 5 && $line[1].$line[2].$line[3].$line[4] eq 'isnowknownas') { 88 | $hash{newnick} = $line[5]; 89 | $hash{nick} = $line[0]; 90 | } elsif ($line[0].$line[$#line-1] eq 'MODEby') { 91 | ($hash{nick} = $line[$#line]) =~ s/!.*$//; 92 | $hash{newmode} = $line[1]; 93 | $hash{newmode} =~ s/^"//; 94 | } else { 95 | return; 96 | } 97 | return \%hash; 98 | 99 | } else { 100 | return; 101 | } 102 | } 103 | 104 | 1; 105 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/Template.pm: -------------------------------------------------------------------------------- 1 | # This is a template for creating your own logfile parser. You can also look 2 | # in the other .pm files in this directory as good examples. 3 | 4 | package Pisg::Parser::Format::Template; 5 | 6 | use strict; 7 | $^W = 1; 8 | 9 | # The 3 variables in the new subrountine, 'normalline', 'actionline' and 10 | # 'thirdline' represents regular expressions for extracting information from 11 | # the logfile. normalline is for lines where the person merely said 12 | # something, actionline is for lines where the person performed an action, 13 | # and thirdline matches everything else, including things like kicks, nick 14 | # changes, and op grants. See the thirdline subroutine for a list of 15 | # everything it should match. 16 | 17 | sub new 18 | { 19 | my ($type, %args) = @_; 20 | my $self = { 21 | cfg => $args{cfg}, 22 | normalline => '', 23 | actionline => '', 24 | thirdline => '', 25 | }; 26 | 27 | bless($self, $type); 28 | return $self; 29 | } 30 | 31 | # Parse a normal line - returns a hash with 'hour', 'nick' and 'saying' 32 | sub normalline 33 | { 34 | my ($self, $line, $lines) = @_; 35 | my %hash; 36 | 37 | if ($line =~ /$self->{normalline}/o) { 38 | 39 | # Most log formats are regular enough that you can just match the 40 | # appropriate things with parentheses in the regular expression. 41 | 42 | $hash{hour} = $1; 43 | $hash{nick} = $2; 44 | $hash{saying} = $3; 45 | 46 | return \%hash; 47 | } else { 48 | return; 49 | } 50 | } 51 | 52 | # Parse an action line - returns a hash with 'hour', 'nick' and 'saying' 53 | sub actionline 54 | { 55 | my ($self, $line, $lines) = @_; 56 | my %hash; 57 | 58 | if ($line =~ /$self->{actionline}/o) { 59 | 60 | # Most log formats are regular enough that you can just match the 61 | # appropriate things with parentheses in the regular expression. 62 | 63 | $hash{hour} = $1; 64 | $hash{nick} = $2; 65 | $hash{saying} = $3; 66 | 67 | return \%hash; 68 | } else { 69 | return; 70 | } 71 | } 72 | 73 | # Parses the 'third' line - (the third line is everything else, like 74 | # topic changes, mode changes, kicks, etc.) 75 | # thirdline() has to return a hash with the following keys, for 76 | # every format: 77 | # hour - the hour we're in (for timestamp logging) 78 | # min - the minute we're in (for timestamp logging) 79 | # nick - the nick 80 | # kicker - the nick which kicked somebody (if any) 81 | # newtopic - the new topic (if any) 82 | # newmode - deops or ops, must be '+o' or '-o', or '+ooo' 83 | # newjoin - a new nick which has joined the channel 84 | # newnick - a person has changed nick and this is the new nick 85 | # 86 | # It should return a hash with the following (for formatting lines in html) 87 | # 88 | # kicktext - the kick reason (if any) 89 | # modechanges - data of the mode change ('Nick' in '+o Nick') 90 | # 91 | # The hash may also have a "repeated" key indicating the number of times 92 | # the line was repeated. (Used by eggdrops log for example.) 93 | sub thirdline 94 | { 95 | my ($self, $line, $lines) = @_; 96 | my %hash; 97 | 98 | if ($line =~ /$self->{thirdline}/o) { 99 | 100 | $hash{hour} = $1; 101 | $hash{min} = $2; 102 | $hash{nick} = $3; 103 | 104 | # Format-specific stuff goes here. 105 | 106 | return \%hash; 107 | 108 | } else { 109 | return; 110 | } 111 | } 112 | 113 | 1; 114 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/Trillian.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::Trillian; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | # old format: 6 | # [hh:mm] <nick> says something 7 | # new v3 format: 8 | # [hh:mm] nick: says something 9 | 10 | use strict; 11 | $^W = 1; 12 | 13 | sub new 14 | { 15 | my ($type, %args) = @_; 16 | my $self = { 17 | cfg => $args{cfg}, 18 | normalline => '^\[(\d+):\d+[^ ]+ <?([^*:>]+)[^ ]+ (.*)', 19 | actionline => '^\[(\d+):\d+[^ ]+ \* (\S+) (.*)', 20 | thirdline => '^\[(\d+):(\d+)[^ ]+ \*{3}\s(.+)', 21 | }; 22 | 23 | bless($self, $type); 24 | return $self; 25 | } 26 | 27 | sub normalline 28 | { 29 | my ($self, $line, $lines) = @_; 30 | my %hash; 31 | 32 | if ($line =~ /$self->{normalline}/o) { 33 | 34 | $hash{hour} = $1; 35 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 36 | $hash{saying} = $3; 37 | $hash{saying} =~ s/\(Link: (((http|https|ftp|telnet|news):\/\/|).*?)\)\1/$1/; 38 | 39 | return \%hash; 40 | } else { 41 | return; 42 | } 43 | } 44 | 45 | sub actionline 46 | { 47 | my ($self, $line, $lines) = @_; 48 | my %hash; 49 | 50 | if ($line =~ /$self->{actionline}/o) { 51 | 52 | $hash{hour} = $1; 53 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 54 | $hash{saying} = $3; 55 | $hash{saying} =~ s/\(Link: (((http|https|ftp|telnet|news):\/\/|).*?)\)\1/$1/; 56 | 57 | return \%hash; 58 | } else { 59 | return; 60 | } 61 | } 62 | 63 | sub thirdline 64 | { 65 | my ($self, $line, $lines) = @_; 66 | my %hash; 67 | 68 | if ($line =~ /$self->{thirdline}/o) { 69 | 70 | $hash{hour} = $1; 71 | $hash{min} = $2; 72 | ($hash{nick} = $3) =~ s/^[@%\+~&]//o; # Remove prefix 73 | 74 | if ($3 =~ /^(\S+) has been kicked off channel (\S+) by (\S+) .+/) { 75 | ($hash{nick} = $1) =~ s/^[@%\+~&]//o; # Remove prefix 76 | $hash{kicker} = $3; 77 | 78 | } elsif ($3 =~ /^(\S+) has changed the topic on channel (\S+) to (.+)/) { 79 | ($hash{nick} = $1) =~ s/^[@%\+~&]//o; # Remove prefix 80 | $hash{newtopic} = $3; 81 | 82 | } elsif ($3 =~ /^Mode change \"(\S+)[^\"]+\".+ by (.+)$/) { 83 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 84 | $hash{newmode} = $1; 85 | 86 | } elsif ($3 =~ /^(\S+) \S+ has joined channel \S+/) { 87 | $hash{nick} = $1; 88 | $hash{newjoin} = $1; 89 | 90 | } elsif ($3 =~ /^(\S+) is now known as (\S+)/) { 91 | ($hash{nick} = $1) =~ s/^[@%\+~&]//o; # Remove prefix 92 | $hash{newnick} = $2; 93 | } 94 | 95 | return \%hash; 96 | 97 | } else { 98 | return; 99 | } 100 | } 101 | 102 | 1; 103 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/Vision.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::Vision; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\[(\d+):\d+\S+ <([^>]+)> (.*)$', 14 | actionline => '^\[(\d+):\d+\S+ \* (\S+) (.*)$', 15 | thirdline => '^\[(\d+):(\d+)\S+ \*{3} (.+)$' 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | my @line = split(/\s/, $3); 64 | 65 | $hash{hour} = $1; 66 | $hash{min} = $2; 67 | ($hash{nick} = $line[0]) =~ s/^[@%\+~&]//o; # Remove prefix 68 | 69 | if ($#line >= 7 && ($line[1].$line[2].$line[3]) eq 'hasbeenkicked') { 70 | $hash{kicker} = $line[7]; 71 | 72 | } elsif ($#line >= 4 && ($line[1].$line[2] eq 'Topicchanged')) { 73 | $hash{newtopic} = join(' ', @line[5..$#line]); 74 | ($hash{nick} = $line[4]) =~ s/^[@%\+~&]//o; # Remove prefix 75 | $hash{nick} =~ s/:$//; 76 | 77 | } elsif ($#line >= 3 && ($line[1].$line[2]) eq 'setmode') { 78 | $hash{newmode} = $line[3]; 79 | 80 | } elsif ($#line >= 3 && ($line[2].$line[3]) eq 'hasjoined') { 81 | $hash{newjoin} = $line[0]; 82 | 83 | } elsif ($#line >= 5 && ($line[2].$line[3]) eq 'nowknown') { 84 | $hash{newnick} = $line[5]; 85 | $hash{newnick} =~ s/\.$//; 86 | } 87 | 88 | return \%hash; 89 | 90 | } else { 91 | return; 92 | } 93 | } 94 | 95 | 1; 96 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/axur.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::axur; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\[\d+/\d+/\d+ @ (\d+):\d+:\d+\] [\>\(|<]+([^>\s]+)[\)|>]\s+(.*)', 14 | actionline => '^\[\d+/\d+/\d+ @ (\d+):\d+:\d+\] \*\s+(\S+) (.*)', 15 | thirdline => '^\[\d+/\d+/\d+ @ (\d+):(\d+):\d+\] \*\*\*\s+(\S+) (\S+) (\S+) (\S+) (\S+) (.*)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if (($4.$5) eq 'haskicked') { 68 | $hash{kicker} = $3; 69 | $hash{nick} = $6; 70 | 71 | } elsif (($4.$5) eq 'haschanged') { 72 | $hash{newtopic} = $8; 73 | 74 | } elsif (($7) eq '+o') { 75 | $hash{newmode} = '+o'; 76 | 77 | } elsif (($7) eq '-o') { 78 | $hash{newmode} = '-o'; 79 | 80 | } elsif (($4.$5) eq 'hasjoined') { 81 | $hash{newjoin} = $3; 82 | 83 | } elsif ((($4.$5) eq 'nowknown') || (($4.$5) eq 'nowknow')) { 84 | $hash{newnick} = $7; 85 | 86 | } 87 | 88 | return \%hash; 89 | 90 | } else { 91 | return; 92 | } 93 | } 94 | 95 | 1; 96 | 97 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/blootbot.pm: -------------------------------------------------------------------------------- 1 | # This is a template for blootbot logs http://blootbot.sf.net/ 2 | # hacked up by Tim Riker <Tim@Rikers.org> 3 | 4 | package Pisg::Parser::Format::blootbot; 5 | 6 | use strict; 7 | $^W = 1; 8 | 9 | # The 3 variables in the new subrountine, 'normalline', 'actionline' and 10 | # 'thirdline' represents regular expressions for extracting information from 11 | # the logfile. normalline is for lines where the person merely said 12 | # something, actionline is for lines where the person performed an action, 13 | # and thirdline matches everything else, including things like kicks, nick 14 | # changes, and op grants. See the thirdline subroutine for a list of 15 | # everything it should match. 16 | 17 | 18 | # blootbot puts hh:mm.ss at the start. 19 | # note that one log can contain more than one channel. 20 | # FIXME it would be nice if pisg would process them all in one pass! 21 | # 22 | # Normal lines are like: 23 | # 24 | # 01:02.03 <nick/#channel> normal 25 | # 01:02.03 * nick/#channel action 26 | 27 | sub new 28 | { 29 | my ($type, %args) = @_; 30 | my $self = { 31 | cfg => $args{cfg}, 32 | normalline => '^(\d\d):\d\d\.\d\d <([^\/]+)\/(#[^>]+)> (.*)', 33 | actionline => '^(\d\d):\d\d\.\d\d \* (.*)/(#\S*) (.*)', 34 | thirdline => '^(\d\d):(\d\d)\.\d\d >>> (.*)', 35 | }; 36 | 37 | bless($self, $type); 38 | return $self; 39 | } 40 | 41 | # Parse a normal line - returns a hash with 'hour', 'nick' and 'saying' 42 | sub normalline 43 | { 44 | my ($self, $line, $lines) = @_; 45 | my %hash; 46 | 47 | if ($line =~ /$self->{normalline}/o and 48 | lc $3 eq lc $self->{cfg}->{channel}) { 49 | 50 | # Most log formats are regular enough that you can just match the 51 | # appropriate things with parentheses in the regular expression. 52 | 53 | $hash{hour} = $1; 54 | $hash{nick} = $2; 55 | $hash{channel} = $3; 56 | $hash{saying} = $4; 57 | 58 | return \%hash; 59 | } else { 60 | return; 61 | } 62 | } 63 | 64 | # Parse an action line - returns a hash with 'hour', 'nick' and 'saying' 65 | sub actionline 66 | { 67 | my ($self, $line, $lines) = @_; 68 | my %hash; 69 | 70 | if ($line =~ /$self->{actionline}/o and 71 | lc $3 eq lc $self->{cfg}->{channel}) { 72 | 73 | # Most log formats are regular enough that you can just match the 74 | # appropriate things with parentheses in the regular expression. 75 | 76 | $hash{hour} = $1; 77 | $hash{nick} = $2; 78 | $hash{channel} = $3; 79 | $hash{saying} = $4; 80 | 81 | return \%hash; 82 | } else { 83 | return; 84 | } 85 | } 86 | 87 | # Parses the 'third' line - (the third line is everything else, like 88 | # topic changes, mode changes, kicks, etc.) 89 | # thirdline() has to return a hash with the following keys, for 90 | # every format: 91 | # hour - the hour we're in (for timestamp logging) 92 | # min - the minute we're in (for timestamp logging) 93 | # nick - the nick 94 | # kicker - the nick which kicked somebody (if any) 95 | # newtopic - the new topic (if any) 96 | # newmode - deops or ops, must be '+o' or '-o', or '+ooo' 97 | # newjoin - a new nick which has joined the channel 98 | # newnick - a person has changed nick and this is the new nick 99 | # 100 | # It should return a hash with the following (for formatting lines in html) 101 | # 102 | # kicktext - the kick reason (if any) 103 | # modechanges - data of the mode change ('Nick' in '+o Nick') 104 | # 105 | # The hash may also have a "repeated" key indicating the number of times 106 | # the line was repeated. (Used by eggdrops log for example.) 107 | sub thirdline 108 | { 109 | my ($self, $line, $lines) = @_; 110 | my %hash; 111 | 112 | if ($line =~ /$self->{thirdline}/o) { 113 | 114 | $hash{hour} = $1; 115 | $hash{min} = $2; 116 | 117 | # Format-specific stuff goes here. 118 | 119 | if ($3 =~ /^topic\/(#\S*) by (\S*) -> (.*)/) { 120 | # 01:02.03 >>> topic/#channel by nick -> topic... 121 | $hash{channel} = $1; 122 | $hash{nick} = $2; 123 | $hash{newtopic} = "$3"; 124 | 125 | } elsif ($3 =~ /^mode\/(#\S*) \[([\+\-]o*) (.*)\] by (\S*)/) { 126 | # 01:02.03 >>> mode/#channel [+o nick] by ChanServ 127 | $hash{channel} = $1; 128 | $hash{newmode} = $2; 129 | $hash{modechanges} = $3; 130 | $hash{nick} = $4; 131 | 132 | } elsif ($3 =~ /^join\/(#\S*) (\S*) \(\S*\)/) { 133 | # 01:02.03 >>> join/#channel nick (~user@example.com) 134 | $hash{channel} = $1; 135 | $hash{newjoin} = $2; 136 | 137 | } elsif ($3 =~ /^kick\/(#\S*) \[(\S*)!.*\] by (\S*) \((.*\))/) { 138 | # 01:02.03 >>> kick/#channel [nick!~user@example.com] by nick (reason) 139 | $hash{channel} = $1; 140 | $hash{nick} = $2; 141 | $hash{kicker} = $3; 142 | $hash{kicktext} = $4; 143 | 144 | } elsif ($3 =~ /^(\S*) materializes into (\S*)/) { 145 | # 01:02.03 >>> nick_ materializes into nick 146 | $hash{nick} = $1; 147 | $hash{newnick} = $2; 148 | # no channel so return now 149 | return \%hash; 150 | } 151 | return \%hash if ($hash{channel} and lc $hash{channel} eq lc $self->{cfg}->{channel}); 152 | return; 153 | 154 | } else { 155 | return; 156 | } 157 | } 158 | 159 | 1; 160 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/bobot.pm: -------------------------------------------------------------------------------- 1 | # package for bobot parsing made by Oct@zoy.org 2 | package Pisg::Parser::Format::bobot; 3 | 4 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 5 | 6 | use strict; 7 | $^W = 1; 8 | 9 | sub new 10 | { 11 | my ($type, %args) = @_; 12 | my $self = { 13 | cfg => $args{cfg}, 14 | normalline => '^\[[^-]+- ([^:]+):[^\]]+\] <([^>]+)> (.*)$', 15 | actionline => '^\[[^-]+- ([^:]+):[^\]]+\] \* ([^ ]+) (.*)$', 16 | thirdline => '^\[[^-]+- ([^:]+):([^\]]+)\] \*\*\* ([^ ]+) \[[^\]]+\] (.*)$', 17 | }; 18 | 19 | bless($self, $type); 20 | return $self; 21 | } 22 | 23 | sub normalline 24 | { 25 | my ($self, $line, $lines) = @_; 26 | my %hash; 27 | 28 | if ($line =~ /$self->{normalline}/) { 29 | 30 | $hash{hour} = $1; 31 | $hash{nick} = $2; 32 | $hash{saying} = $3; 33 | 34 | return \%hash; 35 | } else { 36 | return; 37 | } 38 | } 39 | 40 | sub actionline 41 | { 42 | my ($self, $line, $lines) = @_; 43 | my %hash; 44 | 45 | if ($line =~ /$self->{actionline}/) { 46 | 47 | $hash{hour} = $1; 48 | $hash{nick} = $2; 49 | $hash{saying} = $3; 50 | 51 | return \%hash; 52 | } else { 53 | return; 54 | } 55 | } 56 | 57 | sub thirdline 58 | { 59 | my ($self, $line, $lines) = @_; 60 | my %hash; 61 | if ($line =~ /$self->{thirdline}/) { 62 | $hash{hour} = $1; 63 | $hash{min} = $2; 64 | $hash{nick} = $3; 65 | if($4 =~ /^topic ([^ ]+) \((.*)\)$/) 66 | { 67 | $hash{newtopic}= $2; 68 | } elsif($4 =~ /^mode ([\+-]o+) (.*)$/) 69 | { 70 | $hash{newmode} = $1; 71 | $hash{nick} = $2; 72 | } elsif($4 =~/^kick ([^ ]+) .*$/) 73 | { 74 | $hash{kicker} = $hash{nick}; 75 | $hash{nick} = $1; 76 | } elsif($4 =~/^join .*$/) 77 | { 78 | $hash{newjoin} = $hash{nick}; 79 | } 80 | 81 | return \%hash; 82 | 83 | } else { 84 | return; 85 | } 86 | } 87 | 88 | 1; 89 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/bxlog.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::bxlog; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\[\d+ \S+\/(\d+):\d+\] <([^>]+)> (.*)', 14 | actionline => '^\[\d+ \S+\/(\d+):\d+\] \* (\S+) (.*)', 15 | thirdline => '^\[\d+ \S+\/(\d+):(\d+)\] ([<>@!]) (.*)' 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | 66 | if ($3 eq '<') { 67 | if ($4 =~ /^([^!]+)!\S+ was kicked off \S+ by ([^!]+)!/) { 68 | $hash{kicker} = $2; 69 | $hash{nick} = $1; 70 | } 71 | 72 | } elsif ($3 eq '>') { 73 | if ($4 =~ /^([^!]+)!\S+ has joined \S+$/) { 74 | $hash{nick} = $1; 75 | $hash{newjoin} = $1; 76 | } 77 | 78 | } elsif ($3 eq '@') { 79 | if ($4 =~ /^Topic by ([^!:])[!:]*: (.*)$/) { 80 | $hash{nick} = $1; 81 | $hash{newtopic} = $2; 82 | 83 | } elsif ($4 =~ /^mode \S+ \[([\S]+) [^\]]+\] by ([^!]+)!\S+$/) { 84 | $hash{newmode} = $1; 85 | $hash{nick} = $2; 86 | } 87 | 88 | } elsif ($3 eq '!') { 89 | if ($4 =~ /^(\S+) is known as (\S+)$/) { 90 | $hash{nick} = $1; 91 | $hash{newnick} = $2; 92 | } 93 | } 94 | 95 | return \%hash; 96 | 97 | } else { 98 | return; 99 | } 100 | } 101 | 102 | 1; 103 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/dancer.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::dancer; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^(\d+)\.\S+ \# \s+ <([^>]+)> (.*)', 14 | actionline => '^(\d+)\.\S+ \# \s+ \* (\S+) (.*)', 15 | thirdline => '^(\d+)\.(\d+)\.\S+ ([^#>* ]+)\s+ (.*)' 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | 66 | if($3 eq 'Kick') { 67 | $4 =~ /\(\S+ (\S+) .*?\) by (\S+)\!/o; 68 | $hash{nick} = $1; 69 | $hash{kicker} = $2; 70 | } elsif($3 eq 'Topic') { 71 | $4 =~ /\"(.*)\" by (\S+) /o; 72 | $hash{newtopic} = $1; 73 | $hash{nick} = $2; 74 | } elsif($3 eq 'Mode') { 75 | $4 =~ /\S+ (\S+) .*\" by (\S+) /o; 76 | $hash{newmode} = $1; 77 | $hash{nick} = $2; 78 | } elsif($3 eq 'Join') { 79 | $4 =~ /(\S+) (\S+) /o; 80 | $hash{nick} = $1; 81 | $hash{newjoin} = $1; 82 | } elsif($3 eq 'Nick') { 83 | $4 =~ /(\S+) is now known as (\S+) /o; 84 | $hash{nick} = $1; 85 | $hash{newnick} = $2; 86 | } 87 | return \%hash; 88 | 89 | } else { 90 | return; 91 | } 92 | } 93 | 94 | 1; 95 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/dircproxy.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::dircproxy; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | 12 | my $self = { 13 | cfg => $args{cfg}, 14 | normalline => '^<([^!]+)![^>]+>\s\[(\d{2}):\d{2}\]\s(.+)$', 15 | actionline => '^\[([^!]+)![^\]]+\]\s\[(\d{2}):\d{2}\]\sACTION\s(.+)$', 16 | thirdline => '^\-(\S+)\-\s\[(\d{2}:\d{2})\]\s(.+)$', 17 | normalline_old => '^@(\d+)\s<([^!]+)![^>]+>\s(.+)$', 18 | actionline_old => '^@(\d+)\s\[([^!]+)![^\]]+\]\sACTION\s(.+)$', 19 | thirdline_old => '^@(\d+)\s\S+\s(.+)$' 20 | }; 21 | 22 | bless($self, $type); 23 | return $self; 24 | } 25 | 26 | sub normalline 27 | { 28 | my ($self, $line, $lines) = @_; 29 | my %hash; 30 | 31 | if ($line =~ /$self->{normalline}/o) { 32 | $hash{hour} = $2; 33 | $hash{nick} = $1; 34 | $hash{saying} = $3; 35 | 36 | return \%hash; 37 | } elsif ($line =~ /$self->{normalline_old}/o) { 38 | $hash{hour} = (localtime($1))[2]; 39 | $hash{nick} = $2; 40 | $hash{saying} = $3; 41 | 42 | return \%hash; 43 | } else { 44 | return; 45 | } 46 | } 47 | 48 | sub actionline 49 | { 50 | my ($self, $line, $lines) = @_; 51 | my %hash; 52 | 53 | if ($line =~ /$self->{actionline}/o) { 54 | $hash{hour} = $2; 55 | $hash{nick} = $1; 56 | $hash{saying} = $3; 57 | 58 | return \%hash; 59 | } elsif ($line =~ /$self->{actionline_old}/o) { 60 | $hash{hour} = (localtime($1))[2]; 61 | $hash{nick} = $2; 62 | $hash{saying} = $3; 63 | 64 | return \%hash; 65 | } else { 66 | return; 67 | } 68 | } 69 | 70 | sub thirdline 71 | { 72 | my ($self, $line, $lines) = @_; 73 | my %hash; 74 | my @word; 75 | 76 | if ($line =~ /$self->{thirdline}/o) { 77 | return if ($1 eq 'dircproxy'); 78 | 79 | @word = split(/\s+/, $3); 80 | 81 | my @time = split(/:/, $2); 82 | $hash{hour} = $time[0]; 83 | $hash{min} = $time[1]; 84 | 85 | } elsif ($line =~ /$self->{thirdline_old}/o) { 86 | return if ($1 eq 'dircproxy'); 87 | 88 | @word = split(/\s+/, $2); 89 | 90 | $hash{hour} = (localtime($1))[2]; 91 | $hash{min} = (localtime($1))[1]; 92 | 93 | } else { 94 | return; 95 | } 96 | 97 | 98 | # the real parser here for thirdline... 99 | $hash{nick} = $word[0]; 100 | 101 | if (defined($word[3]) && $word[0] eq 'Kicked') { 102 | $hash{kicker} = $word[3]; 103 | $hash{nick} = $self->{cfg}->{maintainer}; 104 | 105 | } elsif (defined($word[4]) && $word[1] eq 'kicked') { 106 | $hash{kicker} = $word[4]; 107 | 108 | } elsif (defined($word[3]) && $word[2] eq 'changed') { 109 | if ($word[3] eq 'mode:') { 110 | $hash{newmode} = join(' ', @word[4..$#word]); 111 | } elsif ($word[3] eq 'topic:') { 112 | $hash{newtopic} = join(' ', @word[4..$#word]); 113 | } 114 | 115 | } elsif (defined($word[2]) && $word[2] eq 'joined') { 116 | $hash{newjoin} = $hash{nick}; 117 | 118 | } 119 | # elsif ($word[0] eq 'NICK') { 120 | # $hash{newnick} = $word[1]; 121 | # $hash{newnick} =~ s/^://; 122 | #} 123 | 124 | 125 | return \%hash; 126 | } 127 | 128 | 1; 129 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/eggdrop.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::eggdrop; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\[(\d+):\d+(?:\:\d+)?\] <([^>]+)> (.*)$', 14 | actionline => '^\[(\d+):\d+(?:\:\d+)?\] Action: (\S+) (.*)$', 15 | thirdline => '^\[(\d+):(\d+)(?:\:\d+)?\] (\S+) (\S+) (\S+) (\S+)(.*)$', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if (($4.$5) eq 'kickedfrom') { 68 | $7 =~ /^ by ([\S]+):\s*(.*)/; 69 | $hash{kicktext} = $2; 70 | $1 =~ /([^!]+)/; # Remove anything after the ! 71 | $hash{kicker} = $1; 72 | 73 | } elsif ($3 eq 'Topic') { 74 | $7 =~ /^ by (\S*)!(\S+): (.*)/; 75 | $hash{nick} = $1 || $2; # $1 might be empty if topic is reset by server 76 | $hash{newtopic} = $3; 77 | 78 | } elsif (($4.$5) eq 'modechange') { 79 | my $newmode = $6; 80 | if ($7 =~ /^ (.+) by ([\S]+)!.*/) { 81 | $hash{modechanges} = $2; 82 | $hash{nick} = $2; 83 | $newmode =~ s/^\'//; 84 | $hash{newmode} = $newmode; 85 | } 86 | 87 | } elsif ($5 eq 'joined') { 88 | $hash{newjoin} = $3; 89 | 90 | } elsif (($3.$4) eq 'Nickchange:') { 91 | $hash{nick} = $5; 92 | $7 =~ /([\S]+)/; 93 | $hash{newnick} = $1; 94 | 95 | } elsif (($3.$4.$5) eq 'Lastmessagerepeated') { 96 | $hash{repeated} = $6; 97 | } 98 | 99 | $hash{nick} =~ /([^!]+)/; 100 | $hash{nick} = $1; 101 | return \%hash; 102 | 103 | } else { 104 | return; 105 | } 106 | } 107 | 108 | 1; 109 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/energymech.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::energymech; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\[[^\]]*(\d{2}):\d+:\d+\] <([^>]+)> (.*)$', 14 | actionline => '^\[[^\]]*(\d{2}):\d+:\d+\] \* (\S+) (.*)$', 15 | thirdline => '^\[[^\]]*(\d{2}):(\d+):\d+\] \*{3} (.+)$' 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | my @line = split(/\s/, $3); 64 | 65 | $hash{hour} = $1; 66 | $hash{min} = $2; 67 | $hash{nick} = $line[0]; 68 | 69 | if ($#line >= 4 && ($line[1].$line[2]) eq 'waskicked') { 70 | $hash{kicker} = $line[4]; 71 | $hash{kicktext} = $3; 72 | $hash{kicktext} =~ s/^[^\(]+\((.+)\)$/$1/; 73 | 74 | } elsif ($#line >= 4 && ($line[1].$line[2]) eq 'changestopic') { 75 | $hash{newtopic} = join(' ', @line[4..$#line]); 76 | $hash{newtopic} =~ s/^'//; 77 | $hash{newtopic} =~ s/'$//; 78 | 79 | } elsif ($#line >= 4 && ($line[1].$line[2]) eq 'setsmode:') { 80 | $hash{newmode} = $line[3]; 81 | $hash{modechanges} = join(" ", splice(@line, 4)); 82 | 83 | } elsif ($#line >= 1 && $line[0] eq 'Joins:') { 84 | $hash{nick} = $line[1]; 85 | $hash{newjoin} = $line[1]; 86 | 87 | } elsif ($#line >= 5 && ($line[2].$line[3]) eq 'nowknown') { 88 | $hash{newnick} = $line[5]; 89 | } 90 | 91 | return \%hash; 92 | 93 | } else { 94 | return; 95 | } 96 | } 97 | 98 | 1; 99 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/grufti.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::grufti; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\[(\d+):\d+\] <([^>]+)> (.*)', 14 | actionline => '^\[(\d+):\d+\] \* (\S+) (.*)', 15 | thirdline => '^\[(\d+):(\d+)\] (\S+) (\S+) (\S+) (\S+) (\S+) (\S+)(.*)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if ($5 eq 'kicked') { 68 | $hash{kicker} = $3; 69 | $hash{nick} = $6; 70 | 71 | } elsif (($4.$5) eq 'haschanged') { 72 | $hash{newtopic} = $9; 73 | 74 | } elsif (($4.$5) eq 'modechange') { 75 | $hash{newmode} = substr($6, 1); 76 | $hash{nick} = $9; 77 | $hash{nick} =~ /.*[by ](\S+)/; 78 | $hash{nick} = $1; 79 | 80 | } elsif ($5 eq 'joined') { 81 | $hash{newjoin} = $1; 82 | 83 | } elsif (($3.$4) eq 'Nickchange') { 84 | $hash{nick} = $7; 85 | $hash{newnick} = $9; 86 | } 87 | 88 | return \%hash; 89 | 90 | } else { 91 | return; 92 | } 93 | } 94 | 95 | 1; 96 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/hydra.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::hydra; 2 | 3 | use strict; 4 | $^W = 1; 5 | 6 | sub new 7 | { 8 | my ($type, %args) = @_; 9 | my $self = { 10 | cfg => $args{cfg}, 11 | normalline => '^\[\d+-\d+-\d+ (\d+):\d+:\d+\] <([^>\s]+)> (.*)', 12 | actionline => '^\[\d+-\d+-\d+ (\d+):\d+:\d+\] \* (\S+) (.+)', 13 | thirdline => '^\[\d+-\d+-\d+ (\d+):(\d+):\d+\] \*{3} (.+)', 14 | }; 15 | 16 | bless($self, $type); 17 | return $self; 18 | } 19 | 20 | sub normalline 21 | { 22 | my ($self, $line, $lines) = @_; 23 | my %hash; 24 | 25 | if ($line =~ /$self->{normalline}/o) { 26 | 27 | $hash{hour} = $1; 28 | $hash{nick} = $2; 29 | $hash{saying} = $3; 30 | 31 | return \%hash; 32 | } else { 33 | return; 34 | } 35 | } 36 | 37 | sub actionline 38 | { 39 | my ($self, $line, $lines) = @_; 40 | my %hash; 41 | 42 | if ($line =~ /$self->{actionline}/o) { 43 | 44 | $hash{hour} = $1; 45 | $hash{nick} = $2; 46 | $hash{saying} = $3; 47 | 48 | return \%hash; 49 | } else { 50 | return; 51 | } 52 | } 53 | 54 | sub thirdline 55 | { 56 | my ($self, $line, $lines) = @_; 57 | my %hash; 58 | 59 | if ($line =~ /$self->{thirdline}/o) { 60 | 61 | $hash{hour} = $1; 62 | $hash{min} = $2; 63 | $hash{nick} = $3; 64 | 65 | # Format-specific stuff goes here. 66 | 67 | if ($3 =~ /^(\S+) was kicked from (\S+) by (\S+) (.+)/) { 68 | $hash{nick} = $1; 69 | $hash{kicker} = $3; 70 | $hash{kicktext} = $4; 71 | 72 | } elsif ($3 =~ /^(\S+) changed topic to (.+)/) { 73 | $hash{nick} = $1; 74 | $hash{newtopic} = $2; 75 | 76 | } elsif ($3 =~ /^(\S+) sets channel \S+ mode (\S+) (.+)/) { 77 | $hash{nick} = $1; 78 | $hash{newmode} = $2; 79 | $hash{modechanges} = $3; 80 | 81 | } elsif ($3 =~ /^(\S+) \S+ has joined channel \S+/) { 82 | $hash{nick} = $1; 83 | $hash{newjoin} = $1; 84 | 85 | } elsif ($3 =~ /^(\S+) changed nick to (\S+)/) { 86 | $hash{nick} = $1; 87 | $hash{newnick} = $2; 88 | } 89 | 90 | return \%hash; 91 | 92 | } else { 93 | return; 94 | } 95 | } 96 | 97 | 1; 98 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/infobot.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::infobot; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | # Note that infobot log files do not distinguish between action lines and 6 | # normal lines. 7 | 8 | use strict; 9 | $^W = 1; 10 | 11 | sub new 12 | { 13 | my ($type, %args) = @_; 14 | my $self = { 15 | cfg => $args{cfg}, 16 | normalline => '^(\d+) \[\d+\] <([^\/]+)\/[^>]+> (.*)', 17 | actionline => '^NA', 18 | thirdline => '^(\d+) \[\d+\] >>> (.*)', 19 | }; 20 | 21 | bless($self, $type); 22 | return $self; 23 | } 24 | 25 | sub normalline 26 | { 27 | my ($self, $line, $lines) = @_; 28 | my %hash; 29 | my $sec; my $min; my $hour; my $mday; my $mon; my $year; 30 | my $wday; my $yday; my $isdst; 31 | 32 | if ($line =~ /$self->{normalline}/o) { 33 | 34 | ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($1); 35 | $hash{hour} = $hour; 36 | $hash{nick} = $2; 37 | $hash{saying} = $3; 38 | 39 | return \%hash; 40 | } else { 41 | return; 42 | } 43 | } 44 | 45 | sub actionline 46 | { 47 | my ($self, $line, $lines) = @_; 48 | my %hash; 49 | my $sec; my $min; my $hour; my $mday; my $mon; my $year; 50 | my $wday; my $yday; my $isdst; 51 | 52 | if ($line =~ /$self->{actionline}/o) { 53 | 54 | ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($1); 55 | $hash{hour} = $hour; 56 | $hash{nick} = $2; 57 | $hash{saying} = $3; 58 | 59 | return \%hash; 60 | } else { 61 | return; 62 | } 63 | } 64 | 65 | sub thirdline 66 | { 67 | my ($self, $line, $lines) = @_; 68 | my %hash; 69 | my $sec; my $min; my $hour; my $mday; my $mon; my $year; 70 | my $wday; my $yday; my $isdst; 71 | 72 | if ($line =~ /$self->{thirdline}/o) { 73 | 74 | ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($1); 75 | $hash{hour} = $hour; 76 | $hash{min} = $min; 77 | 78 | if ($2 =~ /^\[1m([^(\[0m)]*)\[0m was kicked off \[1m[^\[]*\[0m by \[1m([^(\[0m)]*)\[0m .*/) { 79 | $hash{nick} = $1; 80 | $hash{kicker} = $2; 81 | 82 | } elsif ($2 =~ /^([^(\[1m)]*)\[1m\[\[0m#[^\[ ]+( ?:?)(.*)\[1m\]\[0m set the topic: (.*)/) { 83 | $hash{nick} = $1; 84 | $hash{newtopic} = "$3$2$4"; 85 | 86 | } elsif ($2 =~ /^mode\/\S* \[\[1m([\+\-]o+) .* by \[1m(\S*)\[0m/) { 87 | $hash{newmode} = $1; 88 | $hash{nick} = $2; 89 | 90 | } elsif ($2 =~ /^(\S*) \(\S*\) has joined \#\S*/) { 91 | $hash{newjoin} = $1; 92 | 93 | } elsif ($2 =~ /^\[1;32m([^(\[0m)]*)\[0m materializes into \[1;32m([^(\[0m)]*)\[0m/) { 94 | $hash{nick} = $1; 95 | $hash{newnick} = $2; 96 | } 97 | 98 | return \%hash; 99 | 100 | } else { 101 | return; 102 | } 103 | } 104 | 105 | 1; 106 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/ircII.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::ircII; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | # Parser for logs from ircII 5 | # by James Andrewartha <trs80@tartarus.uwa.edu.au> 6 | # based on Template.pm and Trillian.pm 7 | 8 | # Note that you will need some triggers similar to these in your .ircrc to get 9 | # timestamping: 10 | # on #^timer 50 "*0" echo $0 11 | # on #^timer 50 "*5" echo $0 12 | 13 | # Known issues: the time of topic changes is only as accurate as the time- 14 | # stamping (the above lines provide 5-minute accuracy). 15 | 16 | use strict; 17 | $^W = 1; 18 | 19 | # Yes, global variables are bad. But they do need to be global to avoid pain. 20 | my ($global_hour, $global_minute); 21 | 22 | sub new 23 | { 24 | my ($type, %args) = @_; 25 | my $self = { 26 | cfg => $args{cfg}, 27 | normalline => '^(<([^>]+)> (.*)|> (.*))', 28 | actionline => '^\* (\S+[^>]) (.*)', 29 | thirdline => '^((\d+):(\d+)|\*{3} (.+)|IRC log started \w+ \w+ \w+ (\d+:\d+))', 30 | }; 31 | 32 | bless($self, $type); 33 | return $self; 34 | } 35 | 36 | # Parse a normal line - returns a hash with 'hour', 'nick' and 'saying' 37 | sub normalline 38 | { 39 | my ($self, $line, $lines) = @_; 40 | my %hash; 41 | 42 | if ($line =~ /$self->{normalline}/o) { 43 | $hash{hour} = $global_hour; 44 | 45 | if ($1 =~ /^<([^>]+)> (.*)/) { 46 | $hash{nick} = $1; 47 | $hash{saying} = $2; 48 | } elsif ($1 =~ /^> (.*)/) { 49 | $hash{nick} = $self->{cfg}->{maintainer}; 50 | $hash{saying} = $1; 51 | } 52 | 53 | return \%hash; 54 | } else { 55 | return; 56 | } 57 | } 58 | 59 | # Parse an action line - returns a hash with 'hour', 'nick' and 'saying' 60 | sub actionline 61 | { 62 | my ($self, $line, $lines) = @_; 63 | my %hash; 64 | 65 | if ($line =~ /$self->{actionline}/o) { 66 | 67 | $hash{hour} = $global_hour; 68 | $hash{nick} = $1; 69 | $hash{saying} = $2; 70 | 71 | return \%hash; 72 | } else { 73 | return; 74 | } 75 | } 76 | 77 | sub thirdline 78 | { 79 | my ($self, $line, $lines) = @_; 80 | my %hash; 81 | 82 | if ($line =~ /$self->{thirdline}/o) { 83 | 84 | # Mainly stolen from Trillian.pm 85 | if ($1 =~ /^\*{3} (\S+) has been kicked off channel (\S+) by (\S+) .+/) { 86 | $hash{nick} = $1; 87 | $hash{kicker} = $3; 88 | 89 | } elsif ($1 =~ /^\*{3} (\S+) has changed the topic on channel (\S+) to (.+)/) { 90 | $hash{nick} = $1; 91 | $hash{newtopic} = $3; 92 | 93 | } elsif ($1 =~ /^\*{3} Mode change \"(\S+)[^\"]+\".+ by (.+)$/) { 94 | $hash{nick} = $2; 95 | $hash{newmode} = $1; 96 | 97 | } elsif ($1 =~ /^\*{3} (\S+) \S+ has joined channel \S+/) { 98 | $hash{nick} = $1; 99 | $hash{newjoin} = $1; 100 | 101 | } elsif ($1 =~ /^\*{3} (\S+) is now known as (\S+)/) { 102 | $hash{nick} = $1; 103 | $hash{newnick} = $2; 104 | 105 | } elsif ($1 =~ /^(\d+):(\d+)$/) { 106 | $global_hour = $1; 107 | $global_minute = $2; 108 | 109 | } elsif ($1 =~ /^IRC log started \w+ \w+ \w+ (\d+):(\d+)/) { 110 | $global_hour = $1; 111 | $global_minute = $2; 112 | } 113 | 114 | $hash{hour} = $global_hour; 115 | $hash{min} = $global_minute; 116 | 117 | return \%hash; 118 | 119 | } else { 120 | return; 121 | } 122 | } 123 | 124 | 1; 125 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/ircle.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::ircle; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^(\d+):\d+ \w+:[^\w]+(\w+): (.*)', 14 | actionline => '^(\d+):\d+ \w+:[^\w]+(\w+) (.*)', 15 | thirdline => '^(\d+):(\d+) \w+: \*\*\* (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (.*)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if (($5.$6) eq 'beenkicked') { 68 | $hash{kicker} = $11; 69 | 70 | } elsif ($3 eq 'Topic') { 71 | $hash{newtopic} = "$6 $7 $8"; 72 | 73 | } elsif (($3.$4) eq 'Modechange') { 74 | $hash{newmode} = substr($5, 1); 75 | 76 | } elsif (($5.$6) eq 'hasjoined') { 77 | $hash{newjoin} = $3; 78 | 79 | } elsif (($5.$6) eq 'nowknown') { 80 | $hash{newnick} = $8; 81 | } 82 | 83 | return \%hash; 84 | 85 | } else { 86 | return; 87 | } 88 | } 89 | 90 | 1; 91 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/irssi.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::irssi; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^(\d+):\d+[^<*^!]+<[@%+~& ]?([^>]+)> (.*)', 14 | actionline => '^(\d+):\d+[^ ]+ +\* (\S+) (.*)', 15 | thirdline => '^(\d+):(\d+)[^-]+-\!- (\S+) (\S+) (\S+) (\S+) (\S+)(.*)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if (($4.$5) eq 'waskicked') { 68 | $hash{kicker} = $8; 69 | $hash{kicker} =~ m/by (\S+)/; 70 | $hash{kicker} = $1; 71 | 72 | } elsif ($4 eq 'changed') { 73 | $hash{newtopic} = $8; 74 | $hash{newtopic} =~ m/to:(.*)/; 75 | $hash{newtopic} = $1; 76 | 77 | } elsif (substr($3, 0, 5) eq 'mode/') { 78 | $hash{newmode} = substr($4, 1); 79 | $hash{nick} = $8 || $7; 80 | $hash{nick} =~ s/.* (\S+)$/$1/; # Get the last word of the string 81 | 82 | # when autorealname.pl is loaded, "has joined" moves to $6 $7 83 | } elsif (($5.$6) eq 'hasjoined' or ($6.$7) eq 'hasjoined') { 84 | $hash{newjoin} = $3; 85 | 86 | } elsif (($5.$6) eq 'nowknown') { 87 | if ($8 =~ /^\s+(\S+)/) { 88 | $hash{newnick} = $1; 89 | } 90 | } 91 | 92 | return \%hash; 93 | 94 | } else { 95 | return; 96 | } 97 | } 98 | 99 | 1; 100 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/javabot.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::javabot; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '(\d+):\d+:\d+ <([^>\s]+)>\s+(.*)', 14 | actionline => '(\d+):\d+:\d+ \*{1,}\s+(\S+) (.*)', 15 | thirdline => '(\d+):(\d+):\d+ [<-]-[->]\s+(\S+) (\S+) (\S+) (\S+) (\S+) ?(\S+)? ?(.*)?', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if (($4.$5) eq 'haskicked') { 68 | $hash{kicker} = $3; 69 | $hash{nick} = $6; 70 | 71 | } elsif (($4.$5) eq 'haschanged') { 72 | $hash{newtopic} = $9; 73 | 74 | } elsif (($4.$5) eq 'setsmode') { 75 | $hash{newmode} = $6; 76 | 77 | } elsif (($5.$6) eq 'hasjoined') { 78 | $hash{newjoin} = $1; 79 | 80 | } elsif (($5.$6) eq 'isknown') { 81 | $hash{newnick} = $8; 82 | } 83 | 84 | return \%hash; 85 | 86 | } else { 87 | return; 88 | } 89 | } 90 | 91 | 1; 92 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/konversation.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::konversation; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\[[^\[]+\[(\d+)[^\]]+\]\s+<([^>]+)>\s+(.*)$', 14 | actionline => '^\[[^\[]+\[(\d+)[^\]]+\]\s+\*\s(\S+)\s(.*)$', 15 | thirdline => '^\[[^\[]+\[(\d+):(\d+)[^\]]+\]\s(\S+)\s+(\S+)\s(.*)$', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | $hash{hour} = $1; 29 | $hash{nick} = $2; 30 | $hash{saying} = $3; 31 | 32 | return \%hash; 33 | } else { 34 | return; 35 | } 36 | } 37 | 38 | sub actionline 39 | { 40 | my ($self, $line, $lines) = @_; 41 | my %hash; 42 | 43 | if ($line =~ /$self->{actionline}/o) { 44 | $hash{hour} = $1; 45 | $hash{nick} = $2; 46 | $hash{saying} = $3; 47 | 48 | return \%hash; 49 | } else { 50 | return; 51 | } 52 | } 53 | 54 | sub thirdline 55 | { 56 | my ($self, $line, $lines) = @_; 57 | my %hash; 58 | 59 | if ($line =~ /$self->{thirdline}/o) { 60 | $hash{hour} = $1; 61 | $hash{min} = $2; 62 | $hash{nick} = $4; 63 | 64 | if ($4 eq 'You') { 65 | # Hack to remove You as a nick 66 | $hash{nick} = $self->{cfg}->{maintainer}; 67 | } 68 | 69 | if ($3 eq 'Mode') { 70 | $hash{newmode} = $5; 71 | $hash{newmode} =~ s/^[^+-]*//; 72 | 73 | } elsif ($3 eq 'Join') { 74 | $hash{newjoin} = $4; 75 | 76 | } elsif ($3 eq 'Nick') { 77 | $hash{newnick} = $5; 78 | $hash{newnick} =~ s/^.*\s+(\S+)$/$1/; 79 | 80 | } elsif ($3 eq 'Kick') { 81 | if ($5 =~ /^have kicked (\S+) from the channel \((.+)\).$/ ) { 82 | $hash{kicker} = $hash{nick}; 83 | $hash{nick} = $1; 84 | $hash{kicktext} = $2; 85 | } elsif ($5 =~ /^has been kicked from the channel by (\S+) \((.+)\).$/ ) { 86 | $hash{kicker} = $1; 87 | $hash{kicktext} = $2; 88 | } else { 89 | return; 90 | } 91 | 92 | } elsif ($3 eq 'Topic') { 93 | if ($5 =~ /the channel topic to "(.*)"\.$/) { 94 | $hash{newtopic} = $1; 95 | } else { 96 | return; 97 | } 98 | 99 | } 100 | 101 | return \%hash; 102 | 103 | } else { 104 | return; 105 | } 106 | } 107 | 108 | 1; 109 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/kvirc.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::kvirc; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\[(\d+):\d+[^ ]+ <([^>]+)> (.*)', 14 | actionline => '^\[(\d+):\d+[^ ]+ \*\*\* (\S+) (.*)', 15 | thirdline => '^\[(\d+):(\d+)[^ ]+ (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (.*)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if (($4.$5.$6) eq 'hasbeenkicked') { 68 | $hash{kicker} = $10; 69 | 70 | } elsif (($5.$6) eq 'setstopic') { 71 | $hash{newtopic} = ($10.' '.$11); 72 | 73 | } elsif (($5.$6) eq 'setsmode') { 74 | #can't be matched yet 75 | $hash{newmode} = substr($7, 1); 76 | 77 | } elsif (($5.$6) eq 'hasjoined') { 78 | $hash{newjoin} = $1; 79 | 80 | } elsif (($5.$6.$7) eq 'isnowknown') { 81 | $hash{newnick} = $9; 82 | } 83 | 84 | return \%hash; 85 | 86 | } else { 87 | return; 88 | } 89 | } 90 | 91 | 1; 92 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/lulubot.pm: -------------------------------------------------------------------------------- 1 | # This is the lulubot log parser by Vianney Lecroart <acemtp@free.fr> 2 | # More info about lulubot here: http://lulubot.berlios.de and 3 | # here: http://developer.berlios.de/projects/lulubot 4 | # Version tested with the CVS the 12/04/04 5 | 6 | # [22-11-2004/14:42] *** Joined ace (~ace@154.25.145.85) 7 | # [22-11-2004/15:00] <ace> morning 8 | # [22-11-2004/15:01] * ace is back 9 | 10 | package Pisg::Parser::Format::lulubot; 11 | 12 | use strict; 13 | $^W = 1; 14 | 15 | sub new 16 | { 17 | my ($type, %args) = @_; 18 | my $self = { 19 | cfg => $args{cfg}, 20 | normalline => '^\[[^/]+/(\d+):\d+\] <([^>]+)> (.*)$', 21 | actionline => '^\[[^/]+/(\d+):\d+\] \* (\S+) (.*)$', 22 | thirdline => '^\[[^/]+/(\d+):(\d+)\] \*{3} (\S+) (\S+) (.*)$', 23 | }; 24 | 25 | bless($self, $type); 26 | return $self; 27 | } 28 | 29 | sub normalline 30 | { 31 | my ($self, $line, $lines) = @_; 32 | my %hash; 33 | 34 | if ($line =~ /$self->{normalline}/o) { 35 | 36 | # Most log formats are regular enough that you can just match the 37 | # appropriate things with parentheses in the regular expression. 38 | 39 | $hash{hour} = $1; 40 | $hash{nick} = $2; 41 | $hash{saying} = $3; 42 | 43 | return \%hash; 44 | } else { 45 | return; 46 | } 47 | } 48 | 49 | sub actionline 50 | { 51 | my ($self, $line, $lines) = @_; 52 | my %hash; 53 | 54 | if ($line =~ /$self->{actionline}/o) { 55 | 56 | # Most log formats are regular enough that you can just match the 57 | # appropriate things with parentheses in the regular expression. 58 | 59 | $hash{hour} = $1; 60 | $hash{nick} = $2; 61 | $hash{saying} = $3; 62 | 63 | return \%hash; 64 | } else { 65 | return; 66 | } 67 | } 68 | 69 | sub thirdline 70 | { 71 | my ($self, $line, $lines) = @_; 72 | my %hash; 73 | 74 | if ($line =~ /$self->{thirdline}/o) { 75 | 76 | $hash{hour} = $1; 77 | $hash{min} = $2; 78 | $hash{nick} = $3; 79 | 80 | # Format-specific stuff goes here. 81 | 82 | if ($3 eq 'Joined') { 83 | $hash{newjoin} = $4; 84 | $hash{nick} = $4; 85 | } elsif ($4 eq 'changed') { 86 | $5 =~ /^topic to (.*)$/; 87 | $hash{newtopic} = $1; 88 | } elsif ($4 eq 'is') { 89 | $5 =~ /^now known as (.*)$/; 90 | $hash{newnick} = $1; 91 | } 92 | 93 | return \%hash; 94 | } else { 95 | return; 96 | } 97 | } 98 | 99 | 1; 100 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/mIRC.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::mIRC; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\[(\d+):\d+\S+ <([^>]+)> (.*)$', 14 | actionline => '^\[(\d+):\d+\S+ \* (\S+) (.*)$', 15 | thirdline => '^\[(\d+):(\d+)\S+ \*{3} (.+)$' 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{saying} = $3; 31 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{saying} = $3; 48 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | my @line = split(/\s/, $3); 64 | 65 | $hash{hour} = $1; 66 | $hash{min} = $2; 67 | ($hash{nick} = $line[0]) =~ s/^[@%\+~&]//o; # Remove prefix 68 | 69 | if ($#line >= 4 && ($line[1].$line[2]) eq 'waskicked') { 70 | $hash{kicker} = $line[4]; 71 | 72 | } elsif ($#line >= 4 && ($line[1] eq 'changes')) { 73 | $hash{newtopic} = join(' ', @line[4..$#line]); 74 | $hash{newtopic} =~ s/^'//; 75 | $hash{newtopic} =~ s/'$//; 76 | 77 | } elsif ($#line >= 3 && ($line[1].$line[2]) eq 'setsmode:') { 78 | $hash{newmode} = $line[3]; 79 | 80 | } elsif ($#line >= 3 && ($line[2].$line[3]) eq 'hasjoined') { 81 | $hash{newjoin} = $line[0]; 82 | 83 | } elsif ($#line >= 5 && ($line[2].$line[3]) eq 'nowknown') { 84 | $hash{newnick} = $line[5]; 85 | } 86 | 87 | return \%hash; 88 | 89 | } else { 90 | return; 91 | } 92 | } 93 | 94 | 95 | 1; 96 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/mIRC6.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::mIRC6; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | # NOTE: mIRC6's logging format is severly damaged by design. Try to use the 6 | # "mIRC6hack" format instead. 7 | 8 | use strict; 9 | $^W = 1; 10 | 11 | sub new 12 | { 13 | my ($type, %args) = @_; 14 | my $self = { 15 | cfg => $args{cfg}, 16 | normalline => '^\[(\d+):\d+:?\d*\] <([^>]+)> (.*)', 17 | thirdline => '^\[(\d+):(\d+):?\d*\] \* (.+)' 18 | }; 19 | 20 | bless($self, $type); 21 | return $self; 22 | } 23 | 24 | sub normalline 25 | { 26 | my ($self, $line, $lines) = @_; 27 | my %hash; 28 | 29 | if ($line =~ /$self->{normalline}/o) { 30 | 31 | $hash{hour} = $1; 32 | $hash{saying} = $3; 33 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 34 | 35 | return \%hash; 36 | } else { 37 | return; 38 | } 39 | } 40 | 41 | sub actionline 42 | { 43 | my ($self, $line, $lines) = @_; 44 | my %hash; 45 | 46 | return $self->thirdline($line, $lines, 1); 47 | } 48 | 49 | sub thirdline 50 | { 51 | my ($self, $line, $lines, $action) = @_; 52 | my %hash; 53 | 54 | if ($line =~ /$self->{thirdline}/o) { 55 | 56 | my @line = split(/\s/, $3); 57 | 58 | $hash{hour} = $1; 59 | $hash{min} = $2; 60 | $hash{saying} = $3; 61 | ($hash{nick} = $line[0]) =~ s/^[@%\+~&]//o; # Remove prefix 62 | 63 | if ($#line >= 4 && ($line[1].$line[2]) eq 'waskicked' && ($line[$#line] =~ /\)$/)) { 64 | $hash{kicker} = $line[4]; 65 | 66 | } elsif ($#line >= 4 && ($line[1].$line[2]) eq 'werekicked' && ($line[$#line] =~ /\)$/)) { 67 | $hash{kicker} = $line[4]; 68 | $hash{nick} = $self->{cfg}{maintainer}; 69 | 70 | } elsif ($#line >= 4 && ($line[1] eq 'changes') && ($line[$#line] =~ /\'$/)) { 71 | $hash{newtopic} = join(' ', @line[4..$#line]); 72 | $hash{newtopic} =~ s/^'//; 73 | $hash{newtopic} =~ s/'$//; 74 | 75 | } elsif ($#line >= 3 && ($line[1].$line[2]) eq 'setsmode:') { 76 | $hash{newmode} = $line[3]; 77 | 78 | } elsif ($#line == 4 && ($line[2].$line[3]) eq 'hasjoined') { 79 | $hash{newjoin} = $line[0]; 80 | 81 | } elsif ($line[0] eq 'Joins:') { # Alt+O -> IRC -> Options -> Short join/parts 82 | $hash{newjoin} = $line[1]; 83 | 84 | } elsif ($#line == 5 && ($line[2].$line[3]) eq 'nowknown') { 85 | $hash{newnick} = $line[5]; 86 | 87 | } elsif ($action) { 88 | if ( 89 | ($hash{saying} =~ /^Set by \S+ on \S+ \S+ \d+ \d+:\d+:\d+/) || 90 | ($hash{saying} =~ /^Now talking in #\S+/) || 91 | ($hash{saying} =~ /^Topic is \'.*\'/) || 92 | ($hash{saying} =~ /^Disconnected/) || 93 | ($hash{saying} =~ /^\S+ has quit IRC \(.+\)/) || 94 | ($hash{saying} =~ /^\S+ has left \#\S+/) || 95 | ($hash{saying} =~ /^\S+\s\S+ has left \#\S+/) || 96 | ($hash{saying} =~ /^\S+\s\S+ Quit \S+/) || 97 | ($hash{saying} eq "You're not channel operator") || 98 | ($hash{nick} eq 'Attempting' && $hash{saying} =~ /^to rejoin channel/) || 99 | ($hash{nick} eq 'Rejoined' && $hash{saying} =~ /^channel/) || 100 | ($hash{saying} =~ /^Retrieving #\S+ info\.\.\./) 101 | ) { 102 | return 0; 103 | } else { 104 | $hash{saying} =~ s/^\Q$hash{nick}\E //; 105 | return \%hash; 106 | } 107 | 108 | } else { 109 | return; 110 | } 111 | 112 | return \%hash 113 | unless ($action); 114 | 115 | } 116 | return; 117 | } 118 | 119 | 1; 120 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/mIRC6hack.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::mIRC6hack; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | # To use this logging format, add the following to mIRC's remote script 6 | # section: 7 | 8 | =head1 mIRC script 9 | 10 | # 2004-11-21 by coaster 11 | 12 | alias me { 13 | if ($1) { 14 | .describe $active $1- 15 | echo $color(own) -qt $active ** $me $1- 16 | } 17 | else { 18 | echo $color(info) $active * /me: insufficient parameters 19 | } 20 | } 21 | 22 | on ^*:ACTION:*:*:{ 23 | echo $color(action) -lt $iif($chan,$chan,$nick) ** $nick $1- 24 | haltdef 25 | } 26 | 27 | =cut 28 | 29 | use strict; 30 | $^W = 1; 31 | 32 | sub new 33 | { 34 | my ($type, %args) = @_; 35 | my $self = { 36 | cfg => $args{cfg}, 37 | normalline => '^\[(\d+):\d+:?\d*\] <([^>]+)> (.*)', 38 | actionline => '^\[(\d+):\d+:?\d*\] \*\* (\S+) (.+)', 39 | thirdline => '^\[(\d+):(\d+):?\d*\] \* (.+)' 40 | }; 41 | 42 | bless($self, $type); 43 | return $self; 44 | } 45 | 46 | sub normalline 47 | { 48 | my ($self, $line, $lines) = @_; 49 | my %hash; 50 | 51 | if ($line =~ /$self->{normalline}/o) { 52 | 53 | $hash{hour} = $1; 54 | $hash{saying} = $3; 55 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 56 | 57 | return \%hash; 58 | } else { 59 | return; 60 | } 61 | } 62 | 63 | sub actionline 64 | { 65 | my ($self, $line, $lines) = @_; 66 | my %hash; 67 | 68 | if ($line =~ /$self->{actionline}/o) { 69 | 70 | $hash{hour} = $1; 71 | $hash{saying} = $3; 72 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 73 | 74 | return \%hash; 75 | } else { 76 | return; 77 | } 78 | } 79 | 80 | sub thirdline 81 | { 82 | my ($self, $line, $lines, $action) = @_; 83 | my %hash; 84 | 85 | if ($line =~ /$self->{thirdline}/o) { 86 | 87 | my @line = split(/\s/, $3); 88 | 89 | $hash{hour} = $1; 90 | $hash{min} = $2; 91 | $hash{saying} = $3; 92 | ($hash{nick} = $line[0]) =~ s/^[@%\+~&]//o; # Remove prefix 93 | 94 | if ($#line >= 4 && ($line[1].$line[2]) eq 'waskicked' && ($line[$#line] =~ /\)$/)) { 95 | $hash{kicker} = $line[4]; 96 | 97 | } elsif ($#line >= 4 && ($line[1].$line[2]) eq 'werekicked' && ($line[$#line] =~ /\)$/)) { 98 | $hash{kicker} = $line[4]; 99 | $hash{nick} = $self->{cfg}{maintainer}; 100 | 101 | } elsif ($#line >= 4 && ($line[1] eq 'changes') && ($line[$#line] =~ /\'$/)) { 102 | $hash{newtopic} = join(' ', @line[4..$#line]); 103 | $hash{newtopic} =~ s/^'//; 104 | $hash{newtopic} =~ s/'$//; 105 | 106 | } elsif ($#line >= 3 && ($line[1].$line[2]) eq 'setsmode:') { 107 | $hash{newmode} = $line[3]; 108 | 109 | } elsif ($#line == 4 && ($line[2].$line[3]) eq 'hasjoined') { 110 | $hash{newjoin} = $line[0]; 111 | 112 | } elsif ($line[0] eq 'Joins:') { # Alt+O -> IRC -> Options -> Short join/parts 113 | $hash{newjoin} = $line[1]; 114 | 115 | } elsif ($#line == 5 && ($line[2].$line[3]) eq 'nowknown') { 116 | $hash{newnick} = $line[5]; 117 | 118 | } elsif ($action) { 119 | if ( 120 | ($hash{saying} =~ /^Set by \S+ on \S+ \S+ \d+ \d+:\d+:\d+/) || 121 | ($hash{saying} =~ /^Now talking in #\S+/) || 122 | ($hash{saying} =~ /^Topic is \'.*\'/) || 123 | ($hash{saying} =~ /^Disconnected/) || 124 | ($hash{saying} =~ /^\S+ has quit IRC \(.+\)/) || 125 | ($hash{saying} =~ /^\S+ has left \#\S+/) || 126 | ($hash{saying} =~ /^\S+\s\S+ has left \#\S+/) || 127 | ($hash{saying} =~ /^\S+\s\S+ Quit \S+/) || 128 | ($hash{saying} eq "You're not channel operator") || 129 | ($hash{nick} eq 'Attempting' && $hash{saying} =~ /^to rejoin channel/) || 130 | ($hash{nick} eq 'Rejoined' && $hash{saying} =~ /^channel/) || 131 | ($hash{saying} =~ /^Retrieving #\S+ info\.\.\./) 132 | ) { 133 | return 0; 134 | } else { 135 | $hash{saying} =~ s/^\Q$hash{nick}\E //; 136 | return \%hash; 137 | } 138 | 139 | } else { 140 | return; 141 | } 142 | 143 | return \%hash 144 | unless ($action); 145 | 146 | } 147 | return; 148 | } 149 | 150 | 1; 151 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/mbot.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::mbot; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\S+ \S+ [ \d]\d (\d+):\d+:\d+ \d+ <([^>]+)> (?!\001ACTION)(.*)', 14 | actionline => '^\S+ \S+ [ \d]\d (\d+):\d+:\d+ \d+ <([^>]+)> \001ACTION (.*)\001$', 15 | thirdline => '^\S+ \S+ [ \d]\d (\d+):(\d+):\d+ \d+ (\S+) (\S+) ?(\S*) ?(\S*) ?(.*)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if ($4 eq 'KICK') { 68 | $hash{kicker} = $3; 69 | $hash{nick} = $5; 70 | 71 | } elsif ($4 eq 'TOPIC') { 72 | $hash{newtopic} = $5." ".$6." ".$7; 73 | 74 | } elsif ($4 eq 'MODE') { 75 | $hash{newmode} = $5; 76 | 77 | } elsif ($4 eq 'JOIN') { 78 | $3 =~ /^([^!]+)!/; 79 | $hash{newjoin} = $1; 80 | $hash{nick} = $1; 81 | 82 | } elsif ($4 eq 'NICK') { 83 | $hash{newnick} = $5; 84 | } 85 | 86 | return \%hash; 87 | 88 | } else { 89 | return; 90 | } 91 | } 92 | 93 | 1; 94 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/miau.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::miau; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | # This Parser works with miau version 0.5.3, your milage may vary. 5 | 6 | # 2005-05-07 Kresten Kjeldgaard <gathond@gathond.dk> 7 | # This is a version of the muh2 parser that supports the log file format of the 8 | # miau bouncer, mostly topic changes that are handled differently. 9 | 10 | # 2006-10-26 adapted to miau logfile-format 0.6.x by mnh, jha and Myon 11 | 12 | use strict; 13 | $^W = 1; 14 | 15 | sub new 16 | { 17 | my ($type, %args) = @_; 18 | my $self = { 19 | cfg => $args{cfg}, 20 | normalline => '^[a-zA-Z]{3} \d{1,2} (\d+):\d+\S+ <([^>]+)> (.*)$', 21 | actionline => '^[a-zA-Z]{3} \d{1,2} (\d+):\d+\S+ \* (\S+) (.*)$', 22 | thirdline => '^[a-zA-Z]{3} \d{1,2} (\d+):(\d+)\S+ [\-><\*][\-\*]{2} (.+)$' 23 | }; 24 | 25 | bless($self, $type); 26 | return $self; 27 | } 28 | 29 | sub normalline 30 | { 31 | my ($self, $line, $lines) = @_; 32 | my %hash; 33 | 34 | if ($line =~ /$self->{normalline}/o) { 35 | 36 | $hash{hour} = $1; 37 | ($hash{nick} = $2) =~ s/^[@%\+]//o; # Remove prefix 38 | $hash{saying} = $3; 39 | 40 | return \%hash; 41 | } else { 42 | return; 43 | } 44 | } 45 | 46 | sub actionline 47 | { 48 | my ($self, $line, $lines) = @_; 49 | my %hash; 50 | 51 | if ($line =~ /$self->{actionline}/o) { 52 | 53 | $hash{hour} = $1; 54 | ($hash{nick} = $2) =~ s/^[@%\+]//o; # Remove prefix 55 | $hash{saying} = $3; 56 | 57 | return \%hash; 58 | } else { 59 | return; 60 | } 61 | } 62 | 63 | sub thirdline 64 | { 65 | my ($self, $line, $lines) = @_; 66 | my %hash; 67 | 68 | if ($line =~ /$self->{thirdline}/o) { 69 | 70 | my @line = split(/\s/, $3); 71 | 72 | $hash{hour} = $1; 73 | $hash{min} = $2; 74 | ($hash{nick} = $line[0]) =~ s/^[@%\+]//o; # Remove prefix 75 | 76 | if ($#line >= 4 && ($line[1].$line[2]) eq 'waskicked') { 77 | $hash{kicker} = $line[4]; 78 | 79 | } elsif ($#line >= 6 && (($line[1].$line[2]) eq 'haschanged')) { 80 | $hash{newtopic} = join(' ', @line[6..$#line]); 81 | $hash{newtopic} =~ s/^'//; 82 | $hash{newtopic} =~ s/'$//; 83 | 84 | } elsif ($#line >= 3 && ($line[1].$line[2]) eq 'setsmode') { 85 | $hash{newmode} = $line[3]; 86 | 87 | } elsif ($#line >= 3 && ($line[2].$line[3]) eq 'hasjoined') { 88 | $hash{newjoin} = $line[0]; 89 | 90 | } elsif ($#line >= 5 && ($line[2].$line[3]) eq 'nowknown') { 91 | $hash{newnick} = $line[5]; 92 | } 93 | 94 | return \%hash; 95 | 96 | } else { 97 | return; 98 | } 99 | } 100 | 101 | 1; 102 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/moobot.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::moobot; 2 | 3 | use strict; 4 | $^W = 1; 5 | 6 | 7 | sub new 8 | { 9 | my ($type, %args) = @_; 10 | my $self = { 11 | cfg => $args{cfg}, 12 | normalline => '^\d{4}-\d{2}-\d{2} (\d{2}):\d{2}:\d{2} :([^! ]+)(?:![^ ]+)? PUBMSG ([^ ]+) :(.*)', 13 | actionline => '^\d{4}-\d{2}-\d{2} (\d{2}):\d{2}:\d{2} :([^! ]+)(?:![^ ]+)? CTCP ([^ ]+) :ACTION (.*)', 14 | thirdline => '^\d{4}-\d{2}-\d{2} (\d{2}):(\d{2}):\d{2} :([^! ]+)(?:![^ ]+)? ([^ ]+) :?([^ ]+) ?(.*)', 15 | }; 16 | 17 | bless($self, $type); 18 | return $self; 19 | } 20 | 21 | sub normalline 22 | { 23 | my ($self, $line, $lines) = @_; 24 | my %hash; 25 | 26 | if ($line =~ /$self->{normalline}/o and 27 | lc($3) eq lc($self->{cfg}->{channel})) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $4; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o and 45 | lc($3) eq lc($self->{cfg}->{channel})) { 46 | 47 | $hash{hour} = $1; 48 | $hash{nick} = $2; 49 | $hash{saying} = $4; 50 | 51 | return \%hash; 52 | } else { 53 | return; 54 | } 55 | } 56 | 57 | sub thirdline 58 | { 59 | my ($self, $line, $lines) = @_; 60 | my %hash; 61 | 62 | if ($line =~ /$self->{thirdline}/o and 63 | lc($5) eq ($self->{cfg}->{channel})) { 64 | 65 | my $args = $6; 66 | 67 | $hash{hour} = $1; 68 | $hash{min} = $2; 69 | $hash{nick} = $3; 70 | 71 | if ($4 eq "KICK") { 72 | $hash{kicker} = $3; 73 | $args =~ /^([^ ]+)/; 74 | $hash{nick} = $1; 75 | 76 | } elsif ($4 eq "TOPIC") { 77 | $args =~ s/^://; 78 | $hash{newtopic} = $args; 79 | 80 | } elsif ($4 eq "MODE") { 81 | $hash{newmode} = $args; 82 | 83 | } elsif ($4 eq "JOIN") { 84 | $hash{newjoin} = $3; 85 | } 86 | 87 | return \%hash; 88 | 89 | # Nick changes do not have an associated channel. 90 | } elsif ($line =~ /$self->{thirdline}/o and 91 | $4 eq "NICK") { 92 | 93 | $hash{hour} = $1; 94 | $hash{min} = $2; 95 | $hash{nick} = $3; 96 | $hash{newnick} = $5; 97 | 98 | return \%hash; 99 | 100 | } else { 101 | return; 102 | } 103 | } 104 | 105 | 1; 106 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/mozbot.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::mozbot; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | # This is a parser for Mozbot's XMLLogger module, NOT the standard logs! 6 | # File amended from Template.pm by Adam "Fatman" Richardson 7 | 8 | use strict; 9 | $^W = 1; 10 | 11 | sub new 12 | { 13 | my ($type, %args) = @_; 14 | my $self = { 15 | cfg => $args{cfg}, 16 | normalline => '<msg channel="#.+" nick="(.+)" time="(.+)">(.+)</msg>', 17 | actionline => '<emote channel="#.+" nick="(.+)" time="(.+)">(.+)</emote>', 18 | thirdline => '<(.+) channel="#.+" nick="(.+)" time="(.+)">(.*)</.+>', 19 | }; 20 | 21 | bless($self, $type); 22 | return $self; 23 | } 24 | 25 | # Parse a normal line - returns a hash with 'hour', 'nick' and 'saying' 26 | sub normalline 27 | { 28 | my ($self, $line, $lines) = @_; 29 | my %hash; 30 | 31 | if ($line =~ /$self->{normalline}/o) { 32 | my $time = $2; 33 | $hash{nick} = $1; 34 | $hash{saying} = convert($3); 35 | 36 | $time =~ /T(\d\d)/; 37 | $hash{hour} = int($1); 38 | 39 | return \%hash; 40 | } else { 41 | return; 42 | } 43 | } 44 | 45 | # Parse an action line - returns a hash with 'hour', 'nick' and 'saying' 46 | sub actionline 47 | { 48 | my ($self, $line, $lines) = @_; 49 | my %hash; 50 | 51 | if ($line =~ /$self->{actionline}/o) { 52 | my $time = $2; 53 | $hash{nick} = $1; 54 | $hash{saying} = convert($3); 55 | 56 | $time =~ /T(\d\d)/; 57 | $hash{hour} = int($1); 58 | 59 | return \%hash; 60 | } else { 61 | return; 62 | } 63 | } 64 | 65 | # Parses the 'third' line - (the third line is everything else, like 66 | # topic changes, mode changes, kicks, etc.) 67 | sub thirdline 68 | { 69 | my ($self, $line, $lines) = @_; 70 | my %hash; 71 | 72 | if ($line =~ /$self->{thirdline}/o) { 73 | my $time = $3; 74 | my $act = $1; 75 | my $nick = $2; 76 | my $doing = convert($4); 77 | 78 | $time =~ /T(\d\d):(\d\d)/; 79 | $hash{hour} = int($1); 80 | $hash{min} = int($2); 81 | 82 | $hash{nick} = $nick; 83 | 84 | if ($act eq 'kick') { 85 | $hash{nick} = $doing; 86 | $hash{kicker} = $nick; 87 | $hash{kicktext} = ''; 88 | 89 | } elsif ($act eq 'mode') { 90 | $hash{newmode} = $doing; 91 | 92 | } elsif ($act eq 'join') { 93 | $hash{newjoin} = $nick; 94 | 95 | } elsif ($act eq 'topic') { 96 | $hash{newtopic} = $doing; 97 | } 98 | 99 | return \%hash; 100 | } else { 101 | return; 102 | } 103 | } 104 | 105 | # Convert XML-entities 106 | sub convert 107 | { 108 | my $string = shift; 109 | $string =~ s/'/\'/g; 110 | $string =~ s/"/\"/g; 111 | $string =~ s/>/>/g; 112 | $string =~ s/</</g; 113 | $string =~ s/&/&/g; 114 | return $string; 115 | } 116 | 117 | 1; 118 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/muh.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::muh; 2 | 3 | # This is a Parser vor the well-known "muh-bouncer" 4 | # by Bastian Friedrichs and Sebastian Erlhofer 5 | # parser@boitl.org 6 | 7 | use strict; 8 | $^W = 1; 9 | 10 | sub new 11 | { 12 | my ($type, %args) = @_; 13 | my $self = { 14 | cfg => $args{cfg}, 15 | normalline => '^\[\w\w\w \d\d \w\w\w (\d+):\d+:\d+\] <([^>\s]+)>\s+(.*)', 16 | actionline => '^\[\w\w\w \d\d \w\w\w (\d+):\d+:\d+\] <([^>\s]+)>\sACTION\s+(.*)', 17 | #thirdline => '^\[\w\w\w \d\d \w\w\w (\d+):(\d+):\d+\] \*\*\*\s+(\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (.*)', 18 | thirdline => '^\[\w\w\w \d\d \w\w\w (\d+):(\d+):\d+\] \*\*\*\s+(\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (\S*)(.*)', 19 | }; 20 | 21 | bless($self, $type); 22 | return $self; 23 | } 24 | 25 | sub normalline 26 | { 27 | my ($self, $line, $lines) = @_; 28 | my %hash; 29 | 30 | if ($line =~ /$self->{normalline}/o and !($line =~ /$/)) { 31 | 32 | $hash{hour} = $1; 33 | $hash{nick} = $2; 34 | $hash{saying} = $3; 35 | 36 | return \%hash; 37 | } else { 38 | return; 39 | } 40 | } 41 | 42 | sub actionline 43 | { 44 | my ($self, $line, $lines) = @_; 45 | my %hash; 46 | 47 | if ($line =~ /$self->{actionline}/o) { 48 | 49 | $hash{hour} = $1; 50 | $hash{nick} = $2; 51 | 52 | $hash{saying} = $3; 53 | 54 | return \%hash; 55 | } else { 56 | return; 57 | } 58 | } 59 | 60 | sub thirdline 61 | { 62 | my ($self, $line, $lines) = @_; 63 | my %hash; 64 | 65 | if ($line =~ /$self->{thirdline}/o) { 66 | 67 | $hash{hour} = $1; 68 | $hash{min} = $2; 69 | $hash{nick} = $3; 70 | 71 | # Format-specific stuff goes here. 72 | 73 | if (($3.$6) eq 'Kickby') { 74 | $hash{kicker} = $7; 75 | $hash{nick} = $5; 76 | 77 | } elsif (($3.$4) eq 'Topicchange') { 78 | $hash{newtopic} = $10; 79 | #$hash{newtopic} = $9.$10; 80 | #$hash{newtopic} =~ s/^.* \):(.*)/$9$10/; 81 | $hash{nick} = $8; 82 | 83 | 84 | } elsif ($3 eq 'Mode') { 85 | my $nm; 86 | $nm = substr($5, 1); 87 | if (($nm eq "+o") || ($nm eq "-o")) { 88 | $hash{nick} = $8; 89 | $hash{newmode} = $nm; 90 | } 91 | elsif (($nm eq "+oo") || ($nm eq "-oo")) { 92 | $hash{nick} = $9; 93 | $hash{newmode} = $nm; 94 | } 95 | elsif (($nm eq "+ooo") || ($nm eq "-ooo")) { 96 | $hash{nick} = substr($10, 1, index($10, ' ', 1)-1); 97 | $hash{newmode} = $nm; 98 | } 99 | 100 | 101 | } elsif (($2.$3) eq '\*\*\*Join') { 102 | $hash{newjoin} = $5; 103 | } 104 | 105 | 106 | return \%hash; 107 | 108 | } else { 109 | return; 110 | } 111 | } 112 | 113 | 1; 114 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/muh2.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::muh2; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | # This Parser works with muh version muh-2.1 and above. 5 | # muh got a new log-format, so this is version 2 6 | # contact: boitl @ IRC, sebastian@mquant.de, 09/2003 7 | # note: 8 | # muh-2.1 is buggy in action-loggin. 9 | # apply http://www.mquant.de/downloads/muh-actionpatch.diff 10 | 11 | 12 | use strict; 13 | $^W = 1; 14 | 15 | sub new 16 | { 17 | my ($type, %args) = @_; 18 | my $self = { 19 | cfg => $args{cfg}, 20 | normalline => '^\[(\d+):\d+\S+ <([^>]+)> (.*)$', 21 | actionline => '^\[(\d+):\d+\S+ \* (\S+) (.*)$', 22 | thirdline => '^\[(\d+):(\d+)\S+ \*{3} (.+)$' 23 | }; 24 | 25 | bless($self, $type); 26 | return $self; 27 | } 28 | 29 | sub normalline 30 | { 31 | my ($self, $line, $lines) = @_; 32 | my %hash; 33 | 34 | if ($line =~ /$self->{normalline}/o) { 35 | 36 | $hash{hour} = $1; 37 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 38 | $hash{saying} = $3; 39 | 40 | return \%hash; 41 | } else { 42 | return; 43 | } 44 | } 45 | 46 | sub actionline 47 | { 48 | my ($self, $line, $lines) = @_; 49 | my %hash; 50 | 51 | if ($line =~ /$self->{actionline}/o) { 52 | 53 | $hash{hour} = $1; 54 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 55 | $hash{saying} = $3; 56 | 57 | return \%hash; 58 | } else { 59 | return; 60 | } 61 | } 62 | 63 | sub thirdline 64 | { 65 | my ($self, $line, $lines) = @_; 66 | my %hash; 67 | 68 | if ($line =~ /$self->{thirdline}/o) { 69 | 70 | my @line = split(/\s/, $3); 71 | 72 | $hash{hour} = $1; 73 | $hash{min} = $2; 74 | ($hash{nick} = $line[0]) =~ s/^[@%\+~&]//o; # Remove prefix 75 | 76 | if ($#line >= 4 && ($line[1].$line[2]) eq 'waskicked') { 77 | $hash{kicker} = $line[4]; 78 | 79 | } elsif ($#line >= 4 && ($line[1] eq 'changes')) { 80 | $hash{newtopic} = join(' ', @line[4..$#line]); 81 | $hash{newtopic} =~ s/^'//; 82 | $hash{newtopic} =~ s/'$//; 83 | 84 | } elsif ($#line >= 3 && ($line[1].$line[2]) eq 'setsmode') { 85 | $hash{newmode} = $line[3]; 86 | 87 | } elsif ($#line >= 3 && ($line[2].$line[3]) eq 'hasjoined') { 88 | $hash{newjoin} = $line[0]; 89 | 90 | } elsif ($#line >= 5 && ($line[2].$line[3]) eq 'nowknown') { 91 | $hash{newnick} = $line[5]; 92 | } 93 | 94 | return \%hash; 95 | 96 | } else { 97 | return; 98 | } 99 | } 100 | 101 | 1; 102 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/oer.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::oer; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | use POSIX qw(strftime); 7 | $^W = 1; 8 | 9 | sub new 10 | { 11 | my ($type, %args) = @_; 12 | my $self = { 13 | cfg => $args{cfg}, 14 | 15 | normalline => '^(\d+)\s+:([^!]+)[^ ]+ PRIVMSG (\#[^ ]+) :([^\001].*)', 16 | actionline => '^(\d+)\s+:([^!]+)[^ ]+ PRIVMSG (\#[^ ]+) :\001ACTION (.*)', 17 | thirdline => '^(\d+)\s+:([^!]+)[^ ]+ ([A-Z]+) (.*)', 18 | }; 19 | 20 | bless($self, $type); 21 | return $self; 22 | } 23 | 24 | sub normalline 25 | { 26 | my ($self, $line, $lines) = @_; 27 | my %hash; 28 | 29 | if ($line =~ /$self->{normalline}/o && lc($3) eq lc($self->{cfg}->{channel})) { 30 | 31 | $hash{hour} = strftime "%H", localtime($1); 32 | $hash{nick} = $2; 33 | $hash{saying} = $4; 34 | 35 | return \%hash; 36 | } else { 37 | return; 38 | } 39 | } 40 | 41 | sub actionline 42 | { 43 | my ($self, $line, $lines) = @_; 44 | my %hash; 45 | 46 | if ($line =~ /$self->{actionline}/o && lc($3) eq lc($self->{cfg}->{channel})) { 47 | 48 | $hash{hour} = strftime "%H", localtime($1); 49 | $hash{nick} = $2; 50 | $hash{saying} = $4; 51 | 52 | return \%hash; 53 | } else { 54 | return; 55 | } 56 | } 57 | 58 | sub thirdline 59 | { 60 | my ($self, $line, $lines) = @_; 61 | my %hash; 62 | my $tmp; 63 | 64 | if ($line =~ /$self->{thirdline}/o) { 65 | 66 | $hash{hour} = strftime "%H", localtime($1); 67 | $hash{min} = strftime "%M", localtime($1); 68 | $hash{nick} = $2; 69 | 70 | my @arr = split(" ", $4); 71 | if ($3 eq 'KICK' && lc($arr[0]) eq lc($self->{cfg}->{channel})) { 72 | $hash{kicker} = $hash{nick}; 73 | $hash{nick} = $arr[1]; 74 | 75 | } elsif ($3 eq 'TOPIC' && lc($arr[0]) eq lc($self->{cfg}->{channel})) { 76 | $tmp = join(" ", @arr[1..$#arr]); 77 | $tmp =~ s/^://; 78 | $hash{newtopic} = $tmp; 79 | 80 | } elsif ($3 eq 'MODE' && lc($arr[0]) eq lc($self->{cfg}->{channel})) { 81 | $hash{newmode} = $arr[1]; 82 | 83 | } elsif ($3 eq 'JOIN' && lc($arr[0]) eq ":".lc($self->{cfg}->{channel})) { 84 | $hash{newjoin} = $3; 85 | 86 | } elsif ($3 eq 'NICK') { 87 | $arr[0] =~ s/^://; 88 | $hash{newnick} = $arr[0]; 89 | } 90 | 91 | return \%hash; 92 | 93 | } else { 94 | return; 95 | } 96 | } 97 | 98 | 1; 99 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/perlbot.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::perlbot; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^(\d+):\d+:\d+[^ ]+ <([^>]+)> (.*)', 14 | actionline => '^(\d+):\d+:\d+[^ ]+ \* (\S+) (.*)', 15 | thirdline => '^(\d+):(\d+):\d+[^ ]+ (\S+) (\S+) (\S+) (\S+) (\S+) (\S+)(.*)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | ($hash{nick} = $4) =~ s/^[@%\+~&]//o; # Remove prefix 66 | 67 | if (($3) eq '[KICK]') { 68 | $hash{kicker} = $8; 69 | 70 | } elsif ($3 eq '[TOPIC]') { 71 | $hash{newtopic} = "$5 $6 $7 $8 $9"; 72 | 73 | } elsif (($3) eq '[MODE]') { 74 | $hash{newmode} = $7; 75 | 76 | } elsif (($5) eq 'joined') { 77 | $hash{newjoin} = $3; 78 | 79 | } elsif (($3) eq '[NICK]') { 80 | $hash{newnick} = $8; 81 | } 82 | 83 | return \%hash; 84 | 85 | } else { 86 | return; 87 | } 88 | } 89 | 90 | 1; 91 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/pircbot.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::pircbot; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $ctcpchr = chr(1); 12 | 13 | my $self = { 14 | cfg => $args{cfg}, 15 | normalline => '^(\d+)\s:([^!]+)![^@]+@\S+\sPRIVMSG\s([#&+!]\S+)\s:([^' . $ctcpchr . '].*)$' 16 | . '|' . 17 | '^(\d+)\s(>>>)PRIVMSG\s([#&+!]\S+)\s:([^' . $ctcpchr . '].*)$', 18 | actionline => '^(\d+)\s:([^!]+)![^@]+@\S+\sPRIVMSG\s([#&+!]\S+)\s:' . $ctcpchr . 'ACTION (.+)' . $ctcpchr . '\s*$' 19 | . '|' . 20 | '^(\d+)\s(>>>)PRIVMSG\s([#&+!]\S+)\s:' . $ctcpchr . 'ACTION (.+)' . $ctcpchr . '\s*$', 21 | thirdline => '^(\d+)\s:([^!]+)![^@]+@\S+\s(.+)$' 22 | . '|' . 23 | '^(\d+)\s(>>>)([^P].+)$', 24 | }; 25 | 26 | bless($self, $type); 27 | return $self; 28 | } 29 | 30 | sub normalline 31 | { 32 | my ($self, $line, $lines) = @_; 33 | my %hash; 34 | 35 | if ($line =~ /$self->{normalline}/o) { 36 | if (defined($8)) { 37 | return unless (lc($7) eq lc($self->{cfg}->{channel})); 38 | 39 | my @time = localtime($5 / 1000); 40 | $hash{hour} = $time[2]; 41 | $hash{nick} = $6; 42 | $hash{saying} = $8; 43 | } else { 44 | return unless (lc($3) eq lc($self->{cfg}->{channel})); 45 | 46 | my @time = localtime($1 / 1000); 47 | $hash{hour} = $time[2]; 48 | $hash{nick} = $2; 49 | $hash{saying} = $4; 50 | } 51 | 52 | $hash{nick} = $self->{cfg}->{maintainer} 53 | if ($hash{nick} eq '>>>'); 54 | 55 | return \%hash; 56 | } else { 57 | return; 58 | } 59 | } 60 | 61 | sub actionline 62 | { 63 | my ($self, $line, $lines) = @_; 64 | my %hash; 65 | 66 | if ($line =~ /$self->{actionline}/o) { 67 | if (defined($8)) { 68 | return unless (lc($7) eq lc($self->{cfg}->{channel})); 69 | 70 | my @time = localtime($5 / 1000); 71 | $hash{hour} = $time[2]; 72 | $hash{nick} = $6; 73 | $hash{saying} = $8; 74 | } else { 75 | return unless (lc($3) eq lc($self->{cfg}->{channel})); 76 | 77 | my @time = localtime($1 / 1000); 78 | $hash{hour} = $time[2]; 79 | $hash{nick} = $2; 80 | $hash{saying} = $4; 81 | } 82 | 83 | $hash{nick} = $self->{cfg}->{maintainer} 84 | if ($hash{nick} eq '>>>'); 85 | 86 | return \%hash; 87 | } else { 88 | return; 89 | } 90 | } 91 | 92 | sub thirdline 93 | { 94 | my ($self, $line, $lines) = @_; 95 | my %hash; 96 | 97 | if ($line =~ /$self->{thirdline}/o) { 98 | my ($time, @line); 99 | if (defined($6)) { 100 | my @time = localtime($4 / 1000); 101 | $hash{hour} = $time[2]; 102 | $hash{min} = $time[1]; 103 | $hash{nick} = $self->{cfg}->{maintainer}; 104 | 105 | @line = split(/\s+/, $6); 106 | } else { 107 | my @time = localtime($1 / 1000); 108 | $hash{hour} = $time[2]; 109 | $hash{min} = $time[1]; 110 | $hash{nick} = $2; 111 | 112 | @line = split(/\s+/, $3); 113 | } 114 | 115 | if ($line[0] eq 'KICK') { 116 | return unless (lc($line[1]) eq lc($self->{cfg}->{channel})); 117 | $hash{kicker} = $hash{nick}; 118 | $hash{nick} = $line[2]; 119 | 120 | } elsif ($line[0] eq 'TOPIC') { 121 | return unless (lc($line[1]) eq lc($self->{cfg}->{channel})); 122 | $hash{newtopic} = join(' ', @line[2..$#line]); 123 | $hash{newtopic} =~ s/^://; 124 | 125 | } elsif ($line[0] eq 'MODE') { 126 | return unless (lc($line[1]) eq lc($self->{cfg}->{channel})); 127 | $hash{newmode} = join(' ', @line[2..$#line]); 128 | 129 | } elsif ($line[0] eq 'JOIN') { 130 | return unless (lc($line[1]) eq ':' . lc($self->{cfg}->{channel})); 131 | $hash{newjoin} = $hash{nick}; 132 | 133 | } elsif ($line[0] eq 'NICK') { 134 | $hash{newnick} = $line[1]; 135 | $hash{newnick} =~ s/^://; 136 | } 137 | 138 | 139 | return \%hash; 140 | 141 | } else { 142 | return; 143 | } 144 | } 145 | 146 | 1; 147 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/psybnc.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::psybnc; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\d+-\d+-\d+-(\d+)-\d+-\d+:[^:]+::([^!]+)[^:]+ PRIVMSG [^:]+:([^\001]+)', 14 | actionline => '^\d+-\d+-\d+-(\d+)-\d+-\d+:[^:]+::([^!]+)[^:]+:\001ACTION ([^\001]*)', 15 | thirdline => '^\d+-\d+-\d+-(\d+)-(\d+)-\d+:[^:]+::([^! .]+)[^ ]* (\w+) \S+ :?((\S*)\s*(.*))', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if ($4 eq 'KICK') { 68 | $hash{kicker} = $hash{nick}; 69 | $hash{nick} = $6; 70 | 71 | } elsif ($4 eq 'TOPIC') { 72 | $hash{newtopic} = $5; 73 | 74 | } elsif ($4 eq 'MODE') { 75 | $hash{newmode} = $6; 76 | 77 | } elsif ($4 eq 'JOIN') { 78 | $hash{newjoin} = $3; 79 | 80 | } elsif ($4 eq 'NICK') { # does this work? 81 | $hash{newnick} = $6; 82 | } 83 | 84 | return \%hash; 85 | 86 | } else { 87 | return; 88 | } 89 | } 90 | 91 | 1; 92 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/rbot.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::rbot; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | # 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '\[\d+/\d+/\d+ (\d+):\d+:\d+\] <([^>\s]+)>\s+(.*)', 14 | actionline => '\[\d+/\d+/\d+ (\d+):\d+:\d+\] \*{1,}\s+(\S+) (.*)', 15 | thirdline => '\[\d+/\d+/\d+ (\d+):(\d+):\d+\] @ ([^:\s]+):? ([^:\s]+):? (\S+) (\S+) ?(\S+)? ?(.*)?', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if ($3 and (($3) eq 'quit')) { 68 | $hash{nick} = undef; 69 | 70 | } elsif ($3 and (($3) eq 'Quit')) { 71 | $hash{nick} = $4; 72 | 73 | } elsif (($3) eq 'Mode') { 74 | 75 | if (($4) eq '+o') { 76 | $hash{newmode} = '+o'; 77 | $hash{nick} = $5; 78 | 79 | } elsif (($4) eq '-o') { 80 | $hash{newmode} = '-o'; 81 | $hash{nick} = $5; 82 | 83 | } elsif (($4) eq '+v') { 84 | $hash{newmode} = '+v'; 85 | $hash{nick} = $5; 86 | 87 | } elsif (($4) eq '-v') { 88 | $hash{newmode} = '-v'; 89 | $hash{nick} = $5; 90 | 91 | } 92 | 93 | }elsif (($4.$5) eq 'joinedchannel') { 94 | $hash{nick} = $3; 95 | $hash{newjoin} = $3; 96 | 97 | }elsif (($4.$5) eq 'settopic') { 98 | my $newtopic; 99 | if ($8 and $7 and $6) { 100 | $newtopic = "$6 $7 $8"; 101 | } elsif ($7 and $6) { 102 | $newtopic = "$6 $7"; 103 | } else { 104 | $newtopic = $6; 105 | } 106 | $hash{newtopic} = $newtopic; 107 | 108 | }elsif (($4.$5.$6.$7) eq 'isnowknownas') { 109 | $hash{nick} = $3; 110 | $hash{newnick} = $8; 111 | } 112 | 113 | 114 | return \%hash; 115 | 116 | } else { 117 | return; 118 | } 119 | } 120 | 121 | 1; 122 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/sirc.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::sirc; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | # parser for logs from sirc 5 | # based on module by bartko <bartek09@netscape.net> 6 | 7 | # the timestamps are needed for statistics generation 8 | # for timestamping use the timestep script for sirc 9 | # included in scripts/sirc-timestamp.pl 10 | 11 | use strict; 12 | $^W = 1; 13 | 14 | sub new 15 | { 16 | my ($type, %args) = @_; 17 | my $self = { 18 | cfg => $args{cfg}, 19 | normalline => '(\d+):\d+ <([^>\s]+)>\s+(.*)', 20 | actionline => '(\d+):\d+ \* (\S+) (.*)', 21 | thirdline => '(\d+):(\d+) \*(.)\* (.*)', 22 | }; 23 | 24 | bless($self, $type); 25 | return $self; 26 | } 27 | 28 | sub normalline 29 | { 30 | my ($self, $line, $lines) = @_; 31 | my %hash; 32 | 33 | if ($line =~ /$self->{normalline}/o) { 34 | 35 | $hash{hour} = $1; 36 | $hash{nick} = $2; 37 | $hash{saying} = $3; 38 | 39 | return \%hash; 40 | } else { 41 | return; 42 | } 43 | } 44 | 45 | sub actionline 46 | { 47 | my ($self, $line, $lines) = @_; 48 | my %hash; 49 | 50 | if ($line =~ /$self->{actionline}/o) { 51 | 52 | $hash{hour} = $1; 53 | $hash{nick} = $2; 54 | $hash{saying} = $3; 55 | 56 | return \%hash; 57 | } else { 58 | return; 59 | } 60 | } 61 | 62 | sub thirdline 63 | { 64 | my ($self, $line, $lines) = @_; 65 | my %hash; 66 | 67 | if ($line =~ /$self->{thirdline}/o) { 68 | 69 | $hash{hour} = $1; 70 | $hash{min} = $2; 71 | 72 | if ($3 eq '>') { 73 | if ($4 =~ /^(\S+) \S+ has joined channel \S+$/) { 74 | $hash{newjoin} = $1; 75 | $hash{nick} = $1; 76 | } elsif ($4 =~ /^You have joined channel \S+$/) { 77 | $hash{newjoin} = $self->{cfg}->{maintainer}; 78 | $hash{nick} = $self->{cfg}->{maintainer}; 79 | } 80 | 81 | } elsif ($3 eq '<') { 82 | if ($4 =~ /^(\S+) has been kicked off channel \S+ by (\S+) \((.*)\)$/) { 83 | $hash{kicker} = $2; 84 | $hash{nick} = $1; 85 | $hash{kicktext} = $3; 86 | } elsif ($4 =~ /^You have been kicked off channel \S+ by (\S+)/) { 87 | $hash{kicker} = $1; 88 | $hash{nick} = $self->{cfg}->{maintainer}; 89 | $hash{kicktext} = $2; 90 | } 91 | 92 | } elsif ($3 eq 'T') { 93 | if ($4 =~ /^(\S+) has changed the topic on channel \S+ to \"(.+)\"$/) { 94 | $hash{newtopic} = $2; 95 | $hash{nick} = $1; 96 | } elsif ($4 =~ /^You have changed the topic on channel \S+ to \"(.+)\"$/) { 97 | $hash{newtopic} = $1; 98 | $hash{nick} = $self->{cfg}->{maintainer}; 99 | } elsif ($4 =~ /^Topic for \S+: (.+)$/) { 100 | $self->{topic_temp} = $1; 101 | } elsif ($self->{topic_temp} && ($4 =~ /^Topic for \S+ set by ([^!]+)!\S+/)) { 102 | $hash{nick} = $1; 103 | $hash{newtopic} = $self->{topic_temp}; 104 | delete $self->{topic_temp}; 105 | } 106 | 107 | } elsif ($3 eq '+' && ($4 =~ /^Mode change \"(\S+) ([^\"]+)\" on channel \S+ by (\S+)/)) { 108 | $hash{newmode} = $1; 109 | $hash{modechanges} = $2; 110 | $hash{nick} = $3; 111 | 112 | } elsif ($3 eq 'N' && ($4 =~ /^(S+) is now known as (S+)$/)) { 113 | $hash{nick} = $1; 114 | $hash{newnick} = $2; 115 | 116 | } 117 | 118 | return \%hash; 119 | 120 | } else { 121 | return; 122 | } 123 | } 124 | 125 | 1; 126 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/supy.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::supy; 2 | 3 | # pisg log parser for supybot bot 4 | # http://supybot.com/ 5 | # Copyright Jerome Kerdreux / Licence GPL 6 | # contact Jerome.Kerdreux@finix.eu.org for more information 7 | 8 | # This module supports both the old and new logformat (after 1.8.7) 9 | 10 | 11 | use strict; 12 | $^W = 1; 13 | 14 | sub new 15 | { 16 | my ($type, %args) = @_; 17 | my $timestamp = '\d+-[\d\w]+-\d+[ T](\d+):\d+:\d+'; 18 | my $thirdtimestamp = '\d+-[\d\w]+-\d+[ T](\d+):(\d+):\d+'; 19 | my $self = { 20 | cfg => $args{cfg}, 21 | # Old default timestamp format 22 | # [12-Feb-2004 16:59:42] <philipss> plop 23 | # New default timestamp format 24 | # 2004-02-12T16:59:42 <philipss> plop 25 | normalline => '^\[?'.$timestamp.']? <(\S+)> (.*)', 26 | # [05-Mar-2004 17:28:10] * Jkx|home bon je vais pas trainer .. 27 | actionline => '^\[?'.$timestamp.']? \* (\S+) (.*)', 28 | # [17-Feb-2004 08:13:47] *** Jkx changes topic to "Oh my god of topic" 29 | thirdline => '\[?'.$thirdtimestamp.']? \*\*\* (\S+) (\S+) (\S+) (\S+) ?(.*)?', 30 | }; 31 | 32 | bless($self, $type); 33 | return $self; 34 | } 35 | 36 | sub normalline 37 | { 38 | my ($self, $line, $lines) = @_; 39 | my %hash; 40 | 41 | if ($line =~ /$self->{normalline}/o) { 42 | $hash{hour} = $1; 43 | $hash{nick} = $2; 44 | $hash{saying} = $3; 45 | 46 | return \%hash; 47 | } else { 48 | return; 49 | } 50 | } 51 | 52 | sub actionline 53 | { 54 | my ($self, $line, $lines) = @_; 55 | my %hash; 56 | 57 | if ($line =~ /$self->{actionline}/o) { 58 | 59 | $hash{hour} = $1; 60 | $hash{nick} = $2; 61 | $hash{saying} = $3; 62 | 63 | return \%hash; 64 | } else { 65 | return; 66 | } 67 | } 68 | 69 | sub thirdline 70 | { 71 | my ($self, $line, $lines) = @_; 72 | my %hash; 73 | 74 | if ($line =~ /$self->{thirdline}/o) { 75 | 76 | $hash{hour} = $1; 77 | $hash{min} = $2; 78 | $hash{nick} = $3; 79 | 80 | # print "*** 1/$1 2/$2 3/$3 4/$4 5/$5 6/$6 7/$7 ***\n"; 81 | 82 | if (($4.$5) eq 'waskicked') { 83 | $hash{kicker} = $7; 84 | ($hash{kicktext} = $hash{kicker}) =~ s/\S+\s*//; 85 | $hash{kicker} =~ s/\s.*//; 86 | $hash{kicktext} =~ s/^\((.*)\)$/$1/; 87 | } elsif (($4.$5) eq 'changestopic') { 88 | $hash{newtopic} = $7; 89 | } elsif (($4.$5) eq 'setsmode:') { 90 | $hash{newmode} = $6; 91 | $hash{modechanges} = $7; 92 | } elsif (($4.$5) eq 'hasjoined') { 93 | $hash{newjoin} = $3; 94 | } elsif (($5.$6) eq 'nowknown') { 95 | $hash{newnick} = $7; 96 | $hash{newnick} =~ s/^as\s*//; 97 | } 98 | 99 | return \%hash; 100 | 101 | } else { 102 | return; 103 | } 104 | } 105 | 106 | 1; 107 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/virc98.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::virc98; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | # Parser for MeGALiTH's Visual IRC 98 on IRCnet (nicks lenght 9 chars) 5 | # by HceZar hcezar@freemail.it 6 | # Fender @ IRCnet #oristano,#italymania 7 | 8 | use strict; 9 | $^W = 1; 10 | 11 | sub new 12 | { 13 | my ($type, %args) = @_; 14 | my $self = { 15 | cfg => $args{cfg}, 16 | normalline => '^(\d+)\.\d+[^ ]+ [<\[](.{1,9})[\]>]\s+(.*)', 17 | actionline => '^(\d+)\.\d+[^ ]+ \* (\S+) (.*)', 18 | thirdline => '^(\d+)\.(\d+)[^ ]+.* \*\*\* (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (\S+) (\S+)(.*)', 19 | }; 20 | 21 | bless($self, $type); 22 | return $self; 23 | } 24 | 25 | sub normalline 26 | { 27 | my ($self, $line, $lines) = @_; 28 | my %hash; 29 | 30 | if ($line =~ /$self->{normalline}/o) { 31 | 32 | $hash{hour} = $1; 33 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 34 | $hash{saying} = $3; 35 | 36 | return \%hash; 37 | } else { 38 | return; 39 | } 40 | } 41 | 42 | sub actionline 43 | { 44 | my ($self, $line, $lines) = @_; 45 | my %hash; 46 | 47 | if ($line =~ /$self->{actionline}/o) { 48 | 49 | $hash{hour} = $1; 50 | ($hash{nick} = $2) =~ s/^[@%\+~&]//o; # Remove prefix 51 | $hash{saying} = $3; 52 | 53 | return \%hash; 54 | } else { 55 | return; 56 | } 57 | } 58 | 59 | sub thirdline 60 | { 61 | my ($self, $line, $lines) = @_; 62 | my %hash; 63 | 64 | if ($line =~ /$self->{thirdline}/o) { 65 | 66 | $hash{hour} = $1; 67 | $hash{min} = $2; 68 | 69 | if (($4.$5) eq 'haskicked') { 70 | $hash{kicker} = $3; 71 | $hash{nick} = $6; 72 | 73 | } elsif ($4.$5.$6.$7 eq 'haschangedthetopic') { 74 | $hash{nick} = $3; 75 | $hash{newtopic} = "$11"; 76 | 77 | } elsif (($3.$4) eq 'Modechange') { 78 | $hash{newmode} = remove_braces($5); 79 | $hash{nick} = $11; 80 | 81 | } elsif (($5.$6) eq 'hasjoined') { 82 | $hash{newjoin} = $3; 83 | $hash{nick} = $3; 84 | 85 | } elsif (($5.$6) eq 'nowknown') { 86 | $hash{newnick} = $8; 87 | $hash{nick} = $3; 88 | } 89 | 90 | return \%hash; 91 | 92 | } else { 93 | return; 94 | } 95 | } 96 | 97 | sub remove_braces 98 | { 99 | my $str = shift; 100 | 101 | $str =~ s/^\[//; 102 | 103 | return $str; 104 | } 105 | 1; 106 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/weechat.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::weechat; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\d+ \S+ \d+ (\d+):\d+[^<]+<([^>]+)> (.*)', 14 | actionline => '^\d+ \S+ \d+ (\d+):\d+:\d+ -\*- (\S+) (.*)', 15 | thirdline => '^\d+ \S+ \d+ (\d+):(\d+):\d+ (?:-=-|<--|-->) (\S+) (\S+) (\S+) (\S+) (\S+)(.*)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if (($4.$5) eq 'haskicked') { 68 | $hash{nick} = $6; 69 | $hash{kicker} = $3; 70 | 71 | } elsif ($4.$5.$6 eq 'haschangedtopic') { 72 | $hash{newtopic} = $8; 73 | $hash{newtopic} =~ m/to:(.*)/; 74 | $hash{newtopic} = $1; 75 | 76 | } elsif ($3 eq 'Mode') { 77 | $hash{newmode} = substr($5, 1); 78 | $hash{nick} = $8 || $7; 79 | $hash{nick} =~ s/.* (\S+)$/$1/; # Get the last word of the string 80 | 81 | } elsif (($5.$6) eq 'hasjoined') { 82 | $hash{newjoin} = $3; 83 | 84 | } elsif (($5.$6) eq 'nowknown') { 85 | if ($8 =~ /^\s+(\S+)/) { 86 | $hash{newnick} = $1; 87 | } 88 | } 89 | 90 | return \%hash; 91 | 92 | } else { 93 | return; 94 | } 95 | } 96 | 97 | 1; 98 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/weechat3.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::weechat3; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^\d+-\d+-\d+ (\d+):\d+:\d+\t[@%+~&]?([^ <-]\S+)\t(.*)', 14 | actionline => '^\d+-\d+-\d+ (\d+):\d+:\d+\t \*\t(\S+) (.*)', 15 | thirdline => '^\d+-\d+-\d+ (\d+):(\d+):\d+\t(?:--|<--|-->)\t(\S+) (\S+) (\S+) (\S+) (\S+)(.*)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $3; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $3; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | 61 | if ($line =~ /$self->{thirdline}/o) { 62 | 63 | $hash{hour} = $1; 64 | $hash{min} = $2; 65 | $hash{nick} = $3; 66 | 67 | if (($4.$5) eq 'haskicked') { 68 | $hash{nick} = $6; 69 | $hash{kicker} = $3; 70 | 71 | } elsif ($4.$5.$6 eq 'haschangedtopic') { 72 | $hash{newtopic} = $8; 73 | $hash{newtopic} =~ m/" to "(.*)"/; 74 | $hash{newtopic} = $1; 75 | 76 | } elsif (($5.$6) eq 'hasjoined') { 77 | $hash{newjoin} = $3; 78 | 79 | } elsif (($5.$6) eq 'nowknown') { 80 | if ($8 =~ /^\s+(\S+)/) { 81 | $hash{newnick} = $1; 82 | } 83 | } elsif ($3 eq 'Mode') { 84 | $hash{newmode} = substr($5, 1); 85 | $hash{nick} = $8 || $7; 86 | $hash{nick} =~ s/.* (\S+)$/$1/; # Get the last word of the string 87 | } 88 | 89 | return \%hash; 90 | 91 | } else { 92 | return; 93 | } 94 | } 95 | 96 | 1; 97 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/winbot.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::winbot; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^(\d\d):\d\d\.\d\d \d+\/\d+\/\d+ <([^\/]+)\/([^\>]+)> (.*)', 14 | actionline => '^(\d\d):\d\d\.\d\d \d+\/\d+\/\d+ \* ([^\/]+)\/(\S+) (.*)', 15 | thirdline => '^(\d\d):(\d\d)\.\d\d \d+\/\d+\/\d+ \*{3}\s(.+)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o && lc($3) eq lc($self->{cfg}->{channel})) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $4; 32 | 33 | return \%hash; 34 | } 35 | return; 36 | } 37 | 38 | sub actionline 39 | { 40 | my ($self, $line, $lines) = @_; 41 | my %hash; 42 | 43 | if ($line =~ /$self->{actionline}/o && lc($3) eq lc($self->{cfg}->{channel})) { 44 | 45 | $hash{hour} = $1; 46 | $hash{nick} = $2; 47 | $hash{saying} = $4; 48 | 49 | return \%hash; 50 | } 51 | return; 52 | } 53 | 54 | sub thirdline 55 | { 56 | my ($self, $line, $lines) = @_; 57 | my %hash; 58 | 59 | if ($line =~ /$self->{thirdline}/o) { 60 | 61 | $hash{hour} = $1; 62 | $hash{min} = $2; 63 | $hash{nick} = $3; 64 | 65 | if ($3 =~ /^(\S+) was kicked from (\S+) by (\S+) .+/) { 66 | if (lc($2) eq lc($self->{cfg}->{channel})) { 67 | $hash{nick} = $1; 68 | $hash{kicker} = $3; 69 | } 70 | 71 | } elsif ($3 =~ /^([^\/]+)\/(\S+) changes topic to \"(.+)\"[^\"]*$/) { 72 | if (lc($2) eq lc($self->{cfg}->{channel})) { 73 | $hash{nick} = $1; 74 | $hash{newtopic} = $3; 75 | } 76 | 77 | } elsif ($3 =~ /^([^\/]+)\/(\S+) sets mode: (\S+) [^\)]+/) { 78 | if (lc($2) eq lc($self->{cfg}->{channel})) { 79 | $hash{nick} = $1; 80 | $hash{newmode} = $3; 81 | } 82 | 83 | } elsif ($3 =~ /^(\S+) has joined (\S+)/) { 84 | if (lc($2) eq lc($self->{cfg}->{channel})) { 85 | $hash{nick} = $1; 86 | $hash{newjoin} = $1; 87 | } 88 | 89 | } elsif ($3 =~ /^(\S+) is now known as (\S+)/) { 90 | $hash{nick} = $1; 91 | $hash{newnick} = $2; 92 | 93 | } elsif ($3 =~ /^(\S+) /) { 94 | $hash{nick} = $1; 95 | 96 | } 97 | 98 | return \%hash; 99 | 100 | } else { 101 | return; 102 | } 103 | } 104 | 105 | 1; 106 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/xchat.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::xchat; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | # This module supports both the old and new logformat (after 1.8.7) 6 | 7 | use strict; 8 | $^W = 1; 9 | 10 | sub new 11 | { 12 | my ($type, %args) = @_; 13 | my $self = { 14 | cfg => $args{cfg}, 15 | normalline => '(\d+):\d+:\d+ <[@%+~&]?([^>\s]+)>\s+(.*)', 16 | actionline => '(\d+):\d+:\d+ \*{1,}\s+(\S+) (.*)', 17 | thirdline => '(\d+):(\d+):\d+ [<-]-[->]\s+(\S+) (\S+) (\S+) (\S+) ((\S+)\s*(\S+)?\s*(.*)?)', 18 | }; 19 | 20 | bless($self, $type); 21 | return $self; 22 | } 23 | 24 | sub normalline 25 | { 26 | my ($self, $line, $lines) = @_; 27 | my %hash; 28 | 29 | if ($line =~ /$self->{normalline}/o) { 30 | 31 | $hash{hour} = $1; 32 | $hash{nick} = $2; 33 | $hash{saying} = $3; 34 | 35 | return \%hash; 36 | } else { 37 | return; 38 | } 39 | } 40 | 41 | sub actionline 42 | { 43 | my ($self, $line, $lines) = @_; 44 | my %hash; 45 | 46 | if ($line =~ /$self->{actionline}/o) { 47 | 48 | $hash{hour} = $1; 49 | $hash{nick} = $2; 50 | $hash{saying} = $3; 51 | 52 | return \%hash; 53 | } else { 54 | return; 55 | } 56 | } 57 | 58 | sub thirdline 59 | { 60 | my ($self, $line, $lines) = @_; 61 | my %hash; 62 | 63 | if ($line =~ /$self->{thirdline}/o) { 64 | 65 | $hash{hour} = $1; 66 | $hash{min} = $2; 67 | $hash{nick} = $3; 68 | 69 | if (($4.$5) eq 'haskicked') { 70 | $hash{kicker} = $3; 71 | $hash{nick} = $6; 72 | 73 | } elsif (($4.$5) eq 'haschanged') { 74 | $hash{newtopic} = $10; 75 | 76 | } elsif (($4.$5.$6) eq 'giveschanneloperator') { 77 | $hash{newmode} = '+o'; 78 | 79 | } elsif (($4.$5.$6) eq 'removeschanneloperator') { 80 | $hash{newmode} = '-o'; 81 | 82 | } elsif (($4.$5.$6) eq 'giveschannelhalf-operator') { 83 | $hash{newmode} = '+h'; 84 | 85 | } elsif (($4.$5.$6) eq 'removeschannelhalf-operator') { 86 | $hash{newmode} = '-h'; 87 | 88 | } elsif (($4.$5) eq 'givesvoice') { 89 | $hash{newmode} = '+v'; 90 | 91 | } elsif (($4.$5) eq 'removesvoice') { 92 | $hash{newmode} = '-v'; 93 | 94 | } elsif (($5.$6) eq 'hasjoined') { 95 | $hash{newjoin} = $1; 96 | 97 | } elsif (($5.$6) eq 'nowknown') { 98 | $hash{newnick} = $9; 99 | 100 | } elsif (($3.$4.$6) eq 'Topicforis') { 101 | $self->{topictemp} = $7; 102 | $hash{newtopic} = $7; 103 | 104 | } elsif (($3.$4.$6) eq 'Topicforset') { 105 | $hash{nick} = $9; 106 | $hash{newtopic} = $self->{topictemp}; 107 | 108 | } 109 | 110 | return \%hash; 111 | 112 | } else { 113 | return; 114 | } 115 | } 116 | 117 | 1; 118 | -------------------------------------------------------------------------------- /modules/Pisg/Parser/Format/zcbot.pm: -------------------------------------------------------------------------------- 1 | package Pisg::Parser::Format::zcbot; 2 | 3 | # Documentation for the Pisg::Parser::Format modules is found in Template.pm 4 | 5 | use strict; 6 | $^W = 1; 7 | 8 | sub new 9 | { 10 | my ($type, %args) = @_; 11 | my $self = { 12 | cfg => $args{cfg}, 13 | normalline => '^[^ ]+ (\d+):[^ ]+ :([^!]+)[^ ]+ PRIVMSG (\#[^ ]+) :([^\001].*)', 14 | actionline => '^[^ ]+ (\d+):[^ ]+ :([^!]+)[^ ]+ PRIVMSG (\#[^ ]+) :\001ACTION (.*)', 15 | thirdline => '^[^ ]+ (\d+):(\d+):\d+ :([^!]+)[^ ]+ ([A-Z]+) (.*)', 16 | }; 17 | 18 | bless($self, $type); 19 | return $self; 20 | } 21 | 22 | sub normalline 23 | { 24 | my ($self, $line, $lines) = @_; 25 | my %hash; 26 | 27 | if ($line =~ /$self->{normalline}/o && lc($3) eq lc($self->{cfg}->{channel})) { 28 | 29 | $hash{hour} = $1; 30 | $hash{nick} = $2; 31 | $hash{saying} = $4; 32 | 33 | return \%hash; 34 | } else { 35 | return; 36 | } 37 | } 38 | 39 | sub actionline 40 | { 41 | my ($self, $line, $lines) = @_; 42 | my %hash; 43 | 44 | if ($line =~ /$self->{actionline}/o && lc($3) eq lc($self->{cfg}->{channel})) { 45 | 46 | $hash{hour} = $1; 47 | $hash{nick} = $2; 48 | $hash{saying} = $4; 49 | 50 | return \%hash; 51 | } else { 52 | return; 53 | } 54 | } 55 | 56 | sub thirdline 57 | { 58 | my ($self, $line, $lines) = @_; 59 | my %hash; 60 | my $tmp; 61 | 62 | if ($line =~ /$self->{thirdline}/o) { 63 | 64 | $hash{hour} = $1; 65 | $hash{min} = $2; 66 | $hash{nick} = $3; 67 | 68 | my @arr = split(" ", $5); 69 | if ($4 eq 'KICK' && lc($arr[0]) eq lc($self->{cfg}->{channel})) { 70 | $hash{kicker} = $hash{nick}; 71 | $hash{nick} = $arr[1]; 72 | 73 | } elsif ($4 eq 'TOPIC' && lc($arr[0]) eq lc($self->{cfg}->{channel})) { 74 | $tmp = join(" ", @arr[1..$#arr]); 75 | $tmp =~ s/^://; 76 | $hash{newtopic} = $tmp; 77 | 78 | } elsif ($4 eq 'MODE' && lc($arr[0]) eq lc($self->{cfg}->{channel})) { 79 | $hash{newmode} = $arr[1]; 80 | 81 | } elsif ($4 eq 'JOIN' && lc($arr[0]) eq ":".lc($self->{cfg}->{channel})) { 82 | $hash{newjoin} = $3; 83 | 84 | } elsif ($4 eq 'NICK') { 85 | $arr[0] =~ s/^://; 86 | $hash{newnick} = $arr[0]; 87 | } 88 | 89 | return \%hash; 90 | 91 | } else { 92 | return; 93 | } 94 | } 95 | 96 | 1; 97 | -------------------------------------------------------------------------------- /pisg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use strict; 4 | use Getopt::Long; 5 | 6 | # pisg - Perl IRC Statistics Generator 7 | # 8 | # Copyright (C) 2001-2012 The pisg project 9 | # 10 | # This program is free software; you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation; either version 2 of the License, or 13 | # (at your option) any later version. 14 | # 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with this program; if not, write to the Free Software 22 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 | 24 | sub main 25 | { 26 | my $script_dir = $0; 27 | 28 | # If the script was executed as ./pisg - then we just remove 29 | # everything after the last slash, if it was executed as 'perl pisg' 30 | # we assume that we are executing in the current dir. 31 | if ($script_dir =~ m/\/[^\/]*$/) { 32 | $script_dir =~ s/\/[^\/]*$//; 33 | } else { 34 | $script_dir = "."; 35 | } 36 | 37 | if (!-t STDOUT) { # we are not writing to a terminal 38 | push @ARGV, "--silent"; 39 | } 40 | 41 | my $cfg = get_cmdline_options($script_dir); 42 | unshift(@INC, $cfg->{modules_dir}); 43 | 44 | my $version; 45 | if ($cfg->{version}) { 46 | $version = 1; 47 | undef $cfg->{version}; 48 | } 49 | 50 | my $pisg; 51 | eval <<END; 52 | 53 | use Pisg; 54 | 55 | \$pisg = new Pisg( 56 | use_configfile => '1', 57 | override_cfg => \$cfg, 58 | search_path => \$script_dir, 59 | ); 60 | 61 | if (\$version) { 62 | print \$pisg->{cfg}->{version} . "\n"; 63 | } else { 64 | \$pisg->run(); 65 | } 66 | END 67 | if ($@) { 68 | print STDERR "Could not load pisg! Reason:\n$@\n"; 69 | return undef; 70 | } 71 | } 72 | 73 | sub get_cmdline_options 74 | { 75 | my $script_dir = shift; 76 | 77 | my %cfg = ( 78 | modules_dir => "$script_dir/modules/", # Module search path 79 | logfile => [], 80 | logdir => [], 81 | ); 82 | 83 | # Commandline options 84 | my ($tmp, $help, $silent, $option, @cfg); 85 | 86 | my $usage = <<END_USAGE; 87 | Usage: pisg [-ch channel] [-l logfile] [-o outputfile] [-ma maintainer] 88 | [-f format] [-ne network] [-d logdir] [-mo moduledir] [-s] [-v] [-h] 89 | 90 | -ch --channel=xxx : Set channel name 91 | -cc --cchannels=xxx : Only do this channel from cfg file, give multiple 92 | times to do multiple channels 93 | -l --logfile=xxx : Log file to parse, give multiple times to use 94 | multiple log files. 95 | -o --outfile=xxx : Name of HTML file to create 96 | -t --tag=xxx : Replace \%t in --outfile by xxx 97 | -ma --maintainer=xxx : Channel/statistics maintainer 98 | -f --format=xxx : Logfile format [see FORMATS file] 99 | -ne --network=xxx : IRC network for the channel 100 | -d --dir=xxx : Analyze all files in this dir. Ignores logfile. 101 | Give multiple times to use multiple directories. 102 | -nf --nfiles=xxx : Analyze the last xxx files if used with --dir 103 | -p --prefix=xxx : Analyze only files prefixed by xxx in dir 104 | Only works with --dir 105 | -cf --cfg opt=value : Specify configuration options, eg. -cf ShowWpl=1 106 | -co --configfile=xxx : Configuration file 107 | -mo --moduledir=xxx : Directory containing pisg modules 108 | -s --silent : Suppress output (except error messages) 109 | -v --version : Show version 110 | -h --help : Output this message and exit. 111 | 112 | Example: 113 | 114 | \$ pisg -ne IRCnet -f xchat -o suid.html -ch \\#channel -l logfile.log 115 | 116 | All options may also be defined by editing the configuration file and 117 | calling pisg without arguments. 118 | END_USAGE 119 | 120 | if (GetOptions('channel=s' => \$cfg{channel}, 121 | 'cchannels=s@' => \@{ $cfg{cchannels} }, 122 | 'logfile=s' => \@{ $cfg{logfile} }, 123 | 'format=s' => \$cfg{format}, 124 | 'network=s' => \$cfg{network}, 125 | 'maintainer=s' => \$cfg{maintainer}, 126 | 'outfile=s' => \$cfg{outputfile}, 127 | 'tag=s' => \$cfg{outputtag}, 128 | 'dir=s' => \@{ $cfg{logdir} }, 129 | 'nfiles=i' => \$cfg{nfiles}, 130 | 'prefix=s' => \$cfg{logprefix}, 131 | 'moduledir=s' => \$cfg{moduledir}, 132 | 'configfile=s' => \$cfg{configfile}, 133 | 'ignorefile=s' => \$tmp, 134 | 'aliasfile=s' => \$tmp, 135 | 'silent' => \$silent, 136 | 'version' => \$cfg{version}, 137 | 'cfg=s' => \@cfg, 138 | 'help|?' => \$help 139 | ) == 0 or $help) { 140 | die($usage); 141 | } 142 | 143 | if ($tmp) { 144 | die("The aliasfile and ignorefile has been obsoleted by the new 145 | pisg.cfg, please use that instead [see pisg.cfg]\n"); 146 | } 147 | 148 | if ($silent) { $cfg{silent} = 1; } 149 | 150 | if (@cfg) { 151 | foreach (@cfg) { 152 | if (/(.*)=(.*)/) { 153 | $cfg{lc $1} = $2; 154 | } else { 155 | print STDERR "Warning: Couldn't parse -cfg option\n"; 156 | } 157 | } 158 | } 159 | 160 | return \%cfg; 161 | 162 | } 163 | 164 | main(); # Run the script 165 | -------------------------------------------------------------------------------- /pisg.cfg: -------------------------------------------------------------------------------- 1 | # Config file for pisg (set up all your channels/logfiles here) 2 | # For a list of all configuration options, see docs/pisg-doc.txt or 3 | # docs/html/index.html for a HTML version. 4 | 5 | <set maintainer ="Your nickname"> 6 | <user nick="Sebastien" alias="Sebastien Sebastien-" sex="m" pic="seb.jpg"> 7 | <set FoulWords="ass fuck bitch shit fucker cunt cock dick penis"> 8 | <set ViolentWords="slaps beats kick hits smacks stabs"> 9 | <set DailyActivity="31"> 10 | <set PicLocation="pics/"> 11 | <set ImagePath="pics/"> 12 | <set PicHeight="50"> 13 | <set PicWidth="55"> 14 | <set ShowWpl="1"> 15 | <set ShowCpl="1"> 16 | <set ShowWords="1"> 17 | <set ShowLineTime="1"> 18 | <set ShowFoulLine="1"> 19 | <set ShowMostNicks="1"> 20 | <set ShowSmileys="1"> 21 | <set ShowKarma="1"> 22 | <set ShowMostActiveByHour="1"> 23 | <set TopicHistory="10"> 24 | <set KarmaHistory="15"> 25 | <set NickTracking="1"> 26 | <user nick="\" alias=""> 27 | <user nick="x" ignore="y"> 28 | <user nick="chanserv" ignore="y"> 29 | <user nick="nickserv" ignore="y"> 30 | <user nick="saslserv" ignore="y"> 31 | 32 | <channel="#channel"> 33 | Logfile="channel2.log" 34 | Format="mIRC" 35 | Network="SomeIRCNet" 36 | OutputFile="index.html" 37 | </channel> 38 | 39 | # (Eggdrop setup example) 40 | <channel="#pisg"> 41 | LogDir="/home/user/eggdrop/logs/" 42 | LogPrefix="%23pisg." 43 | Format="eggdrop" 44 | Network="freenode" 45 | OutputFile="/var/www/html/eggy.html" 46 | </channel> 47 | 48 | -------------------------------------------------------------------------------- /scripts/Cleaner Index/README.txt: -------------------------------------------------------------------------------- 1 | Just add .htaccess dark-style.css index.php and recache.php to your /www/ folder, to make the listing of files nicer. 2 | 3 | chmod both .php files 4 | 5 | recache.php to rwxr----- (740) 6 | index.php to rwxr--r-- (744) 7 | 8 | Then refresh :) 9 | 10 | 11 | Thanks to OverCoder @ freenode for this addition. -------------------------------------------------------------------------------- /scripts/Cleaner Index/dark-style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #222222; 3 | padding-left: 2%; 4 | padding-right: 2%; 5 | } 6 | 7 | h1, h2, h3, h4, h5, h6, p, td, th { 8 | color: #EEEEEE; 9 | font-family: Consolas, monospace; 10 | } 11 | 12 | th { 13 | text-align: center; 14 | padding: 8px; 15 | font-size: 1.1em; 16 | } 17 | 18 | td { 19 | padding: 8px; 20 | } 21 | 22 | table { 23 | width: 100%; 24 | background: #333333; 25 | text-align: center; 26 | border: 0; 27 | } 28 | 29 | table tr:nth-child(even) { 30 | background-color: #444444; 31 | } 32 | 33 | table tr:nth-child(odd) { 34 | background-color: #333333; 35 | } 36 | 37 | table tr:hover { 38 | background: #252525; 39 | cursor: pointer; 40 | } 41 | 42 | h1.center, h2.center, h3.center, h4.center, h5.center, h6.center, p.center { 43 | text-align: center; 44 | } 45 | 46 | a, a:visited { 47 | color: #EEEEEE; 48 | } 49 | 50 | a:hover { 51 | color:#DDDDDD; 52 | } 53 | 54 | table, tr, th, td { 55 | border-collapse: collapse; 56 | } 57 | 58 | pre code { 59 | border: 1px solid #555555; 60 | border-radius: 5px; 61 | background-color: #333333; 62 | padding: 12px; 63 | display: block; 64 | } 65 | 66 | a.nostyle { 67 | text-decoration: none; 68 | } -------------------------------------------------------------------------------- /scripts/Cleaner Index/index.php: -------------------------------------------------------------------------------- 1 | <?php 2 | 3 | $cache = file_get_contents("index-cache.txt") or die("Cache file not found!"); 4 | $json = json_decode($cache, true); 5 | 6 | ?> 7 | <!DOCTYPE html> 8 | <html> 9 | <head> 10 | <title>Stats generated by #pisg @ freenode 11 | 12 | 41 | 42 | 43 |

Stats generated by #pisg @ freenode

44 |

Last updated:

45 | 46 | 47 | 48 | 49 | 50 | $data) { 53 | if ($channel === "refresh_date") 54 | continue; 55 | echo ''; 56 | echo ''; 57 | echo ''; 58 | echo ''; 59 | } 60 | 61 | ?> 62 |
ChannelUsers
' . $channel . '' . $data["users"] . '
63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /scripts/Cleaner Index/recache.php: -------------------------------------------------------------------------------- 1 | loadHTML(file_get_contents($channel)); 15 | 16 | $name = explode(" @ ", $html->getElementsByTagName("title")->item(0)->textContent)[0]; 17 | $date = ""; 18 | $nicksCount = ""; 19 | $temp = $html->getElementById("pagetitle2"); 20 | if (!is_null($temp)) 21 | $date = explode("on ", $temp->textContent)[1]; 22 | $temp = $html->getElementById("pagetitle3"); 23 | if (!is_null($temp)) 24 | $usersCount = $temp->getElementsByTagName("b")->item(0)->textContent; 25 | $cache_data[$name] = array("file" => $channel, "date" => $date, "users" => $usersCount); 26 | } 27 | $cache_data["refresh_date"] = date('l jS \of F Y h:i:s A'); 28 | fwrite($cache, json_encode($cache_data)); 29 | 30 | ?> 31 | -------------------------------------------------------------------------------- /scripts/addalias/README: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # # 3 | # addalias version 2.0 by deadlock (deadlock@cheeseheadz.net) # 4 | # # 5 | # This script can be used on a webpage for users to enter and edit their # 6 | # own info for the pisg ircstats program by mbrix. # 7 | # # 8 | # addalias v2+ is based on the original addalias program by Doomshammer # 9 | # # 10 | ############################################################################# 11 | 12 | 13 | Info: 14 | -- 15 | This script is intended as an add-on for pisg 16 | . After seeing Addalias.pl by Doomshammer it 17 | inspired me to write a more powerfull version of it which would also allow 18 | people to change their information instead of just adding it. This way it 19 | would allow me to enter some basic nicklinking info for those too lazy to do 20 | it themselves. I also decided to make it a script only version which would 21 | not require additional html files and give it more configuration options. 22 | 23 | 24 | 25 | Installation: 26 | -- 27 | Make sure the webserver has read and write access to the pisg.cfg file (the 28 | script will let you know when it has permissions to read or write). Change 29 | the $pisg_config variable to the location of the pisg.cfg file on your 30 | system. Put the addalias.pl file in the cgi-bin directory. You can link 31 | directly to the addalias.pl, no need to add an html file to it. If you want 32 | to you can customise the text and layout (colors in the html head tag) of 33 | the pages to your own liking or language by editing the appropriate 34 | variables in addalias.pl. The names of the variables and default text should 35 | explain themselves. 36 | 37 | 38 | 39 | Release history: 40 | -- 41 | 42 | Version 2.2: 43 | ------------ 44 | Some modifications by icu (me@1cu.de): 45 | * added a hardcoded baseurl 46 | * added check for nick-field in input 47 | * added list botton to get a list of all aliases 48 | 49 | Version 2.1: 50 | ------------ 51 | * Made nicks in config file incasesensitive 52 | 53 | Version 2.0: 54 | ------------ 55 | * Initial release of the improved version 56 | by deadlock. 57 | 58 | Version 1.0: 59 | ------------ 60 | * Initial release by Doomshammer 61 | -------------------------------------------------------------------------------- /scripts/crontab: -------------------------------------------------------------------------------- 1 | # In order to run pisg in crontab, then do 'crontab -e' as a normal user, 2 | # and insert a line like this: 3 | 4 | */10 * * * * /path/to/pisg --silent 5 | 6 | # This will make pisg run every 10 minutes, or you could do it every hour 7 | # by doing this: 8 | 9 | 0 * * * * /path/to/pisg --silent 10 | -------------------------------------------------------------------------------- /scripts/dropegg.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Drop Egg 4 | # 5 | # This script takes a heap of daily eggdrop logs and changes them around 6 | # to look a little more mIRC-like. (So that they can be fed through PISG 7 | # and whatnot) 8 | # 9 | # Copyright 2001, Emil Mikulic. 10 | 11 | use Time::Local; 12 | 13 | $logdir = "/home/darkmoon/eggdrop/logs"; 14 | $logname = "gencorp.log"; 15 | $outfile = "gencorp.out"; 16 | $channel = "#gencorp"; 17 | 18 | open(OUTFILE, ">$outfile"); 19 | 20 | foreach (`ls $logdir/$logname.*`) 21 | { 22 | chomp( $current_log = $_ ); 23 | print "Sanitizing $current_log..."; 24 | 25 | ($year,$mon,$day) = $current_log =~ /$logdir\/$logname\.(\d\d\d\d)(\d\d)(\d\d)/; 26 | $time = timelocal(1,0,0,$day,$mon,$year); 27 | print OUTFILE "\nSession Start: " . localtime($time) . "\n"; 28 | print OUTFILE "[00:00] *** Now talking in $channel\n"; 29 | 30 | foreach (`cat $current_log`) 31 | { 32 | chomp( $line = $_ ); 33 | 34 | $line =~ s/\cB//g; 35 | $line =~ s/\c_//g; 36 | $line =~ s/\cO//g; 37 | $line =~ s/\cC\d+//g; 38 | 39 | # [02:25] DTails (~Dtails@co3033554-a.mckinn1.vic.optushome.com.au) joined #gencorp. 40 | # [14:48] *** shai (cmot_dblah@a1-46.melbpc.org.au) has joined #breakfastclub 41 | 42 | if (($line =~ /joined/) && !($line =~ /\ DT|Work 72 | # [14:53] *** Death is now known as Memnoch 73 | 74 | if ($line =~ /\[\d\d\:\d\d\] Nick change/) 75 | { 76 | $line =~ s/(\[\d\d\:\d\d\]) Nick change\: (\S+) \-\> (\S+)/$1 *** $2 is now known as $3/; 77 | } 78 | 79 | # [11:23] #gencorp: mode change '+o ark|tv' by curtis!~curtis@co... 80 | # [11:23] *** curtis sets mode: +o ark 81 | if ($line =~ /\[\d\d\:\d\d\] \#\S+ mode change/) 82 | { 83 | ($timestamp,$mode,$setter) = $line =~ 84 | /(\[\d\d\:\d\d\]) \#\S+ mode change \'([^']+)\' by ([^!]+)\!/; 85 | $line = "$timestamp *** $setter sets mode: $mode"; 86 | } 87 | 88 | # [19:32] Gumpy kicked from #gencorp by curtis: flood 89 | # [18:49] *** darkmoon was kicked by dark|away (BLAM!) 90 | if ($line =~ /\[\d\d\:\d\d\] \S+ kicked from \#/) 91 | { 92 | ($timestamp,$victim,$kicker,$reason) = $line =~ 93 | /(\[\d\d\:\d\d\]) (\S+) kicked from \#\S+ by ([^:]+)\: (.+)/; 94 | $line = "$timestamp *** $victim was kicked by $kicker ($reason)"; 95 | } 96 | 97 | # [00:48] Topic changed on #gen by arknstone!~...: 98 | # [14:43] *** arknstone changes topic to 'this is a test' 99 | if ($line =~ /\[\d\d\:\d\d\] Topic changed/) 100 | { 101 | ($timestamp,$changer,$topic) = $line =~ 102 | /(\[\d\d\:\d\d\]) Topic changed on \#\S+ by ([^!]+)\![^:]+\: (.+)/; 103 | $line = "$timestamp *** $changer changes topic to '$topic'"; 104 | } 105 | 106 | 107 | 108 | if (!(($line =~ /got lost/) && !($line =~ /\[\d\d\:\d\d\] \mirc) 3 | # For those channel stat generators that accept only mirc log format 4 | # use: awk -f egg2mirc.awk channel.log > mircformat.log 5 | # 6 | # Gandalf the Grey 7 | # "The Song Remains The Same" - Led Zeppelin 8 | # 9 | /\[..\:..\] <.+>/ { print $0 10 | next } 11 | /\[..\:..\] Action:/ { $2="*" 12 | print $0 13 | next } 14 | /\[..\:..\] .+ (.+) joined #/ { print $1 " *** " $2 " " $3 " has " $4 " " substr($5,1,length($5)-1) 15 | next } 16 | /\[..\:..\] .+ (.+) left #/ { print $1 " *** " $2 " " $3 " has " $4 " " substr($5,1,length($5)-1) 17 | next } 18 | /\[..\:..\] .+ (.+) left irc/ { print $1 " *** " $2 " " $3 " Quit (" $6 "...)" 19 | next } 20 | /\[..\:..\] .+ kicked from #/ { print $1 " *** " $2 " was " $3 " by " substr($7,1,length($7)-1) " (" $8 "...)" 21 | next } 22 | /\[..\:..\] #.+\: mode change / { if (index($NF,"!")!=0) print $1 " *** " substr($NF,1,index($NF,"!")-1) " sets mode: " substr($0,index($0,"'")+1,length($0)-length($(NF))-index($0,"'")-5) 23 | else print $1 " *** " $NF " sets mode: " substr($0,index($0,"'")+1,length($0)-length($(NF))-index($0,"'")-5)} 24 | -------------------------------------------------------------------------------- /scripts/eggdrop-pisg.tcl: -------------------------------------------------------------------------------- 1 | #pisg.tcl v0.15 by HM2K - auto stats script for pisg (perl irc statistics generator) 2 | #based on a script by Arganan 3 | 4 | # WARNING - READ THIS 5 | # 6 | # If you use this script, PLEASE read the documentation about the "Silent" 7 | # option. If you get the message "an error occured: Pisg v0.** - perl irc 8 | # statistics generator" in the channel, you are NOT running silent. Fix it. 9 | 10 | set pisgver "0.16" 11 | 12 | #Location of pisg execuitable perl script 13 | set pisgexe "/home/bot/pisg-0.73/pisg" 14 | 15 | #URL of the generated stats 16 | set pisgurl "http://nemesisforce.com/ircstats" 17 | 18 | #channel that the stats are generated for 19 | set pisgchan "#pisg" 20 | 21 | #Users with these flags can operate this function (friendly/friends by default) 22 | set pisgflags "f" 23 | 24 | #How often the stats will be updated in minutes, ie: 30 - stats will be updated every 30 minutes 25 | set pisgtime "180" 26 | 27 | bind pub $pisgflags !pisgstats pub:pisgcmd1 28 | 29 | proc pub:pisgcmd1 {nick host hand chan arg} { 30 | global pisgexe pisgurl 31 | append out "PRIVMSG $chan :" 32 | if {[catch {exec $pisgexe} error]} { 33 | append out "$pisgexe an error occured: [string totitle $error]" 34 | } else { 35 | append out "Stats: [string tolower ${pisgurl}[string trimleft $chan # ].html]" 36 | } 37 | puthelp $out 38 | } 39 | 40 | proc pisgcmd_timer {} { 41 | global pisgexe pisgurl pisgtime chan 42 | append out "PRIVMSG gchan :" 43 | if {[catch {exec $pisgexe} error]} { 44 | append out "$pisgexe an error occured: [string totitle $error]" 45 | } else { 46 | append out "Stats: [string tolower ${pisgurl}[string trimleft $chan # ].html]" 47 | } 48 | puthelp $out 49 | timer $pisgtime pisgcmd_timer 50 | } 51 | 52 | if {![info exists {pisgset}]} { 53 | set pisgset 1 54 | timer 2 pisgcmd_timer 55 | } 56 | 57 | putlog "pisg.tcl $pisgver loaded" 58 | -------------------------------------------------------------------------------- /scripts/mirc2egg.sed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PISG/pisg/c0d38ca231340e154d81074d74e945d4b69b5af0/scripts/mirc2egg.sed -------------------------------------------------------------------------------- /scripts/mirc6hack.mrc: -------------------------------------------------------------------------------- 1 | ;2004-11-21 by coaster 2 | 3 | alias me { 4 | if ($1) { 5 | .describe $active $1- 6 | echo $color(own) -qt $active ** $me $1- 7 | } 8 | else { 9 | echo $color(info) $active * /me: insufficient parameters 10 | } 11 | } 12 | 13 | on ^*:ACTION:*:*:{ 14 | echo $color(action) -lt $iif($chan,$chan,$nick) ** $nick $1- 15 | haltdef 16 | } 17 | -------------------------------------------------------------------------------- /scripts/pum/pum.conf: -------------------------------------------------------------------------------- 1 | [pisg] 2 | # Defines where the user data is located. This file must be writeable 3 | # by the user the pum.pl script is running under (this user often is 4 | # called "www", "wwwdata", "apache" or similar). Also note that this 5 | # file should only contain user info, since it will be overwritten by 6 | # pum.pl. 7 | user_config = users.conf 8 | 9 | [cgi] 10 | # If commented, pum handles CSS internally. Comment it in to use an 11 | # external CSS file. Do not put the CSS file into the cgi-bin 12 | # directory where pum.pl itself is located -- because it won't work in 13 | # most installations since the cgi-bin directory is reserved for CGI 14 | # scripts only. 15 | #css = /css/pum.css 16 | 17 | # Set it to the same as ImagePath in pisg.conf. 18 | pics_prefix = /pics/ 19 | 20 | # Turn on some more debug info. Can also be triggerd by using 21 | # 'debug=1' in the query string, e.g. with 22 | # http://your.webserver/cgi-bin/pum.pl?debug=1 23 | debug = 0 24 | 25 | # Are users allowed to remove nicks? 1 = yes 0 = no 26 | user_del = 1 27 | 28 | # how many chars to display in the summarylist 29 | alias_disp = 30 30 | 31 | [backup] 32 | # Should pum.pl create a backup file each time it changes something? 33 | # Note that the user this script is running under must have permission 34 | # to write to the directory option below. 35 | enable = 0 36 | 37 | # To which directory should the backups written to? 38 | dir = /tmp 39 | 40 | # What string should be appended to the backup file name? "%t" is 41 | # replaced by the current Unix time (that means the output of Perl's 42 | # time() function). WARNING: This can fill up your disk! 43 | suffix = %t 44 | -------------------------------------------------------------------------------- /scripts/sirc-timestamp.pl: -------------------------------------------------------------------------------- 1 | # sirc-timestamp.pl 2 | # script for sirc irc client which shows time in every line 3 | # by bartko!misiopysio09@netscape.net 4 | # http://mywebpage.netscape.com/bartek09/ 5 | 6 | $add_ons.="+sirc-timestamp.pl"; 7 | 8 | sub whattime { 9 | ($sec,$min,$hour) = localtime(time); 10 | ($min < 10) && ($min = "0" . $min); 11 | ($hour < 10) && ($hour = "0" . $hour); 12 | return "$hour:$min"; 13 | } 14 | 15 | sub hook_timeprint { 16 | my ($theline) = $_[0]; 17 | $_[0] = whattime() . ' ' . $theline; 18 | } 19 | addhook ('print','timeprint'); 20 | 21 | &addhelp("timestamp","This is \cusirc-timestamp.pl\cu for sirc by \cbbartko\cb 22 | 23 | The script adds timestamps in format hh:mm at the 24 | beginning of each line"); 25 | 26 | print("*\cba\cb* \cbbartko\cb's \cvsirc-timestamp.pl\cv loaded ... \n"); 27 | -------------------------------------------------------------------------------- /scripts/windows-ftp-upload.txt: -------------------------------------------------------------------------------- 1 | AUTOMATIC FTP UPLOAD BATCH FILE FOR WINDOWS 2 | ----------------------------- 3 | 4 | Batch file located in the bottom of this file. 5 | 6 | pisg.bat notes: 7 | --------------- 8 | Change the paths and such so they make sense with your config and have fun all 9 | you poor m$ users. ;) (NOTE: You may need to change the last line to 'ftp 10 | -s:%f0' on some old NT systems.) Basically just put all your ftp commands 11 | between the 'goto skip' and ':skip', and put any commands you want executed 12 | BEFORE IT (like pisg) at the end. The batch file will ignore the ftp stuff 13 | because of the goto, and the ftp script will ignore the one command it doesnt 14 | recognize(goto) with a small complaint and no error. 15 | 16 | Installation of .bat file: 17 | -------------------------- 18 | (described with Windows 2000 in mind) 19 | 20 | Go to Start->Settings->Control Panel->Scheduled Tasks 21 | 22 | Select "Add Scheduled Task. 23 | 24 | On the screen where it asks, browse to your batch file and hit next. 25 | 26 | Give the task a name (doesn't matter) 27 | 28 | Select "Perform this Task Daily". 29 | 30 | Start Time: 12:00 AM / Every Day / Start Date - default 31 | 32 | Enter in the account you want it to run as w/ the password. (I recomend an 33 | admin account, but it shouldn't matter) 34 | 35 | Check the []Open advanced properties box and hit Finish 36 | 37 | Go to the Schedule Tab. 38 | 39 | Click Advanced. 40 | 41 | Clear the End Date if it's checked. Check Repeat Task, put in every X hours (I 42 | have 6), and put duration to 24 hours. This should repeat the task in whatever 43 | increment you selected throught the day. Then it restarts the task on the next 44 | day. 45 | 46 | That should do it, play around with the settings until you think you have what 47 | you want. The way tasks are implemented are very wierd, but it works. ALso 48 | look into the 'at' command in the windows help for a command line version which 49 | may be easier to set up. 50 | 51 | -----------------------pisg.bat---------------------------- 52 | 53 | goto skip 54 | 55 | OPEN your.ftp.server.com 56 | username 57 | password 58 | CD /yourdir 59 | PUT "C:\Program Files\WinBot\Logs\pisg-0.37\index.html" 60 | QUIT 61 | 62 | :skip 63 | 64 | cd "C:\Program Files\WinBot\Logs\pisg-0.37\" 65 | perl "C:\Program Files\WinBot\Logs\pisg-0.37\pisg" 66 | ftp -s:%0 67 | -------------------------------------------------------------------------------- /speedtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This is a small, but very useful script for finding out where to speedup a 4 | # Perl program, it will generate a fine statistics on which functions used 5 | # the most time, and how many calls which were made to it. 6 | # 7 | # I hope someone will use this and hopefully make pisg a bit faster :) 8 | 9 | dprofpp -u -p ./pisg 10 | --------------------------------------------------------------------------------