[Tkabber] Multiple Accounts in a Single Session

Jacek Konieczny jajcus at bnet.pl
Tue Apr 29 23:45:19 MSD 2003


On Tue, Apr 29, 2003 at 04:24:14PM -0400, Josiah Ritchie wrote:
> I'd like to be able to use multiple accounts at the same time a single session. 
What do you mean as single session? There may be multiple Jabber
sessions for the same account, but not the otherwise. If you mean the
session as one tkabber instance running, then this is not possible
(AFAIK).

> Or in other words log into three different servers with two different user
> names at the same time and be able to communicate with people on all
> accounts at once.

You can start multiple tkabbers. Just don't allow them to auto-login
into the same account.

I have following piece of code in my config.tcl, which makes the command
"tkabber localhost" start tkabber using "localhost" profile instead of the
default one. I can choose any other profile the same way.

if { $argc == 0 } {
        array set loginconf [array get loginconf1]
        set autologin 1
} else {
        set n 1
        while {[info exists loginconf$n]} {incr n}
        incr n -1
        for {set i 1} {$i <= $n} {incr i} {
                if {[info exists loginconf${i}(profile)]} {
                        if {[set loginconf${i}(profile)] == $argv} {
                                array set loginconf [array get loginconf${i}]
                                set autologin 1
                        }
                }
        }
}

Maybe this could be written much simpler, but it is the first time I
wrote anything in Tcl.


Greets,
        Jacek
_______________________________________________
Tkabber mailing list
Tkabber at jabber.ru
http://lists.jabber.ru/mailman/listinfo/tkabber



More information about the Tkabber mailing list