mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 291
W
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
i have this !find script and it searches the database and returns the information about it
but it lags up andgets eccess flood when too many people are searching so i would like to only have 1 person to be able to search at any 1 time
hers the search part
on *:TEXT:!find*:#Channel: {
if ($2 == $null) {
notice $nick Syntax: !find Item
notice $nick Example: !find Barry
halt
}
if (%ds.remotesearch == 1) {
set %timersec 0
/dosearch $nick $2-
/close -m $nick
}
}

i was wondering if anyone could tell me how i could make this work
the script
searches through a hash table
gets the results
and sets timers for how it says at the moment
so even if u know how i can make it if a timers active halt and message wait till the current search finishes
but it would be even better
cuz there are alot of timers with this script so i would prefer an alternative way
thanks alot


Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Something very simple like..


on *:TEXT:!find*:#channel: {
if (!$2) {
notice $nick Syntax: !find Item
notice $nick Example: !find Barry
}
else {
if ((%ds.remotesearch == 1) && (!%ds.delay)) {
set %timersec 0
dosearch $nick $2-
close -m $nick
set -u5 %ds.delay 1
}
}
}


Will allow them to use it only once every 5 seconds, change -u5 to make it higher/lower, as you please.

Also are you aware your event works in a CHANNEL yet your CLOSING a private message window?

Eamonn.

Joined: Jun 2004
Posts: 291
W
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
thanks for that ill post back and
the script replys in pm thats why that happens
thanks laugh
right but some take long to search for as it is a very big data base
so i was wondering if you could help with
making queues for it
thanks laugh

Last edited by whatsthedillio; 12/08/04 02:02 PM.
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
You could post the actual search script and i'm sure someone (if not myself) will be able to make it quicker for you.

Eamonn.

Joined: Jun 2004
Posts: 291
W
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
yer the script is really really long
but is there anyway
like with the timer thing u did last time
i can make it timeout after 10 seconds and anytime befor it says sorry queue 1 is taken try again
thanks for all the help

Joined: Jun 2004
Posts: 291
W
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
lol

Last edited by whatsthedillio; 12/08/04 04:05 PM.
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Well you might have just shot yourself in the foot by pasteing that since it looks like a file sharing script though one does ask if anime is copyrighted, very briefly though your problem is the fact your using a $hget() loop to check if an item exists, when infact theres $hfind() for that very purpose.

Look it up.

Eamonn.

Joined: Jun 2004
Posts: 291
W
Fjord artisan
OP Offline
Fjord artisan
W
Joined: Jun 2004
Posts: 291
yea thats why i didnt want to really post it lol
but thanks for the help anyway
:P


Link Copied to Clipboard