mIRC Home    About    Download    Register    News    Help

Print Thread
on text thing #144673 13/03/06 01:22 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
Code:
  
on *:text:!dns:#mychannel:{ 
  if ($2 == $null) { /msg #mychannel Invalid query, no addresses being resolved | halt }
  else { /dns $2 }
}


in case someone types !dns, bot tells back "Invalid query, no addresses being resolved" so case 1 works, but case 2 never works...

even if i define: if ($2 != $null) { /dns $2 }
it wont work smirk

anyone can explain why?
(mirc 6.16)


IceCapped
Re: on text thing #144674 13/03/06 01:28 AM
Joined: Mar 2006
Posts: 6
H
HamtaroFreak Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
H
Joined: Mar 2006
Posts: 6
/msg #mychannel Invalid query, no addresses being resolved | halt

I can see 2 things, when you use { you don't need the /, and I do believe you want { msg #mychannel Invalid query, no addresses begin resolved } { halt }

Code:
on *:text:!dns:#mychannel:{ 
  if ($2 == $null) { msg #mychannel Invalid query, no addresses being resolved 
halt 
 } 
}
  else { dns $2 }
} 

Last edited by HamtaroFreak; 13/03/06 01:30 AM.
Re: on text thing #144675 13/03/06 01:35 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
by giving 2 brackets behind HALT
you are ending event itself thus ELSE
seems as... nothing :P

end even when corrected, its not working =)

Last edited by raZOR; 13/03/06 01:36 AM.

IceCapped
Re: on text thing #144676 13/03/06 01:52 AM
Joined: Dec 2003
Posts: 261
M
milosh Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 261
Do you get any error messages?
This works for me
Code:
on *:input:#somechannel:{
  if ($2 == $null) { /echo -a First is working | halt }
  else { /dns $2 | /echo -a Second is working }
}

So, I think that your code should work, too.


velicha dusha moja Gospoda
Re: on text thing #144677 13/03/06 02:07 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
you use on input i use on text =)

clean mirc 6.16 NO, it doesnt work (your code)
it only echoes for case 1, for case 2 nothing happens, no errors, nothing in debug... nothing


IceCapped
Re: on text thing #144678 13/03/06 02:08 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Your text match is incorrect.

on *:text:!dns:#mychannel:{

should be:

on *:text:!dns*:#mychannel:{

-genius_at_work

Re: on text thing #144679 13/03/06 02:11 AM
Joined: Dec 2003
Posts: 261
M
milosh Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 261
I use clean mirc 6.16 also, and the code I gave you is working. Maybe somebody else can check this.


velicha dusha moja Gospoda
Re: on text thing #144680 13/03/06 02:14 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
ha !
genius you truly are =)

now it works !
IT WORKS !

thanks =)

and thanks to HamtaroFreak and Milosh (sto si budan tako kasno?) =)
for effort ^^

Last edited by raZOR; 13/03/06 02:15 AM.

IceCapped