Originally Posted By: D00M
Can you explain to me or point me in the right direction with a little explaination of your code?
What hixxy has suggested is simple to explain, he takes advantage of the $ini() identifier used for mIRC INI for the setup of a text file, because it just so happens that [string] is what a INI file would look like as a topic. If you read the help file for the $ini identifier, you'll get a grasp of it easily.
Originally Posted By: D00M
I need to update it (like a notice instead of a msg to the chan or have it say no results if it doesnt find a result ect..)
To make the message displayed as a notice, just add the -n switch, along with an else condition to tell a user if a topic exists or not.
Quote:
on *:TEXT:!faq *:#MY_CHAN:{
var %f = file.txt, %x = $replace($2-,$chr(32),_)
if ($ini(%f,%x)) { .play $+(-nt,%x) $nick %f }
else { notice $nick Sorry the topic $qt($2-) does not exist! }
}
And since you choose notice, it'd be better to replace # with $nick. But you can use # if you wish.