mIRC Home    About    Download    Register    News    Help

Topic Options
#132898 - 15/10/05 04:52 PM del specific word from txt
bodo0815 Offline
Babel fish

Registered: 10/04/05
Posts: 72
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

#132899 - 15/10/05 08:46 PM Re: del specific word from txt
hantu Offline
Pikka bird

Registered: 10/06/05
Posts: 11
You have to _FIND_ the match first, before you use $readn..

write -dl $+ $readn filename
- hantu

#132900 - 15/10/05 08:52 PM Re: del specific word from txt
Fantas Offline
Babel fish

Registered: 12/12/02
Posts: 79
Loc: Richmon bc Canada
could try this

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

i changed the word del to !del, should work

#132901 - 19/10/05 02:10 PM Re: del specific word from txt
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
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