mIRC Home    About    Download    Register    News    Help

Print Thread
Echo One Time #126754 04/08/05 06:47 PM
Joined: Aug 2005
Posts: 14
Eddy2k5 Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Aug 2005
Posts: 14
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=}

Re: Echo One Time #126755 04/08/05 07:05 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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

Re: Echo One Time #126756 04/08/05 07:15 PM
Joined: Aug 2005
Posts: 14
Eddy2k5 Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Aug 2005
Posts: 14
is there any easyier way to echo it just once? in another code?

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

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

-Andy

Re: Echo One Time #126758 04/08/05 07:45 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: Echo One Time #126759 04/08/05 09:40 PM
Joined: Aug 2003
Posts: 314
S
Sigh Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
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

Re: Echo One Time #126760 05/08/05 02:10 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yeah, that would work.


Invision Support
#Invision on irc.irchighway.net