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

From: Date: Tue, 01 May 2018 19:09:42 +0000
Subject: Req #23746 [Com]: time handlers: need to know online state
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to [email protected] 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:           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

Description:
------------
i have time handlers that take data from external system and submit to
irc 
channel.

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
outside.


otherwise the $irc object is available from callback, so making
$irc->getState 
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 https://pear.php.net/bugs/bug.php?id=23746&edit=1


Thread (1 message)

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