1With the advent of the modules, an API becomes necessary. This 2file is the place to document anything along those lines. 3 4The main parts of pisg operate by passing around a %stats hash. That 5hash is pretty big: 6 7Key Type Index Description 8-------------------------------------------------------------------------- 9words hash <nick> Number of words typed by given nick. 10wordcounts hash <word> Number of times given word was used. 11wordnicks hash <word> The last nick to use the given word. 12times hash <hour> Number of lines typed in the channel during 13 the given hour (0..23). 14lines hash <nick> Number of lines typed by the given nick (both 15 "normal" and action lines). 16line_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.) 21monologues hash <nick> Number of times the given nick had a 22 monologue. 23sayings hash <nick> Random normal line from the given nick. 24questions hash <nick> Number of lines from the given nick that 25 ended in question marks. 26shouts hash <nick> Number of lines ending in exclamation points. 27allcaps hash <nick> Number of lines in ALL CAPS. 28allcaplines hash <nick> Random line containing ALL CAPS. 29foul hash <nick> Number of lines containing foul words. 30foullines hash <nick> Lines containing foul words. 31smiles hash <nick> Number of lines containing smiling faces. 32frowns hash <nick> Number of lines containing sad faces. 33urlcounts hash <url> Number of times each URL was mentioned. 34urlnicks hash <url> Last nick to mention each URL. 35lengths hash <nick> Total length of all lines from the given 36 nick. 37actions hash <nick> Number of actions. 38actionlines hash <nick> Random action line. 39violence hash <nick> Number of times the given nick attacked 40 someone else. 41violencelines hash <nick> Random example of the given nick attacking 42 someone. 43attacked hash <nick> Number of times the given nick was attacked. 44attackedlines hash <nick> Ramdom example of the given nick being 45 attacked. 46gaveops hash <nick> Number of times the given nick granted ops. 47tookops hash <nick> Number of times the given nick removed ops. 48gavevoice hash <nick> Number of times the given nick granted voice. 49tookvoice hash <nick> Number of times the given nick removed voice. 50kicked hash <nick> Number of times the given nick kicked 51 someone. 52gotkicked hash <nick> Number of times the give nick was kicked. 53kicklines hash <nick> Random example of the given nick being 54 kicked. 55joins hash <nick> Number of times the given nick joined the 56 channel. 57topics 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. 65days scalar Number of days the reporting period spanned. 66totallines scalar Total number of lines seen in file(s). 67parsedlines scalar Total number of parseable lines (normal, 68 action, and third) seen in channel. 69processtime hash A hash containing 'hours', 'mins' and 'secs', 70 describing the time elapsed while processing 71 this channel. 72nicks 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