From: Sven Hoexter Date: Mon, 17 Jan 2011 17:43:35 +0000 (+0100) Subject: Import myichatstrip.tcl X-Git-Url: http://git.sven.stormbind.net/?p=sven%2Fscripts.git;a=commitdiff_plain;h=97e200d85bb6e5dc57608bb40b2a303cbb9d9254 Import myichatstrip.tcl --- diff --git a/xchat/myichatstrip.tcl b/xchat/myichatstrip.tcl new file mode 100644 index 0000000..15aa33e --- /dev/null +++ b/xchat/myichatstrip.tcl @@ -0,0 +1,40 @@ +#Simple script to remove the html crap sent from iChat Users +#I use http://www.bitlbee.org to gate my IM contacts into X-Chat +#written by Sven Hoexter +#Version: 0.3 2005-06-06 + +### Changelog +# v 0.3 +# - If a query is not yet open we have to open one first +# +# +# v 0.2 +# - fix some context missunderstanding +# - remove a "}" accidently left over +# +# +# v 0.1 - initial release +# + +on PRIVMSG myichatstrip { + if { [string match -nocase "**" $_rest] } { + splitsrc + #only for debug prupose if something gets lost + #print "$_raw" + regsub -all "(|)" $_rest "" outtext + if { [string match "[me]" $_dest] } { + #catch the case where a query is not yet open + if { [catch {findcontext $_nick}] } { + command "query $_nick" + } + set context [findcontext $_nick] + } else { + set context [getcontext] + } + print $context "-<$_nick>- \t$outtext" + complete EAT_XCHAT + } + complete +} + +