mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2006
Posts: 4
H
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Nov 2006
Posts: 4
Hello,

I want to write all the lines containing [test] written by a user called 'bot' in #mybotchan written to a .txt file.
I tried to script it by using this forum but it doesnt seem to work.

Code:
on *:TEXT:*[test]*:#mybotchan:{
if ($nick == bot) {
  /write BOTDB.txt $1-
}
}


Anyone?

Thanks!

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Are there colors, or bold/underline, in [test]? Does test always have []'s around it?

As a note, you never need /'s in a script.


Invision Support
#Invision on irc.irchighway.net
Joined: Nov 2006
Posts: 4
H
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Nov 2006
Posts: 4
Yes there are color's included, but i tried * so that shouldnt make a difference, yes there are always []'s around it.

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
try
Code:
 
on *:TEXT:*:#mybotchan:{
if ($nick == bot) && ( $+($chr(91),test,$chr(93)) isin $1- ) {
  /write BOTDB.txt $1-
}
} 


billythekid
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Best to use $strip with that...

Code:
on *:TEXT:*:#mybotchan:{
  if ($nick == bot && $+($chr(91),test,$chr(93)) isin $strip($1-)) {
    write BOTDB.txt $1-
  }
} 


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
yeah agreed, was having a brain fart there, was actually, and don't laugh, gonna do *[*t*e*s*t*]*

crazy


billythekid
Joined: Nov 2006
Posts: 4
H
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Nov 2006
Posts: 4
hmm it still doesnt work :S, i really tried everything.. Already created .txt file with that name, but it really doesnt write anything to it :S

Im really helpless now..

Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Try putting it on a new remote file. Maybe another On text event is conflicting with it.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Joined: Nov 2006
Posts: 4
H
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Nov 2006
Posts: 4
Thanks that worked!


Link Copied to Clipboard