Req #23746 [Com]: time handlers: need to know online state

From: Date: Wed, 09 May 2018 13:19:11 +0000
Subject: Req #23746 [Com]: time handlers: need to know online state
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-11424@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=23746&edit=1 ID: 23746 Comment by: glen at pld-linux dot org Reported By: glen at pld-linux dot org Summary: time handlers: need to know online state Status: Closed Type: Feature/Change Request Package: Net_SmartIRC Package Version: 1.1.11 PHP Version: Irrelevant Assigned To: garrettw Roadmap Versions: New Comment: the return type is not technically boolean. it's 0,1,2 integers via SMARTIRC_STATE_CONNECTED, SMARTIRC_STATE_CONNECTING, SMARTIRC_STATE_DISCONNECTED using the feature here: https://github.com/eventum/irc-bot/pull/10 Previous Comments: ------------------------------------------------------------------------ [2018-05-08 20:48:27] garrettw -Status: Open +Status: Closed -Assigned To: +Assigned To: garrettw Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/ ------------------------------------------------------------------------ [2018-05-08 20:40:25] garrettw Time handlers are still fired if the bot gets disconnected because you yourself requested that feature in #20973. I'm adding a public method isConnected() which you can call to see if the bot is connected (returns boolean). ------------------------------------------------------------------------ [2018-05-02 13:41:10] glen went with "get joined channels info" to detect if should process events https://github.com/eventum/irc-bot/pull/2 ------------------------------------------------------------------------ [2018-05-01 15:50:57] glen some other idea was to listen to connect, disconnect events, and update local state somehow. but there are imho too many codes to follow, and still get it wrong with some other type of irc server (or irc server with bugs) ------------------------------------------------------------------------ [2018-05-01 15:09:42] glen on second thought, i should be able to access $target via $irc->getChannel for channels, but doesn't work for users as users don't need to be in any channel to be online. but then again, i can just skip all actions if bot is not in any channels, which means it's likely disconnected. but still would like to hear more ideas or feedback to mine :) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://pear.php.net/bugs/bug.php?id=23746 -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=23746&edit=1

« previous php.pear.bugs (#11424) next »