mIRC Homepage
Posted By: MTec89 $decode troubles - 01/12/04 04:12 AM
im having problems, trying to stop the "exploit" stuff used with $decode(), but im having problems getting a simple on text event working.. any ideas? (its on *:text:*$decode*:*:haltdef)
Posted By: alkahol1k Re: $decode troubles - 01/12/04 04:19 AM
well that depends what exactly you want. If its a query message you want to stop you would use on open. But in channel on text is the right event. I'd use something like this

on ^*:Text:*:#: {
if ($decode isin $strip($1-)) {
.halt
}
}

on *:OPEN:*: {
if ( $decode isin $1- ) {
.ignore -u5 $nick 2
.close -m $nick
.echo -a (query ignored) $colon $1-
.halt
}
}
Posted By: MTec89 Re: $decode troubles - 01/12/04 04:30 AM
i cant seem to get it working
Posted By: Relinsquish Re: $decode troubles - 01/12/04 04:54 AM
Code:
On ^*:TEXT:*$Decode*:*: { echo -s Ignored $Nick $+ 's message in $iif(#,#,Query) | halt }
On ^*:OPEN:?:*$Decode*: { echo -s Ignored $Nick $+ 's message in Query | halt }
Posted By: MTec89 Re: $decode troubles - 01/12/04 05:03 AM
smile THAT works. alright. now what would i do if i wanted to strip the $decode(*) out of the messages instead of ignoring the messages?
Posted By: Relinsquish Re: $decode troubles - 01/12/04 09:27 PM
Code:
On ^*:TEXT:*$Decode*:*: {
var %a = 1
While ($Wildtok($1-,$ $+ Decode(*),1,32)) {
tokenize 32 $Reptok($1-,$v1,$($v1,2),1,32)
inc %a
}
echo -it $Target $+(<,$Nick,>) $1-
halt
}
Posted By: tidy_trax Re: $decode troubles - 02/12/04 04:03 AM
Code:
on ^*:text:*$decode(*)*:#:{
  var %a, %b = $regsub($1-,/\$decode\(.*\)/g,,%a)
  echo -bcflirt norm $chan %a
  haltdef
}
© mIRC Discussion Forums