Bug 107667 - Automatically attempt to switch to primary nickname
Summary: Automatically attempt to switch to primary nickname
Status: CONFIRMED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
: 205609 214338 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-18 17:37 UTC by kdebugs
Modified: 2015-05-17 11:15 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
recover nick and identify (2.10 KB, application/x-perl)
2007-07-03 04:12 UTC, Lars DIECKOW
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kdebugs 2005-06-18 17:37:28 UTC
Version:           0.18 #3016 (using KDE 3.4.0 Level "b" , SUSE 9.3)
Compiler:          gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)
OS:                Linux (i686) release 2.6.11.4-21.7-default

I wish to get my main nick automatically back after connection troubles.

There are two ways: konversation can react on the logout of the main nick or it can try to get the main nick every now and then.
Comment 1 Felix Eckhofer 2006-01-12 15:04:05 UTC
It might be interesting to combine this feature with the "Auto identify" thing, so that konversation issues a "/nickserv recover" command to get the nick back...
Comment 2 Eike Hein 2006-01-12 23:55:28 UTC
It's a good and useful feature request, but as Felix' comment indicates you'd want to be able to accomodate a variety of network services. Therefore, this would best be realized as a plug-in or script - for which we currently lack the required facilities. As it stands, it will probably be a while before we turn our attention back on this one.
Comment 3 Lars DIECKOW 2007-07-03 04:12:24 UTC
Created attachment 21021 [details]
recover nick and identify

The attached program sort of does what is requested. It is assumed
that the nick defined first in each identity is the primary nick you
want to set. (->[0] means "first" in the program.)

The program looks at each connected server's current nick. If it is
equal to one of the identities' primary nick, no action is taken.
Else it looks at each identity's other nicks to find out which
identity the current nick could come from.

This is very hackish and can pick an unexpected primary nick if you
reuse nicks across identities. I did it this way because currently
there is no DCOP interface to determine the identity associated with
a connected server, only the nicks.

If it cannot determine a suitable identity, no action is taken. This
is the case if you manually change your nick to something that is not
in any identity's nicks.

Then the current nick is changed to the primary nick and the program
starts over for the next connected server.

You have to edit the source to edit passwords for Services. I would
have attempted to make integration with kwalletmanager, but the
assignee in bug 94311 can't get his arse off the ground.

The Services passwords are associated with regular expressions
describing the server name. Again, this is due to a shortcoming in
the DCOP interface, I am unable to query the server names associated
with the identities. By choosing regexp instead of strings for server
names, I give you more flexibility. But also it lies in your own
responsibility to make sure the expressions do not match several
connected server names and accidently pick the wrong one, since the
matches are done in an undetermined order.

We are still lacking the hooks to calls programs on reconnect events,
or schedule events regularly, as this bug's submitter suggests.
Comment 4 Eike Hein 2008-05-01 13:11:31 UTC
There's also a related trick on the Wiki: http://konversation.kde.org/wiki/Ghosttrick
Comment 5 Juha Tuomala 2008-07-10 10:56:46 UTC
I was filing a similar request when found this, although with topic:

"Reclaim primary nick(s) after temporary connection loss"

which might describe it better. Anyway, plugins, scripts whatever,
users need this feature.
Comment 6 Eike Hein 2012-04-02 11:12:36 UTC
*** Bug 205609 has been marked as a duplicate of this bug. ***
Comment 7 Diego 2014-01-03 10:09:48 UTC
Still present in Konversation 1.5. Would be really useful for weak connections.
Comment 8 Diego 2014-01-03 10:11:56 UTC
(In reply to comment #4)
> There's also a related trick on the Wiki:
> http://konversation.kde.org/wiki/Ghosttrick

The trick page has moved here:
http://userbase.kde.org/Konversation/Scripts/Ghosttrick
Comment 9 Christoph Feck 2015-05-17 11:15:15 UTC
*** Bug 214338 has been marked as a duplicate of this bug. ***