"Office Hours" plugin for pidgin/purple - published & linked.

Etan Reisner pidgin at unreliablesource.net
Wed Oct 21 19:19:49 EDT 2009

On Mon, Oct 19, 2009 at 10:06:22AM +0100, Kyrian wrote:
> Etan,
> Thanks for all this info, much obliged.
> In general, assuming I read it right, you are recommending an approach of
> disconnecting as I currently do, but setting the user's status within
> Pidgin (but not in the now-disconnected protocols) to be eg. 'Offline
> Office Hours' instead of 'Away' or 'Available' using the "Status" and
> "SavedStatus APIs", as a means of indicating what has happened, rather than
> producing a pop-up message, or appending into each conversation that it's
> happened.

I'm suggesting that you can (and should) avoid manually setting any
accounts statuses and instead use the Status APIs to set a global Offline
status with your custom message and let that disconnect the accounts.

This will cause the status selector to change, any
notifications/logging/etc. that the user may have set up for local status
changes to trigger and play nicely with coming back (as you indicate
below, simply selecting Available or whatever other status the user might
want to reconnect).

You can even go so far as to let users select a Saved Status to switch to
in the 'Office Hours' mode (thus letting them only sign out of some
accounts and not all accounts for example).

> I like the idea, as it's not intrusive, even if the
> implementation is more complicated. However I also like the idea of a
> pop-up dialogue that says 'Reconnect' or 'Ignore' when this has happened,
> although I'm not sure there is a justification for it if changing your
> status back to 'Available' will accomplish a re-connection.

Yeah, I think given that a simple normal status selection will reconnect
the appropriate accounts I'm uncertain that you need a pop-up dialog for
this, though you are always free to have one for people who want it (we
still occasionally get requests for the old "I'm Away!" dialog that hasn't
existed in ages because some people like the external notification).

> I also take your comments in regards not closing windows when the protocol
> account is disconnected to mean 'yes, it will continue to behave that way,
> even though it is not a documented "feature"'.

Indeed, I cannot forsee any reason that we would forcibly close
conversation windows simply because the connection goes away (I can
imagine specific protocols doing this on their own if the conversations
cannot meaningfully be resumed after a reconnect, but that wouldn't be a
pidgin or libpurple thing).

> In the context of this plugin, I am a little concerned about what would
> happen with accounts that the user has configured but disabled, and in
> other esoteric states, but this may turn out not to be a problem to begin
> with, after all a disconnected account won't show the 'Offline Office
> Hours' status to remote users anyway. Obviously I'm not using any
> connect/disconnect methods that affect all accounts, as that would just be
> asking for trouble, conversely I would hate to think of the plugin being
> used by burglars to determine when someone's office is empty ;-)

Any account that is not Enabled will never be affected by status changes,
that's what disabled means.

I would argue that any per-account disconnection methods are actually
worse than all Enabled account status change methods as inconsistent
states are much harder to remember and deal with than consistent ones
(even when those consistent ones are complex, with accounts in different
statuses with different messages). This, by the way, is one of the
benefits of allowing the user to select a status to switch to as I
mentioned above (the way we let users switch the auto-away status, for

> That being said, there's a lot to digest and test in your email, so I'll
> come back if there are any further queries.
> K.

Glad I could help.


More information about the Devel mailing list