8
|
1 |
-- TRANSPORTED BUDDIES AVAILABILITY INDICATION |
|
2 |
|
|
3 |
transport_jids = { 'icq.jabber.kiev.ua', 'mrim.unixzone.org.ua' } |
|
4 |
|
|
5 |
hooks_d['hook-status-change'].transports = |
|
6 |
function ( args ) |
|
7 |
for k, jid in pairs ( transport_jids ) do |
|
8 |
if args.jid == jid then |
|
9 |
if args.new_status == '_' then |
|
10 |
main.run ( ("color roster * *@%s red"):format ( jid ) ) |
|
11 |
main.run ( ("color roster dn_? *@%s red"):format ( jid ) ) |
|
12 |
else |
|
13 |
main.run ( ("color roster * *@%s white"):format ( jid ) ) |
|
14 |
main.run ( ("color roster dn_? *@%s brightblack"):format ( jid ) ) |
|
15 |
end |
|
16 |
end |
|
17 |
end |
|
18 |
end |
|
19 |
|
|
20 |
hooks_d['hook-start'].transports = |
|
21 |
function ( args ) |
|
22 |
for k, jid in pairs ( transport_jids ) do |
|
23 |
if not online ( jid ) then |
|
24 |
main.run ( ("color roster * *@%s red"):format ( jid ) ) |
|
25 |
main.run ( ("color roster dn_? *@%s red"):format ( jid ) ) |
|
26 |
else |
|
27 |
main.run ( ("color roster * *@%s white"):format ( jid ) ) |
|
28 |
main.run ( ("color roster dn_? *@%s brightblack"):format ( jid ) ) |
|
29 |
end |
|
30 |
end |
|
31 |
end |
|
32 |
|
|
33 |
-- vim: se ts=4: -- |