cvs: pearbot /modules bugstats.php

From: Date: Fri, 01 Apr 2005 21:01:12 +0000
Subject: cvs: pearbot /modules bugstats.php
Groups: php.pear.bot 
Request: Send a blank email to pear-bot+get-50@lists.php.net to get a copy of this message
toby Fri Apr 1 16:01:12 2005 EDT Modified files: /pearbot/modules bugstats.php Log: * Let PEARGirl say the old bug count, when she updates the topic. http://cvs.php.net/diff.php/pearbot/modules/bugstats.php?r1=1.9&r2=1.10&ty=u Index: pearbot/modules/bugstats.php diff -u pearbot/modules/bugstats.php:1.9 pearbot/modules/bugstats.php:1.10 --- pearbot/modules/bugstats.php:1.9 Sat Aug 21 17:03:17 2004 +++ pearbot/modules/bugstats.php Fri Apr 1 16:01:11 2005 @@ -1,9 +1,9 @@ <?php /** - * $Id: bugstats.php,v 1.9 2004/08/21 21:03:17 meebey Exp $ - * $Revision: 1.9 $ - * $Author: meebey $ - * $Date: 2004/08/21 21:03:17 $ + * $Id: bugstats.php,v 1.10 2005/04/01 21:01:11 toby Exp $ + * $Revision: 1.10 $ + * $Author: toby $ + * $Date: 2005/04/01 21:01:11 $ * * Copyright (c) 2004 Tobias Schlitt <toby@php.net> & Mirco Bauer <meebey@php.net> */ @@ -56,10 +56,17 @@ } $chan = $irc->getChannel('#pear'); $topic = $chan->topic; + $getOldCount = preg_match('/[\| ]*([0-9]+) open bugs/isU', $topic, $matches); + if ($getOldCount !== 0) { + $oldBugCount = "The old bug count was ".$matches[1]."."; + } else { + $oldBugCount = "Sorry, I was not able to determine the old bug count."; + } $topic = preg_replace('/[\| ]*[0-9]+ open bugs/isU', '', $topic); if ($this->lastCount != $count) { $this->lastCount = $count; $irc->setTopic('#pear', $topic.' | '.$count.' open bugs'); + $irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, $oldBugCount); } } @@ -73,4 +80,4 @@ return (int)$req->getResponseBody(); } } -?> \ No newline at end of file +?>

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