TclApps Library Source Code
Check-in [e4a92bc49b]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:* tkchat.tcl (::tkchat::checkCommand): A single / at the start of a post is now rejected if it is not a known command. To send a literal slash at the beginning of a post, it has to be doubled. Improved detection and handling of the /tip command.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e4a92bc49b462071dbe0be572a0a43ec476e0b06
User & Date: rmax 2010-09-17 10:13:51
Context
2010-10-13
13:56
Fix multipart boundary detection check-in: 5800e8330a user: rmax tags: trunk
2010-09-17
10:13
* tkchat.tcl (::tkchat::checkCommand): A single / at the start of a post is now rejected if it is not a known command. To send a literal slash at the beginning of a post, it has to be doubled. Improved detection and handling of the /tip command. check-in: e4a92bc49b user: rmax tags: trunk
2010-06-16
16:36
* lib/dtglue/dtglue.tcl (::dtglue::getmeta): Force all data on a single line. The code processing the data later are line-based. check-in: 56b5b0f9f3 user: andreas_kupries tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to apps/tkchat/ChangeLog.









1
2
3
4
5
6
7







2010-01-12  Pat Thoyts  <[email protected]>

	* tkchat.tcl: Do not show the browser fields on the preferences
	page for Windows as we do not use this on that platform.
	* tkchat.tcl: Applied patch 2913790 to add an option not to get
	queried when exiting and enable /quit when not logged in (stu)

>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2010-09-17  Reinhard Max  <[email protected]>

	* tkchat.tcl (::tkchat::checkCommand):
	A single / at the start of a post is now rejected if it is not a
	known command. To send a literal slash at the beginning of a post,
	it has to be doubled.
	Improved detection and handling of the /tip command.
	 	
2010-01-12  Pat Thoyts  <[email protected]>

	* tkchat.tcl: Do not show the browser fields on the preferences
	page for Windows as we do not use this on that platform.
	* tkchat.tcl: Applied patch 2913790 to add an option not to get
	queried when exiting and enable /quit when not logged in (stu)

Changes to apps/tkchat/tkchat.tcl.

275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
....
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221



4222
4223
4224
4225
4226
4227
4228
4229
....
4433
4434
4435
4436
4437
4438
4439





4440

4441
4442
4443
4444
4445
4446
4447
    }
}

namespace eval ::tkchat {
    variable chatWindowTitle "The Tcler's Chat"

    variable HEADUrl {http://tcllib.cvs.sourceforge.net/*checkout*/tcllib/tclapps/apps/tkchat/tkchat.tcl?revision=HEAD}
    variable rcsid   {$Id: tkchat.tcl,v 1.480 2010/01/12 20:46:03 patthoyts Exp $}

    variable MSGS
    set MSGS(entered) [list \
	    "%user% has entered the chat!" \
	    "Out of a cloud of smoke, %user% appears!" \
	    "%user% saunters in." \
	    "%user% wanders in." \
................................................................................
	}
	{^/\?} {
	    doSearch $msg
	}
	{^/!} {
	    resetSearch
	}
	{^/(urn:)?tip[: ]\d+} {
	    if {[regexp {(?:urn:)?tip[: ](\d+)} $msg -> tip]} {
		gotoURL http://tip.tcl.tk/$tip



	    }
	}
	{^/bug[: ]} {
	    doBug [split $msg ": "]
	}
	{^/wiki[:\s]} {
	    set q [http::formatQuery [string range $msg 6 end]]
	    gotoURL http://wiki.tcl.tk/$q
................................................................................
            if {[regexp {^/ban\s+(\S+)(?:\s+(.*))?} $msg -> nick reason]} {
                ::tkjabber::setaffiliation $nick outcast $reason
            } else {
                ::tkchat::addStatus 0 \
                    "error: must be /ban nick ?reason ...?"
            }
        }





	default {

	    if {![checkAlias $msg]} then {
		# might be server command - pass it on
		switch $Options(ServerLogging) {
		    none {
			tkjabber::msgSend "/nolog $msg" -attrs [list nolog 1]
		    }
		    default {






|







 







|


>
>
>
|







 







>
>
>
>
>

>







275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
....
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
....
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
    }
}

namespace eval ::tkchat {
    variable chatWindowTitle "The Tcler's Chat"

    variable HEADUrl {http://tcllib.cvs.sourceforge.net/*checkout*/tcllib/tclapps/apps/tkchat/tkchat.tcl?revision=HEAD}
    variable rcsid   {$Id: tkchat.tcl,v 1.481 2010/09/17 10:13:51 rmax Exp $}

    variable MSGS
    set MSGS(entered) [list \
	    "%user% has entered the chat!" \
	    "Out of a cloud of smoke, %user% appears!" \
	    "%user% saunters in." \
	    "%user% wanders in." \
................................................................................
	}
	{^/\?} {
	    doSearch $msg
	}
	{^/!} {
	    resetSearch
	}
	{^/(urn:)?tip\M} {
	    if {[regexp {(?:urn:)?tip[: ](\d+)} $msg -> tip]} {
		gotoURL http://tip.tcl.tk/$tip
                addStatus 0 "Opening TIP \#$tip in your browser..."
            } else {
                addStatus 0 "usage: /tip <tip number>"
            }
	}
	{^/bug[: ]} {
	    doBug [split $msg ": "]
	}
	{^/wiki[:\s]} {
	    set q [http::formatQuery [string range $msg 6 end]]
	    gotoURL http://wiki.tcl.tk/$q
................................................................................
            if {[regexp {^/ban\s+(\S+)(?:\s+(.*))?} $msg -> nick reason]} {
                ::tkjabber::setaffiliation $nick outcast $reason
            } else {
                ::tkchat::addStatus 0 \
                    "error: must be /ban nick ?reason ...?"
            }
        }
        {^/[^/]} {
            regexp {^\S+} $msg cmd
            ::tkchat::addStatus 0 \
                "no such command: \"$cmd\". Please use // to post a line starting with /."
        }
	default {
            regsub {^//} $msg / msg
	    if {![checkAlias $msg]} then {
		# might be server command - pass it on
		switch $Options(ServerLogging) {
		    none {
			tkjabber::msgSend "/nolog $msg" -attrs [list nolog 1]
		    }
		    default {