TclXMPP

Check-in [4cc480ab1b]
Login

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

Overview
SHA1:4cc480ab1b1aca153de8e5bdefc8fb299b8b6669
Date: 2015-05-11 05:41:34
User: sgolovan
Comment:Removed tabulation characters and trailing whitespaces.
Tags And Properties
Context
2015-06-01
15:37
[b65104f112] Added a short manual page for the jsend command line client example. (user: sgolovan, tags: trunk)
2015-05-11
05:41
[4cc480ab1b] Removed tabulation characters and trailing whitespaces. (user: sgolovan, tags: trunk)
2015-04-16
19:42
[b13b580cfa] Fixed returning the parsed search items list. (user: sgolovan, tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.







1
2
3
4
5
6
7






2015-04-16  Sergei Golovan  <sgolovan@nes.ru>

	* xmpp/search.tcl: Fixed returning the parsed search items list.

2015-04-08  Sergei Golovan  <sgolovan@nes.ru>

	* xmpp/sm.tcl: Fixed error with undefined $xlib.
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
2015-05-11  Sergei Golovan  <sgolovan@nes.ru>

	* xmpp/blocking.tcl, xmpp/bosh.tcl, xmpp/muc.tcl, xmpp/ping.tcl,
	  xmpp/poll.tcl: Removed tabulation characters and trailing
	  whitespaces.

2015-04-16  Sergei Golovan  <sgolovan@nes.ru>

	* xmpp/search.tcl: Fixed returning the parsed search items list.

2015-04-08  Sergei Golovan  <sgolovan@nes.ru>

	* xmpp/sm.tcl: Fixed error with undefined $xlib.

Changes to xmpp/blocking.tcl.

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
...
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
...
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
                return -code error \
                       [::msgcat::mc "Illegal option \"%s\"" $key]
            }
        }
    }

    ::xmpp::sendIQ $xlib get \
	    -query [::xmpp::xml::create blocklist -xmlns urn:xmpp:blocking] \
	    -command [namespace code [list ParseBlocklistAnswer $commands]] \
            -timeout $timeout
}

# ::xmpp::blocking::ParseBlocklistAnswer --
#
#       A helper procedure which is called upon blocklist is received.
#       It calls back the status and error message if any.
................................................................................

    if {[llength $items] == 0} {
        return -code error \
               [::msgcat::mc "Nothing to block"]
    }

    ::xmpp::sendIQ $xlib set \
	    -query [::xmpp::xml::create block \
                            -xmlns urn:xmpp:blocking \
                            -subelements $items] \
	    -command [namespace code [list ParseBlockAnswer $commands]] \
            -timeout $timeout
}

# ::xmpp::blocking::ParseBlockAnswer --
#
#       A helper procedure which is called upon block result is received.
#       It calls back the status and error message if any.
................................................................................
                return -code error \
                       [::msgcat::mc "Illegal option \"%s\"" $key]
            }
        }
    }

    ::xmpp::sendIQ $xlib set \
	    -query [::xmpp::xml::create unblock \
                            -xmlns urn:xmpp:blocking \
                            -subelements $items] \
	    -command [namespace code [list ParseUnblockAnswer $commands]] \
            -timeout $timeout
}

# ::xmpp::blocking::ParseUnblockAnswer --
#
#       A helper procedure which is called upon unblock result is received.
#       It calls back the status and error message if any.







|
|







 







|


|







 







|


|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
...
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
...
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
                return -code error \
                       [::msgcat::mc "Illegal option \"%s\"" $key]
            }
        }
    }

    ::xmpp::sendIQ $xlib get \
            -query [::xmpp::xml::create blocklist -xmlns urn:xmpp:blocking] \
            -command [namespace code [list ParseBlocklistAnswer $commands]] \
            -timeout $timeout
}

# ::xmpp::blocking::ParseBlocklistAnswer --
#
#       A helper procedure which is called upon blocklist is received.
#       It calls back the status and error message if any.
................................................................................

    if {[llength $items] == 0} {
        return -code error \
               [::msgcat::mc "Nothing to block"]
    }

    ::xmpp::sendIQ $xlib set \
            -query [::xmpp::xml::create block \
                            -xmlns urn:xmpp:blocking \
                            -subelements $items] \
            -command [namespace code [list ParseBlockAnswer $commands]] \
            -timeout $timeout
}

# ::xmpp::blocking::ParseBlockAnswer --
#
#       A helper procedure which is called upon block result is received.
#       It calls back the status and error message if any.
................................................................................
                return -code error \
                       [::msgcat::mc "Illegal option \"%s\"" $key]
            }
        }
    }

    ::xmpp::sendIQ $xlib set \
            -query [::xmpp::xml::create unblock \
                            -xmlns urn:xmpp:blocking \
                            -subelements $items] \
            -command [namespace code [list ParseUnblockAnswer $commands]] \
            -timeout $timeout
}

# ::xmpp::blocking::ParseUnblockAnswer --
#
#       A helper procedure which is called upon unblock result is received.
#       It calls back the status and error message if any.

Changes to xmpp/bosh.tcl.

512
513
514
515
516
517
518
519
520
521
522
523
524
525
526

    set wait 0
    foreach {key val} $args {
        switch -- $key {
            -wait {
                set wait $val
            }
        }       
    }

    if {$wait} {
        while {[info exists state(wait)] && \
                            ![string equal $state(wait) disconnected]} {
            vwait $token\(wait)
        }







|







512
513
514
515
516
517
518
519
520
521
522
523
524
525
526

    set wait 0
    foreach {key val} $args {
        switch -- $key {
            -wait {
                set wait $val
            }
        }
    }

    if {$wait} {
        while {[info exists state(wait)] && \
                            ![string equal $state(wait) disconnected]} {
            vwait $token\(wait)
        }

Changes to xmpp/muc.tcl.

970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
        return
    }

    set attrs [list -nick $nick]

    switch -- $attr/$value {
        affiliation/outcast {
            # Banning request MUST be based on user's bare JID (which though 
            # may be not known by admin)
            set RealJID [realJid $token $nick]
            if {![string equal $RealJID ""]} {
                set attrs [list -jid [::xmpp::jid::removeResource $RealJID]]
            }
        }
    }







|







970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
        return
    }

    set attrs [list -nick $nick]

    switch -- $attr/$value {
        affiliation/outcast {
            # Banning request MUST be based on user's bare JID (which though
            # may be not known by admin)
            set RealJID [realJid $token $nick]
            if {![string equal $RealJID ""]} {
                set attrs [list -jid [::xmpp::jid::removeResource $RealJID]]
            }
        }
    }

Changes to xmpp/ping.tcl.

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
                return -code error \
                       [::msgcat::mc "Illegal option \"%s\"" $key]
            }
        }
    }

    eval [list ::xmpp::sendIQ $xlib get \
	            -query [::xmpp::xml::create ping -xmlns urn:xmpp:ping] \
	            -command [namespace code [list ParseAnswer $commands]]] \
               $newArgs
}

# ::xmpp::ping::ParseAnswer --
#
#       A helper procedure which is called upon XMPP ping answer is received.
#       It calls back the status and error message if any.







|
|







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
                return -code error \
                       [::msgcat::mc "Illegal option \"%s\"" $key]
            }
        }
    }

    eval [list ::xmpp::sendIQ $xlib get \
                    -query [::xmpp::xml::create ping -xmlns urn:xmpp:ping] \
                    -command [namespace code [list ParseAnswer $commands]]] \
               $newArgs
}

# ::xmpp::ping::ParseAnswer --
#
#       A helper procedure which is called upon XMPP ping answer is received.
#       It calls back the status and error message if any.

Changes to xmpp/poll.tcl.

335
336
337
338
339
340
341
342
343
344
345
346
347
348
349

    set wait 0
    foreach {key val} $args {
        switch -- $key {
            -wait {
                set wait $val
            }
        }       
    }

    if {$wait} {
        while {[info exists state(wait)] && \
                            ![string equal $state(wait) disconnected]} {
            vwait $token\(wait)
        }







|







335
336
337
338
339
340
341
342
343
344
345
346
347
348
349

    set wait 0
    foreach {key val} $args {
        switch -- $key {
            -wait {
                set wait $val
            }
        }
    }

    if {$wait} {
        while {[info exists state(wait)] && \
                            ![string equal $state(wait) disconnected]} {
            vwait $token\(wait)
        }