mIRC Homepage
Posted By: raZOR on text thing - 13/03/06 01:22 AM
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)
Posted By: HamtaroFreak Re: on text thing - 13/03/06 01:28 AM
/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 }
} 
Posted By: raZOR Re: on text thing - 13/03/06 01:35 AM
by giving 2 brackets behind HALT
you are ending event itself thus ELSE
seems as... nothing :P

end even when corrected, its not working =)
Posted By: milosh Re: on text thing - 13/03/06 01:52 AM
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.
Posted By: raZOR Re: on text thing - 13/03/06 02:07 AM
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
Posted By: genius_at_work Re: on text thing - 13/03/06 02:08 AM
Your text match is incorrect.

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

should be:

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

-genius_at_work
Posted By: milosh Re: on text thing - 13/03/06 02:11 AM
I use clean mirc 6.16 also, and the code I gave you is working. Maybe somebody else can check this.
Posted By: raZOR Re: on text thing - 13/03/06 02:14 AM
ha !
genius you truly are =)

now it works !
IT WORKS !

thanks =)

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