mIRC Home    About    Download    Register    News    Help

Print Thread
#171977 03/03/07 01:58 PM
Joined: Mar 2007
Posts: 2
Z
zipera Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Z
Joined: Mar 2007
Posts: 2
Hello

I'm sitting on a channel with varoious info about gaming news

it got a some kind of announce bot with search option.
it looks like:
(14:21:47) (@me): !find stalker
(14:21:48) (@GAMEBOT]): looking database for "stalker ...
(14:21:51) (@GAMEBOT): word "stalker" exists 1470 times. Showing last 100 to me.

and it sends me the results via private message and the results looks like below

(14:21:52) ([@GAMEBOT]): FOUND WikiPedia:pl.wikipedia.org/wiki/S.T.A.L.K.E.R.:_Shadow_of_Chernobyl
(14:21:53) ([@GAMEBOT]): FOUND Gamelabs:www.stalker.mocny.com

and more like this from the database containing links to the game resources

I wanted to echo the results from priv to another person and used
simple script for this

on *:TEXT:*FOUND*:?:{
.msg SECNICK $1-
halt
}

but the server disconnects me for flooding when i try to send it via priv to that person.

Is there any way to make a delay while sending each line from results ? i tried to set /timer 1 1 /msg SECNICK $1- but it only make continious loop sending 1 result .


thx for any help in advance

Last edited by zipera; 03/03/07 02:12 PM.
zipera #171984 03/03/07 02:24 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You could increment a variable and use .timer 1 %variable $1- as that will make it do 1 line per second. However, a better method would probably be to /write it to a file and then /play it to the user.


Invision Support
#Invision on irc.irchighway.net
Riamus2 #171993 03/03/07 05:06 PM
Joined: Mar 2007
Posts: 2
Z
zipera Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Z
Joined: Mar 2007
Posts: 2
ok according to your tips i've managed to set desired timer
but i've got the next problem now

i'm using variable to store last readed %linenumber

but when i try to delete line already sended to my friend
it deletes me the last line in file

i use

/write dl%linenumber data.txt

is there another maybe easier way do do it because it seems that %linenumber is not passed to the function and it runs as

/write -d

which deletes the last line

any suggestions ?

also i've noticed that it strips some [] chars

Last edited by zipera; 03/03/07 05:53 PM.
zipera #172003 03/03/07 07:49 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
/write -dl %linenumber data.txt

You can't have a variable touching something like that. The same goes for identifiers. If you need it to touch, you can use $+ between them. In this case, however, you don't need to do that.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard