Tkabber contrib

Check-in [dc5c224542]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Juick plugin (tkabber-0.11.1 branch): Add option for more exact messages indicating. This option determines whether replies to your posts indicated as personal messages. Enabled by default.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | plugins-0.11.1
Files: files | file ages | folders
SHA1:dc5c2245421f406cfa5672502878c08258a1a17f
User & Date: toktonada 2013-09-18 17:37:37
Context
2013-11-17
11:01
Juick plugin (tkabber-0.11.1 branch): Get nick via http-api. http://juick.com/help/ru/api-http Not work for contacts connected via j2j transport. check-in: 127ed9fc52 user: toktonada tags: plugins-0.11.1
2013-09-18
17:37
Juick plugin (tkabber-0.11.1 branch): Add option for more exact messages indicating. This option determines whether replies to your posts indicated as personal messages. Enabled by default. check-in: dc5c224542 user: toktonada tags: plugins-0.11.1
17:04
Juick plugin (tkabber-0.11.1 branch): More simple way to determine personal message. Support of new juick feature (XMPP-API replytoyou attribute), remove deprecated feature (XMPP-API iq). check-in: 47e7be7de0 user: toktonada tags: plugins-0.11.1
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to juick/juick.tcl.

43
44
45
46
47
48
49
50





51
52
53
54
55
56
57
...
182
183
184
185
186
187
188


189
190
191
192
193
194
195


196

197
198
199
200
201
202
203
custom::defvar options(main_jid) "juick@juick.com/Juick" \
        [::msgcat::mc \
            "Main Juick JID. This used for forwarding things from other chats."] \
        -group $group \
        -type string
custom::defvar options(special_update_juick_tab) 1 \
        [::msgcat::mc \
            "Only private messages and replies to your comments is personal message."] \





        -group $group \
        -type boolean

proc load {} {
    ::richtext::entity_state juick_numbers 1
    ::richtext::entity_state citing 1
    ::richtext::entity_state juick 1
................................................................................
        }
    }

    return 0
}

proc is_personal_juick_message {from body x} {


    set private_msg [regexp {^Private message from @.+:\n} $body]

    set reply_to_comment [regexp \
        {Reply by @[^\n ]+:\n>.+\n\n@([^\n ]+) .+\n\n#\d+/\d+ http://juick.com/\d+#\d+$} \
        $body -> reply_to_nick]

    set reply_to_my_comment [expr {$reply_to_comment && [is_reply_to_you $x]}]


    return [expr {$private_msg || $reply_to_my_comment}]

}

proc update_juick_tab {chatid from type body x} {
    variable options
    if {!([is_juick_jid $from] && [string equal $type "chat"] \
        && $options(special_update_juick_tab))} \
    {







|
>
>
>
>
>







 







>
>






|
>
>
|
>







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
...
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
custom::defvar options(main_jid) "juick@juick.com/Juick" \
        [::msgcat::mc \
            "Main Juick JID. This used for forwarding things from other chats."] \
        -group $group \
        -type string
custom::defvar options(special_update_juick_tab) 1 \
        [::msgcat::mc \
            "Indicate as personal message only private messages and replies to you."] \
        -group $group \
        -type boolean
custom::defvar options(special_update_juick_tab_replies_to_posts) 1 \
        [::msgcat::mc \
            "Whether replies to your posts is \"replies to you\"."] \
        -group $group \
        -type boolean

proc load {} {
    ::richtext::entity_state juick_numbers 1
    ::richtext::entity_state citing 1
    ::richtext::entity_state juick 1
................................................................................
        }
    }

    return 0
}

proc is_personal_juick_message {from body x} {
    variable options

    set private_msg [regexp {^Private message from @.+:\n} $body]

    set reply_to_comment [regexp \
        {Reply by @[^\n ]+:\n>.+\n\n@([^\n ]+) .+\n\n#\d+/\d+ http://juick.com/\d+#\d+$} \
        $body -> reply_to_nick]

    set reply_to_me [is_reply_to_you $x]
    set matchall $options(special_update_juick_tab_replies_to_posts)

    return [expr { $private_msg || \
        ($reply_to_me && ($matchall || $reply_to_comment))}]
}

proc update_juick_tab {chatid from type body x} {
    variable options
    if {!([is_juick_jid $from] && [string equal $type "chat"] \
        && $options(special_update_juick_tab))} \
    {

Changes to juick/msgs/ru.msg.

1
2
3
4
5
6

::msgcat::mcset ru "\[J\] Copy thing to clipboard." "\[J\] Скопировать сущность в буфер обмена."
::msgcat::mcset ru "Whether the Juick plugin is loaded." "Загружено ли расширение для удобной работы с Juick."
::msgcat::mcset ru "\[J\] Open thing in browser." "\[J\] Открыть сущность в браузере."
::msgcat::mcset ru "Juick settings." "Параметры расширения для удобной работы с Juick"
::msgcat::mcset ru "Main Juick JID. This used for forwarding things from other chats." "Главный JID Juick'а. Используется для перенаправления сущностей из других чатов."
::msgcat::mcset ru "Only private messages and replies to your comments is personal message." "Только приватные сообщения и ответы на ваши комментарии являются персональными сообщениями."






|
>
1
2
3
4
5
6
7
::msgcat::mcset ru "\[J\] Copy thing to clipboard." "\[J\] Скопировать сущность в буфер обмена."
::msgcat::mcset ru "Whether the Juick plugin is loaded." "Загружено ли расширение для удобной работы с Juick."
::msgcat::mcset ru "\[J\] Open thing in browser." "\[J\] Открыть сущность в браузере."
::msgcat::mcset ru "Juick settings." "Параметры расширения для удобной работы с Juick"
::msgcat::mcset ru "Main Juick JID. This used for forwarding things from other chats." "Главный JID Juick'а. Используется для перенаправления сущностей из других чатов."
::msgcat::mcset ru "Indicate as personal message only private messages and replies to you." "Отмечать как персональные только приватные и адресованные вам сообщения."
::msgcat::mcset ru "Whether replies to your posts is \"replies to you\"." "Считать ли комментарии к вашим постам \"адресованными вам сообщениями\"."