mIRC Homepage
Posted By: bwuser help catching / storing / matching - 08/11/08 03:36 PM
on an announce in a channel ($3) this part of hte announce always ends in -RANDOMTHING i want to read from names.txt and see if -RANDOMTHING is already in there, if so { halt } if not it should add it to names.txt,

$3 could be any size and have -WORD-WORD_word-WORD
but i only want to catch the end

if anyone has an efficient way to accomplish this it would be greatly appreciated
Posted By: Lpfix5 Re: help catching / storing / matching - 10/11/08 04:00 AM
Confused... but to get the last very word since the character - is in use use gettok...

$gettok($3,$numtok($3,45),45)

$numtok calculates how many tokens are found the same, then I take that total and get the last word after the token

CHARACTER 45 equals minus or -.
Posted By: Lpfix5 Re: help catching / storing / matching - 10/11/08 04:02 AM
Confused... but to get the last very word since the character - is in use use gettok...

$gettok($3,$numtok($3,45),45)

$numtok calculates how many tokens are found the same, then I take that total and get the last word after the token

CHARACTER 45 equals minus or -.
Posted By: RusselB Re: help catching / storing / matching - 10/11/08 04:35 AM
You can also use $gettok($3,-1,45) to get the last word (or token as it can also be called) using the chracter 45 or - token separator.
© mIRC Discussion Forums