mIRC Home    About    Download    Register    News    Help

Print Thread
!find script help #87375 18/06/04 10:32 AM
Joined: Jun 2004
Posts: 291
W
whatsthedillio Offline OP
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
im trying to make a script that when u type !find word it searches the bot and gives u the result not like @find that searches the fserves
i tried changeing the script that this guy gave me to auto hop the bots with version thanks for that btw
so heres what i did:

On @*:TEXT:!find:#: {
if $hget(ctcp_version,0).item > 10 { return }
.ctcp $chan version
hadd -mu20 ctcp_version $chan 1
}

on !*:ctcpreply:version *:{
if $hget(ctcp_version,$chan) {
if iroffer isin $2- && $nick isreg $chan {
ctcp $nick xdcc list
}

on !*:ctcpreply:xdcc list *: {
if $hget(ctcp_xdcc_list,$nick) {
if $2 isin $2- && $nick isreg $chan {
msg $chan $2-
ELSE msg $chan sorry couldnt find what you were looking for! } }

this didnt work so can u plase help me out here?

Re: !find script help #87376 18/06/04 02:51 PM
Joined: Dec 2002
Posts: 144
D
Dana Offline
Vogon poet
Offline
Vogon poet
D
Joined: Dec 2002
Posts: 144
On @*:TEXT:!find *:#: {

...

Beyond that, there are several problems with this script.

I don't really understand what the hash table is for.. you never made a reference to it elsewhere to either create it or otherwise...

Don't xdcc lists usually get returned via /notice and not ctcp?

if ($2 isin $2-) doesn't make sense.. you should set a variable for the search parameter in the On TEXT event (e.g.: set %search $2) and then use if (%search isin $2-) ..

$chan is not going to work on on ctcpreply since there are no channels associated with a private ctcp. You'd have to save the channel name in another variable.

Dana




"Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke
Re: !find script help #87377 18/06/04 06:09 PM
Joined: Jun 2004
Posts: 291
W
whatsthedillio Offline OP
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
thanks alot for the help