From: ("")
Date:  03 May 2018 01:41:10 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:

went with "get joined channels info" to detect if should process events

Previous Comments:

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


[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