1 #Simple script to remove the html crap sent from iChat Users
2 #I use http://www.bitlbee.org to gate my IM contacts into X-Chat
3 #written by Sven Hoexter <sven@timegate.de>
4 #Version: 0.3 2005-06-06
8 # - If a query is not yet open we have to open one first
12 # - fix some context missunderstanding
13 # - remove a "}" accidently left over
16 # v 0.1 - initial release
19 on PRIVMSG myichatstrip {
20 if { [string match -nocase "*<html>*" $_rest] } {
22 #only for debug prupose if something gets lost
24 regsub -all "(<html><body.*\"><font face.*\">|</.*>)" $_rest "" outtext
25 if { [string match "[me]" $_dest] } {
26 #catch the case where a query is not yet open
27 if { [catch {findcontext $_nick}] } {
28 command "query $_nick"
30 set context [findcontext $_nick]
32 set context [getcontext]
34 print $context "-<$_nick>- \t$outtext"