Saw a friend one day who had a reply to when ppl slapped him or did any other action, so i made 1 similar to it
If you know away to make it excluse things like $ip $findfile or andthing $ related, please let me know :p?
includes simple anti flood and a timer to make it not spam back, i know could be shorter but im having brain roadblocks lately =\
Edit: change the .timer thanks to ford jeth jaytea and napa for their various helpful posts
on *:action:*:#:{
if ($me isin $1-) && (!%fl) {
inc -u10 %fl
.timer 1 2 describe # $replace($1-,$me,$nick,$chr(36),$+($chr(36),!),$chr(37),$+($str($chr(2),2),$chr(37)),|,$+($str($chr(2),2),|))
}
}
@Epic just change:
.timer 1 2 describe # $replace($1-,$me,%nick)
To:
.timer 1 2 describe # $replace($1-,$me,$nick,$chr(36),$+($chr(36),!),$chr(37),$+($str($chr(2),2),$chr(37)),|,$+($str($chr(2),2),|))
careful Ford :P we can easily circumvent this with evaluation brackets, for example $1- = '[ [ $identifier ] ]' becomes '[ [ $!identifier ] ]' and so '$identifier' still evaluates when the timer fires.
the $encode/$decode method is tried and true, but causes problems for users who have $decode locked. also, MIME type encoding inflates the string by at least a third of its original length (length in UTF-8, that is). it has its advantage, in that it doesn't require the addition of custom aliases; but the right custom alias would make for a much more optimal method of escaping code.
here is a relatively recent discussion on the issue, i have a small snippet at the end there which is an attempt to advance the methodology regarding escaping strings
napa's hit the spot: just dump the timer. I see that you've updated your code with the $chr(36) being halted. Now if someone said something /me gives Epic $5 bucks, it'd be ignored. Why the trouble then?
Just do this based upon your current code:
on *:action:*:#:{
if ($me isin $1-) && (!%fl) {
inc -u10 %fl
describe # $replace($1-,$me,$nick)
}
}
BUT if you really opt for a 2-second delay, you can use the play command like this instead of a timer and worry about expoits:
on *:action:*:#:{
if ($me isin $1-) && (!%fl) {
inc -u10 %fl
write -c $event describe # $replace($1-,$me,$nick)
.play -c # $event 2000
}
}