mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
Hi all.
As the subject says. i need my bot to react if a line starts with a dot.
I have this sofar, but alas. that won't work..

Code:
 
on *:text:*:#: {
  if ($left($1,1 == $chr(46))) {
    /notice Aaron test
  }
}
 


this gives a notice on al texts that is written, and thats not what i want..

Suggestions?
Thanxs in advange.
Aaron


Deridio fatum
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
on *:text:.*:#chan: ...

The reason your method didn't work is because you are incorrectly closing the $left identifier.

It's $left(string,N) <-- notice how you didn't close yours properly.


Gone.
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Yours
on *:TEXT:*:#: {
if ($left($1,1) == $chr(46)) {
notice Aaron test
}
}

Other
on *:TEXT:.*:#:notice Aaron test

Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
yep. i did it wrong with de brackets on $left blush
Thank you both FiberOPtics and mIRCManiac to show me the error.

Greetz
Aaron


Deridio fatum

Link Copied to Clipboard