Index: tkchat.tcl
===================================================================
RCS file: /cvsroot/tcllib/tclapps/apps/tkchat/tkchat.tcl,v
retrieving revision 1.402
diff -u -r1.402 tkchat.tcl
--- tkchat.tcl	25 Sep 2007 22:17:50 -0000	1.402
+++ tkchat.tcl	26 Sep 2007 15:49:32 -0000
@@ -418,6 +418,15 @@
     if {$Options(UseProxy)} {
         if {[string length $Options(ProxyHost)] != 0} {
 
+	    # Do not use proxies if one of these matches ...
+	    if {[info exists Options(NoProxyFor)] && [llength $Options(NoProxyFor)]} {
+		foreach entry $Options(NoProxyFor) {
+		    if {[string match -nocase $entry $host]} {
+			return $r
+		    }
+		}
+	    }
+
             # Add authorisation header to the request (by Anders Ramdahl)
             catch {
                 upvar state State
@@ -4183,6 +4192,8 @@
 	${NS}::frame .logon.fpx
 	${NS}::entry .logon.eph -textvariable Options(ProxyHost)
 	${NS}::entry .logon.epp -textvariable Options(ProxyPort) -width 5
+	${NS}::label .logon.lpn -text "No Proxy For" -underline 8
+	${NS}::entry .logon.epn -textvariable Options(NoProxyFor)
 	${NS}::label .logon.lpan -text "Proxy Auth Username" -underline 11
 	${NS}::label .logon.lpap -text "Proxy Auth Password" -underline 13
 	${NS}::entry .logon.epan -textvariable Options(ProxyUsername)
@@ -4254,6 +4265,7 @@
 	bind .logon <Alt-q> {.logon.qu invoke}
 	bind .logon <Alt-c> {.logon.cn invoke}
 	bind .logon <Alt-p> {focus .logon.eph}
+	bind .logon <Alt-y> {focus .logon.epn}
 	bind .logon <Alt-u> {focus .logon.epan}
 	bind .logon <Alt-s> {focus .logon.epap}
 	bind .logon <Alt-n> {focus .logon.enm}
@@ -4282,6 +4294,7 @@
 
 	grid .logon.prx	-	      -		   -in $lf -sticky w  -pady 3
 	grid x		.logon.lph    .logon.fpx   -in $lf -sticky w  -pady 3
+	grid x          .logon.lpn    .logon.epn   -in $lf -sticky w  -pady 3
 	grid x		.logon.lpan   .logon.epan  -in $lf -sticky w  -pady 3
 	grid x		.logon.lpap   .logon.epap  -in $lf -sticky w  -pady 3
 	grid .logon.lnm	.logon.enm    -		   -in $lf -sticky ew -pady 5
@@ -4400,7 +4413,7 @@
     } else {
 	set s disabled
     }
-    foreach w {lph eph epp lpan epan lpap epap} {
+    foreach w {lph eph epp lpan epan lpap epap lpn epn} {
 	.logon.$w configure -state $s
     }
     if {$Options(SavePW)} {
@@ -5170,7 +5183,7 @@
 	Emoticons EnableWhiteboard EntryMessageColor errLog ExitMessageColor
 	Font,* Fullname Geometry HistoryLines JabberConference JabberPort
 	JabberResource JabberServer Khim 
-	LogFile LogLevel LogStderr MyColor Nickname
+	LogFile LogLevel LogStderr MyColor Nickname NoProxyFor
 	OneToOne Pane Password ProxyHost ProxyPort ProxyUsername SavePW
 	ServerLogging Style Subjects Theme Transparency UseBabelfish 
         UseJabberSSL UseProxy Username UseTkOnly ValidateSSLChain 
@@ -5877,6 +5890,7 @@
 	MyColor			000000
 	NickList		{}
 	Nickname		""
+	NoProxyFor		{}
 	OneToOne		tabbed
 	Pane			{520 2}
 	Password		""
