libpurple/plugins/tcl/signal-test.tcl

Wed, 13 May 2009 20:29:03 +0000

author
Marcus Lundblad <malu@pidgin.im>
date
Wed, 13 May 2009 20:29:03 +0000
changeset 27110
05ca719b901b
parent 16460
8eefe4f8bfbe
child 18068
b6554e3c8224
child 33576
415f20253062
permissions
-rw-r--r--

Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.

16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
1 purple::signal connect [purple::account handle] account-away { account state message } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
2 purple::debug -info "tcl signal" "account-away [purple::account username $account] \"$state\" \"$message\""
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
3 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
4
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
5 purple::signal connect [purple::account handle] account-connecting { account } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
6 purple::debug -info "tcl signal" "account-connecting [purple::account username $account]"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
7 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
8
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
9 purple::signal connect [purple::account handle] account-set-info { account info } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
10 purple::debug -info "tcl signal" "account-set-info [purple::account username $account] $info"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
11 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
12
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
13 purple::signal connect [purple::account handle] account-setting-info { account info } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
14 purple::debug -info "tcl signal" "account-set-info [purple::account username $account] $info"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
15 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
16
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
17 purple::signal connect [purple::buddy handle] buddy-away { buddy } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
18 purple::debug -info "tcl signal" "buddy-away [purple::account username [lindex $buddy 2]] [lindex $buddy 1]"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
19 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
20
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
21 purple::signal connect [purple::buddy handle] buddy-back { buddy } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
22 purple::debug -info "tcl signal" "buddy-back [purple::account username [lindex $buddy 2]] [lindex $buddy 1]"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
23 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
24
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
25 purple::signal connect [purple::buddy handle] buddy-idle { buddy } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
26 purple::debug -info "tcl signal" "buddy-idle [purple::account username [lindex $buddy 2]] [lindex $buddy 1]"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
27 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
28
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
29 purple::signal connect [purple::buddy handle] buddy-unidle { buddy } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
30 purple::debug -info "tcl signal" "buddy-unidle [purple::account username [lindex $buddy 2]] [lindex $buddy 1]"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
31 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
32
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
33 purple::signal connect [purple::buddy handle] buddy-signed-on { buddy } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
34 purple::debug -info "tcl signal" "buddy-signed-on [purple::account username [lindex $buddy 2]] [lindex $buddy 1]"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
35 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
36
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
37 purple::signal connect [purple::buddy handle] buddy-signed-off { buddy } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
38 purple::debug -info "tcl signal" "buddy-signed-off [purple::account username [lindex $buddy 2]] [lindex $buddy 1]"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
39 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
40
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
41 purple::signal connect [purple::core handle] quitting {} {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
42 purple::debug -info "tcl signal" "quitting"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
43 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
44
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
45 purple::signal connect [purple::conversation handle] receiving-chat-msg { account who what id flags } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
46 purple::debug -info "tcl signal" "receiving-chat-msg [purple::account username $account] $id $flags $who \"$what\""
8999
dd434cfec86a [gaim-migrate @ 9774]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 8117
diff changeset
47 return 0
dd434cfec86a [gaim-migrate @ 9774]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 8117
diff changeset
48 }
dd434cfec86a [gaim-migrate @ 9774]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 8117
diff changeset
49
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
50 purple::signal connect [purple::conversation handle] receiving-im-msg { account who what id flags } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
51 purple::debug -info "tcl signal" "receiving-im-msg [purple::account username $account] $id $flags $who \"$what\""
8999
dd434cfec86a [gaim-migrate @ 9774]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 8117
diff changeset
52 return 0
dd434cfec86a [gaim-migrate @ 9774]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 8117
diff changeset
53 }
dd434cfec86a [gaim-migrate @ 9774]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 8117
diff changeset
54
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
55 purple::signal connect [purple::conversation handle] received-chat-msg { account who what id flags } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
56 purple::debug -info "tcl signal" "received-chat-msg [purple::account username $account] $id $flags $who \"$what\""
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
57 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
58
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
59 purple::signal connect [purple::conversation handle] received-im-msg { account who what id flags } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
60 purple::debug -info "tcl signal" "received-im-msg [purple::account username $account] $id $flags $who \"$what\""
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
61 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
62
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
63 purple::signal connect [purple::conversation handle] sending-chat-msg { account what id } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
64 purple::debug -info "tcl signal" "sending-chat-msg [purple::account username $account] $id \"$what\""
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
65 return 0
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
66 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
67
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
68 purple::signal connect [purple::conversation handle] sending-im-msg { account who what } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
69 purple::debug -info "tcl signal" "sending-im-msg [purple::account username $account] $who \"$what\""
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
70 return 0
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
71 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
72
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
73 purple::signal connect [purple::conversation handle] sent-chat-msg { account id what } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
74 purple::debug -info "tcl signal" "sent-chat-msg [purple::account username $account] $id \"$what\""
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
75 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
76
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
77 purple::signal connect [purple::conversation handle] sent-im-msg { account who what } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
78 purple::debug -info "tcl signal" "sent-im-msg [purple::account username $account] $who \"$what\""
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
79 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
80
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
81 purple::signal connect [purple::connection handle] signed-on { gc } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
82 purple::debug -info "tcl signal" "signed-on [purple::account username [purple::connection account $gc]]"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
83 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
84
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
85 purple::signal connect [purple::connection handle] signed-off { gc } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
86 purple::debug -info "tcl signal" "signed-off [purple::account username [purple::connection account $gc]]"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
87 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
88
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
89 purple::signal connect [purple::connection handle] signing-on { gc } {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
90 purple::debug -info "tcl signal" "signing-on [purple::account username [purple::connection account $gc]]"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
91 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
92
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
93 if { 0 } {
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
94 purple::signal connect signing-off {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
95 purple::debug -info "tcl signal" "signing-off [purple::account username [purple::connection account $event::gc]]"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
96 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
97
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
98 purple::signal connect update-idle {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
99 purple::debug -info "tcl signal" "update-idle"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
100 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
101 }
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
102
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
103 purple::signal connect [purple::plugins handle] plugin-load args {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
104 purple::debug -info "tcl signal" "plugin-load [list $args]"
15750
c238e0966eb1 gaim::plugin Tcl command, thanks to Dossy Shiobara
Ethan Blanton <elb@pidgin.im>
parents: 15435
diff changeset
105 }
c238e0966eb1 gaim::plugin Tcl command, thanks to Dossy Shiobara
Ethan Blanton <elb@pidgin.im>
parents: 15435
diff changeset
106
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
107 purple::signal connect [purple::plugins handle] plugin-unload args {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
108 purple::debug -info "tcl signal" "plugin-unload [list $args]"
15750
c238e0966eb1 gaim::plugin Tcl command, thanks to Dossy Shiobara
Ethan Blanton <elb@pidgin.im>
parents: 15435
diff changeset
109 }
c238e0966eb1 gaim::plugin Tcl command, thanks to Dossy Shiobara
Ethan Blanton <elb@pidgin.im>
parents: 15435
diff changeset
110
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
111 purple::signal connect [purple::savedstatuses handle] savedstatus-changed args {
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
112 purple::debug -info "tcl signal" "savedstatus-changed [list $args]"
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
113 purple::debug -info "tcl signal" "purple::savedstatus current = [purple::savedstatus current]"
15758
d31f3317c849 Tcl savedstatus command, again from Dossy Shiobara. Dossy is on fire.
Ethan Blanton <elb@pidgin.im>
parents: 15750
diff changeset
114 }
d31f3317c849 Tcl savedstatus command, again from Dossy Shiobara. Dossy is on fire.
Ethan Blanton <elb@pidgin.im>
parents: 15750
diff changeset
115
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
116 proc plugin_init { } {
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
117 list "Tcl Signal Test" \
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
118 "$purple::version" \
8117
0df7cb80c56c [gaim-migrate @ 8821]
Ethan Blanton <elb@pidgin.im>
parents: 6698
diff changeset
119 "Tests Tcl signal handlers" \
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
120 "Debugs a ridiculous amount of signal information." \
16460
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
121 "Ethan Blanton <elb@pidgin.im>" \
8eefe4f8bfbe This looks like the last of the purplification for Tcl. Somebody done
Ethan Blanton <elb@pidgin.im>
parents: 15758
diff changeset
122 "http://www.pidgin.im/"
6694
2354eced08e8 [gaim-migrate @ 7220]
Ethan Blanton <elb@pidgin.im>
parents:
diff changeset
123 }

mercurial