Comment 3 for bug 195499

Mats (matsben) wrote :

Yes he probably is. I removed the to attribute all together since hasn't one. I actually do the right thing, mostly. I already had:

    # The streams 'from' attribute has the "last word" on the servers name.
    if {[info exists locals(streamattr,from)]} {
 set locals(server) $locals(streamattr,from)

But failed to use it, or not to use it, during IBR. Otherwise I think I do the right thing while Login(.tcl):

proc ::Login::SetLoginStateRunHook {} {
    # Ourself. Do JIDPREP? So far only on the domain name.
    # MUST handle situations with redirection (server alias)!

    set jid [$jlib myjid]
    jlib::splitjidex $jid username server resource

    set server [jlib::jidmap [$jlib getserver]]
    set jstate(mejid) [jlib::joinjid $username $server ""]


proc jlib::getserver {jlibname} {

    upvar ${jlibname}::locals locals

    return $locals(server)