From: ("")
Date:  09 May 2018 21:19:11 Hong Kong Time

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

NNTP-Posting-Host:  null

Edit report at

 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

using the feature here:

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


[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


[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

Edit this bug report at