LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Tobias Schlitt Date: Fri Apr 1 14:01:12 2005 Subject: cvs: pearbot /modules bugstats.php
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
+?>
| Navigate in group php.pear.bot at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by Zareef Ahmed
Powered By PHP Consultants |