cvs: pearbot /modules bugstats.php

From: Date: Sun, 27 Jun 2004 05:59:30 +0000
Subject: cvs: pearbot /modules bugstats.php
Groups: php.pear.bot 
Request: Send a blank email to pear-bot+get-46@lists.php.net to get a copy of this message
toby Sun Jun 27 01:59:30 2004 EDT Modified files: /pearbot/modules bugstats.php Log: * Regex more flexible. * Moved timeout for refetching bugcount. * Fixed timout to be 15 minutes, not 1.5. http://cvs.php.net/diff.php/pearbot/modules/bugstats.php?r1=1.5&r2=1.6&ty=u Index: pearbot/modules/bugstats.php diff -u pearbot/modules/bugstats.php:1.5 pearbot/modules/bugstats.php:1.6 --- pearbot/modules/bugstats.php:1.5 Sat Jun 26 15:51:16 2004 +++ pearbot/modules/bugstats.php Sun Jun 27 01:59:29 2004 @@ -1,9 +1,9 @@ <?php /** - * $Id: bugstats.php,v 1.5 2004/06/26 19:51:16 toby Exp $ - * $Revision: 1.5 $ + * $Id: bugstats.php,v 1.6 2004/06/27 05:59:29 toby Exp $ + * $Revision: 1.6 $ * $Author: toby $ - * $Date: 2004/06/26 19:51:16 $ + * $Date: 2004/06/27 05:59:29 $ * * Copyright (c) 2004 Tobias Schlitt <toby@php.net> & Mirco Bauer <meebey@php.net> */ @@ -18,6 +18,7 @@ var $license = 'LGPL'; var $lastCount = 0; + var $timeOut = 900000; var $timeids = array(); var $actionids = array(); @@ -25,7 +26,7 @@ function module_init(&$irc) { $this->actionids[] = $irc->registerActionhandler(SMARTIRC_TYPE_CHANNEL|SMARTIRC_TYPE_QUERY|SMARTIRC_TYPE_NOTICE, '^!bugstats', $this, 'bugstats'); - $this->timeids[] = $irc->registerTimehandler(90000, $this, 'autoBugstats'); + $this->timeids[] = $irc->registerTimehandler($this->timeout, $this, 'autoBugstats'); } function module_exit(&$irc) @@ -55,8 +56,8 @@ } $chan = $irc->getChannel('#pear'); $topic = $chan->topic; - $topic = preg_replace('/\| [0-9]+ open bugs/isU', '', $topic); - $irc->setTopic('#pear', $topic.'| '.$count.' open bugs'); + $topic = preg_replace('/[\| ]*[0-9]+ open bugs/isU', '', $topic); + $irc->setTopic('#pear', $topic.' | '.$count.' open bugs'); return true; }

« previous php.pear.bot (#46) next »