mIRC Homepage
Posted By: raZOR IF ELSEIF ELSE - 14/03/06 12:21 AM
code for my bot =)

Code:
 
on *:text:!request*:?:{
  if ($2 == $null) { /query $nick You need to specify channel. | halt }
  elseif (# isin $2) { /query $nick Your request has been relayed to my owners. | halt }
  else { /query $nick $2 unknown channel. | halt }
}
 


thing is that it wont work when user types !request #channel
altho i specified "if (# isin $2)"

any ideas?

6.16
Posted By: onesikgypo Re: IF ELSEIF ELSE - 14/03/06 12:51 AM
if you use # in a script, mirc automatically assumes it is the channel where the text was said, instead use $chr(35)
Posted By: raZOR Re: IF ELSEIF ELSE - 14/03/06 12:58 AM
lol indeed

thanks very much laugh
Posted By: jaytea Re: IF ELSEIF ELSE - 14/03/06 11:09 AM
and instead of isin you may whane check (#* iswm $2) or the equivalent if (#$2 == $2)
Posted By: raZOR Re: IF ELSEIF ELSE - 14/03/06 11:32 AM
hey
thanks, great suggestion
just the thing i needed =)
© mIRC Discussion Forums