$chan(window) chat tag bind URL <Enter> [list UrlEnter %W]
$chan(window) chat tag bind URL <Leave> [list UrlLeave %W]
$chan(window) chat tag bind URL <Button-1> [list UrlClick %W %x %y]
+ $chat(window) names configure -wrap none
$chan(window) names tag bind NICK <Button-3> \
[list [namespace origin IrcChannelNickMenu] $Channel %W %x %y]
$chan(window) names tag bind NICK <Enter> \
if {[package provide tooltip] eq {}} { return }
set nick [string trim [$w get "@$x,$y linestart" "@$x,$y lineend"]]
if {$nick eq ""} { return }
- puts stderr "Tooltip $type $nick"
+ #puts stderr "Tooltip $type $nick"
+ upvar #0 $Chat chat
+ upvar #0 $chat(irc) context
+ if {![info exists context(whois,$nick)]} { return }
+ set data [dict get $context(whois,$nick) userinfo]
+ append data @[dict get $context(whois,$nick) host]
+ append data "\nis on " [join [dict get $context(whois,$nick) channels] ", "]
+ after idle [list ::tooltip::tooltip $w -tag NICK-$nick $data]
return
}
IrcCallbackNick $w $action $target $jnick $jnew jabber
return
}
+ } elseif {$nick in {ijchain wubchain}} {
+ # alternative stuff for ijchain/wubchain
+ if {$type eq "ACTION"} {
+ regexp {(\S+) (.+)} $msg -> nick msg
+ if {$msg eq "has become available"} {
+ IrcCallbackNick $w entered $target $nick "" jabber
+ return
+ } elseif {$msg eq "has left"} {
+ IrcCallbackNick $w left $target $nick "" jabber
+ return
+ }
+ } else {
+ regexp {<([^>]+)> (.+)} $msg -> nick msg
+ }
}
$w message $msg -nick $nick -type $type
}