[Tkabber-dev] r447 - trunk/plugins/vimage

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Dec 28 10:14:38 MSK 2010


Author: Rejjin
Date: 2010-12-28 10:14:38 +0300 (Tue, 28 Dec 2010)
New Revision: 447

Modified:
   trunk/plugins/vimage/vimage.tcl
Log:
Last corrections regexp to parse messages. Restored previous support for all image formats.

Modified: trunk/plugins/vimage/vimage.tcl
===================================================================
--- trunk/plugins/vimage/vimage.tcl	2010-12-28 06:40:35 UTC (rev 446)
+++ trunk/plugins/vimage/vimage.tcl	2010-12-28 07:14:38 UTC (rev 447)
@@ -12,7 +12,9 @@
 #	+++	( Get a supported image extensions )	
 	set extensions {gif|pixmap}
 	if { [catch { package require Img } ] == 0 } {
-		append extensions {|bmp|ico|jpeg|jpg|png}
+		append extensions {|bmp|ico|jpeg|jpg|pcx|}
+		append extensions {png|ppm|postscript|sgi|sun|}
+		append extensions {tga|tiff|xbm|xpm}
 	}	
 
 #	+++	( Default images )
@@ -56,7 +58,7 @@
 	return
 	}
 
-	set map [format {http://[^\s]+\.(%s)} $extensions]
+	set map [format {^(http\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(?:\/\S*)?(?:[a-zA-Z0-9_])+\.(?:%s))$} $extensions]
 	set matched [regexp -inline -nocase -all -- $map $body]
 	set chatwin [chat::chat_win $chatid]
 	



More information about the Tkabber-dev mailing list