Hello,
I refered this script as an example of how to make X-Chat ignore
messages (its a spam filter). I assumed that was what you wanted: to
ignore messages from fservers.
If you want to print MODIFIED versions of incoming messages, you'll need
to use hooks on print events. I've never messed with those..
Now, about the script:
# First, we make a color-striped version of our message
# Note: if its printed, it will print the original version. Hooks on
# server messages can't modify those messages.
noColor = re.sub('\0031?[0-9](,1?[0-9])?', '', word_eol[3])
# Now, we see if the striped version matches any of those regexps and if
# so, we ignore it.
if re.search('#', noColor) or \
# INSERT REGEXP HERE
re.search('http://', noColor, re.I) or \
re.search('www\.', noColor, re.I):
On Fri, 2003-03-28 at 20:49, David Oftedal wrote:
> >
> >
> >You can do that with plugins/scripts, by making the event handler return
> >XCHAT_EAT_XCHAT or XCHAT_EAT_ALL.
> >Take a look at http://raxx7.no.sapo.pt/xchat2/nospam.py.txt to see an
> >example in Python.
> >
> Hey, you posted this script earlier and it seemed OK, but I don't
> understand the syntax. Does it replace a specific regexp, or just
> colors? If this script CAN replace a regexp, can you place a HUGE
> comment saying //INSERT REGEXP HERE!!! So I can insert a regexp
> identifying fserves?
>
> -Dave Oftedal
--
Ricardo
This is a digitally signed message part