From: ("")
Date:  02 May 2018 03:09:42 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:           Open
 Type:             Feature/Change Request
 Package:          Net_SmartIRC
 Package Version:  1.1.11
 PHP Version:      Irrelevant
 Roadmap Versions: 
 New Comment:

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 :)

Previous Comments:

[2018-05-01 15:04:44] glen

i have time handlers that take data from external system and submit to

how if bot gets disconnected, the time handlers are still fired. and
there does 
not seem to be a way to obtain connection state

$irc->_updatestate() exists, but it's protected, not accessible from

otherwise the $irc object is available from callback, so making
or $irc->getLoggedIn public would solve my problem.

as it's probably too breaking change to stop emitting timer events if 
disconnected, so that solution won't do much.


Edit this bug report at