File: draw_encrypted.tcl

package info (click to toggle)
tkabber 0.9.7-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,756 kB
  • ctags: 1,593
  • sloc: tcl: 32,453; xml: 1,847; sh: 1,408; makefile: 72
file content (22 lines) | stat: -rw-r--r-- 538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# $Id: draw_encrypted.tcl,v 1.1 2002/11/02 20:42:03 alexey Exp $

proc draw_encrypted {chatid from type body x} {
# we already deciphered it in client:message...

    global messageicon

    set chatw [chat::chat_win $chatid]

    foreach xe $x {
	jlib::wrapper:splitxml $xe tag vars isempty chdata children

	if {![cequal [jlib::wrapper:getattr $vars xmlns] jabber:x:encrypted]} {
	    continue
	}

	$chatw image create end -image $messageicon(encrypted)
	break
    }
}

hook::add draw_message_hook [namespace current]::draw_encrypted 7