mIRC Home    About    Download    Register    News    Help

Print Thread
#132898 15/10/05 03:52 PM
Joined: Apr 2005
Posts: 72
B
Babel fish
OP Offline
Babel fish
B
Joined: Apr 2005
Posts: 72
hello
Code:
on *:text:*Del*:#: {
  set %del $strip($3)
  set %del1 $remove(%del,[,])
  write -dl $+ $readn del.txt
}

in chat:
[17: 27: 27] <@bot> -:: Del ::- [test.bla.test] by (jo)

in txt:
bot tic.tac.toc added 15.10.2005 @ 13:15:01 (-me-)
bot test.bla.test added 15.10.2005 @ 13:16:01 (-me-)
bot jip.tip.top added 15.10.2005 @ 13:17:01 (-me-)
bot nanu.na.na added 15.10.2005 @ 13:18:01 (-me-)
.
.
on text i will del the line with "test.bla.test"
the script extract [ and ] but del line do not work confused
plz help

mfg bodo

Joined: Jun 2005
Posts: 11
H
Pikka bird
Offline
Pikka bird
H
Joined: Jun 2005
Posts: 11
You have to _FIND_ the match first, before you use $readn..

Code:
$read(filename,w,*match*)
write -dl $+ $readn filename


- hantu
Joined: Dec 2002
Posts: 79
F
Babel fish
Offline
Babel fish
F
Joined: Dec 2002
Posts: 79
could try this

on *:text:*!Del*:#: {
var %del = $2-
write -ds %del del.txt
}


i changed the word del to !del, should work

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
That would work if the text given begins the line in the readme... Use "-dw * $+ $2- $+ *" instead. Also, no need for * in front of !del... it could cause problems. And, having a space before the * the follows would be good to prevent another command from triggering this one:

on *:text:!del *:#:{

And, you should probably set it to only respond to ops or only to certain people, or else anyone can delete lines.

--------

bodo0815 : As for how you had it set up with stripping the codes... Are you going to do:

!del This is 04red that I am searching for

??? If your search text doesn't contain codes, then why are you stripping them from the search text? I think what you meant to do was to strip the codes from the text in the file (log?) that you're deleting lines in so that your search matches.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard