mIRC Home    About    Download    Register    News    Help

Print Thread
#144673 13/03/06 01:22 AM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
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)

#144674 13/03/06 01:28 AM
H
HamtaroFreak
HamtaroFreak
H
/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.
#144675 13/03/06 01:35 AM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
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.
#144676 13/03/06 01:52 AM
Joined: Dec 2003
Posts: 259
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2003
Posts: 259
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.

#144677 13/03/06 02:07 AM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
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

#144678 13/03/06 02:08 AM
Joined: Oct 2005
Posts: 1,671
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,671
Your text match is incorrect.

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

should be:

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

-genius_at_work

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

#144680 13/03/06 02:14 AM
Joined: Apr 2005
Posts: 1,008
R
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Apr 2005
Posts: 1,008
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.

Link Copied to Clipboard