With the advent of the modules, an API becomes necessary. This file is the place to document anything along those lines. The main parts of pisg operate by passing around a %stats hash. That hash is pretty big: Key Type Index Description -------------------------------------------------------------------------- words hash Number of words typed by given nick. wordcounts hash Number of times given word was used. wordnicks hash The last nick to use the given word. times hash Number of lines typed in the channel during the given hour (0..23). lines hash Number of lines typed by the given nick (both "normal" and action lines). line_times hash $line_times{nick}[index] index ranges from 0 to 3 and contains a count of the number of lines typed by that nick in the given time period. Each index is a 6-hour block. (e.g. 3 is from 18:00 to 23:59.) monologues hash Number of times the given nick had a monologue. sayings hash Random normal line from the given nick. questions hash Number of lines from the given nick that ended in question marks. shouts hash Number of lines ending in exclamation points. allcaps hash Number of lines in ALL CAPS. allcaplines hash Random line containing ALL CAPS. foul hash Number of lines containing foul words. foullines hash Lines containing foul words. smiles hash Number of lines containing smiling faces. frowns hash Number of lines containing sad faces. urlcounts hash Number of times each URL was mentioned. urlnicks hash Last nick to mention each URL. lengths hash Total length of all lines from the given nick. actions hash Number of actions. actionlines hash Random action line. violence hash Number of times the given nick attacked someone else. violencelines hash Random example of the given nick attacking someone. attacked hash Number of times the given nick was attacked. attackedlines hash Ramdom example of the given nick being attacked. gaveops hash Number of times the given nick granted ops. tookops hash Number of times the given nick removed ops. gavevoice hash Number of times the given nick granted voice. tookvoice hash Number of times the given nick removed voice. kicked hash Number of times the given nick kicked someone. gotkicked hash Number of times the give nick was kicked. kicklines hash Random example of the given nick being kicked. joins hash Number of times the given nick joined the channel. topics array Each array element is a hash with the following indices: topic - The new channel topic. nick - The person who set the topic. hour - The hour in which the change took place. min - The minute in which the change took place. days scalar Number of days the reporting period spanned. totallines scalar Total number of lines (normal, action, and third) seen in channel. processtime hash A hash containing 'hours', 'mins' and 'secs', describing the time elapsed while processing this channel. nicks hash A hash containing all nicks a user had through a logfile. The keys are the nicks, and the values is an array with their alternative nicknames.