mIRC Homepage
Posted By: The_Lone_Wolf ison and isop problem - 19/02/05 07:37 PM
Hi,

i made these two lines but i have a problem. they don't work if i'm not on #channel myself. i won't to use them even if i'm not on the channel myself.how do i get these to work?

if ($nick ison #Channel) {Code}
if ($nick isop #Channel) {Code}

thank you
Posted By: JAFO Re: ison and isop problem - 19/02/05 07:40 PM
I tried something similar a while back and i was lead to believe i couldnt keep track of users in a channel that i am not in, although if you whois a user it will tell you what channels they are in.... so depending on what youre trying to do that might help a little.
Posted By: The_Lone_Wolf Re: ison and isop problem - 19/02/05 07:44 PM
well i wrote a liitle fun bot.

and people can request it to join there channel. but only if they are op's on that channel. so for example

!regchan #channel

the bot look's up if the user is on #channel and if he/she is an op before putting the channel in the registration list and join's.
then the rest of the code work's fine untill now.

thank you
Posted By: ricky_knuckles Re: ison and isop problem - 19/02/05 08:34 PM
you'll need raw for that
whch i dont tinker in
but im sure someone may be able to help you
Posted By: JAFO Re: ison and isop problem - 19/02/05 09:35 PM
Raw 319 contains curerent channels.
So something along the lines of doing a whois on user then
raw 319:*:if (@#channame isin $1-) { do command } ???
Posted By: SladeKraven Re: ison and isop problem - 20/02/05 03:31 PM
Code:
Raw 319:*: {
  if ($wildtok($3-,$+(@,#ChanName,),1,32)) { 
    commands
  }
  elseif (!$wildtok($3-,$+(@,#ChanName,),1,32)) { 
    commands  
  }
}


Checks where or not they are an operator on the channel. I wouldn't use the isin operator because if they are in channel names with near enough the same names such as:
#ThisIsAChanName
#ChanName

Code:
if ($wildtok($3-,$+(@,#ChanName,),1,32)) { 
  commands
}


We've checked they're not an op so it performs other commands.

Code:
elseif ($wildtok($3-,$+(@,#ChanName,),1,32)) { 
  other commands
}
© mIRC Discussion Forums