mIRC Home    About    Download    Register    News    Help

Print Thread
#126754 04/08/05 06:47 PM
E
Eddy2k5
Eddy2k5
E
i cant get this working 100%. i tried and tried. but still useless. i write lines from another channel, then it should MSG to the main chan im into. some lines works and some dont show up in main..
when i do !test test test
it only works one time. but thats fine. i want it that way. but then i try !test test2 test2
it dont works and sometimes it works so im happy if someone can help me outa this wink

n0=;Added 2 needed }'s and fixed on text syntaxx
n1=on *:TEXT:!test *:#testa: {
n2= if ($3 == $null) {
n3= halt
n4= }
n5= else {
n6= if !$hget(ech0-prechan,$2) {
n7= hadd -mu900 ech0-prechan $2 .
n8= msg #testa $2 $3
n9= }
n10= }
n11=}

#126755 04/08/05 07:05 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
I don't know what I'm supposed to be looking at dude, it seems to work for me.

[13:04] <Testing> !test test test
[13:04] <Andy> test test
[13:04] <Testing> !test test test
[13:04] <Testing> !test test2 test2
[13:04] <Andy> test2 test2
[13:04] <Testing> !test test2 test2

If the item exists it wont msg the channel with $2 and $3.

Code:
on *:TEXT:!test *:#testa: { 
  if (!$3) {
    halt
  }
  else {
    if (!$hget(ech0-prechan,$2)) { 
      hadd -mu900 ech0-prechan $2 .
      msg #testa $2 $3
    }
  }
} 


-Andy

#126756 04/08/05 07:15 PM
E
Eddy2k5
Eddy2k5
E
is there any easyier way to echo it just once? in another code?

#126757 04/08/05 07:21 PM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
I'm sorry, echo what once?

You're not echoing anything as far as I can see. :s

-Andy

#126758 04/08/05 07:45 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
If you can give details about exactly what you're trying to accomplish, it would help.

Do you mean you only want "test" to appear and not "test test"? Is that what you mean by once? Or what?

-----

SladeKraven:
Just a note that was pointed out to me in the past... !$3 would trigger if $3 equals $null, but it would also trigger if $3 equals $false, and one other situation that I can't think of right now. So, depending what's being done, using ($3 == $null) may be the best way even if it's a little longer code.

#126759 04/08/05 09:40 PM
S
Sigh
Sigh
S
Quote:
So, depending what's being done, using ($3 == $null) may be the best way even if it's a little longer code.


Could be shortened to if ($0 < 3) in this case

#126760 05/08/05 02:10 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Yeah, that would work.


Link Copied to Clipboard