mIRC Home    About    Download    Register    News    Help

Print Thread
#111871 19/02/05 07:37 PM
Joined: Feb 2005
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
Joined: Feb 2005
Posts: 10
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

#111872 19/02/05 07:40 PM
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
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.

#111873 19/02/05 07:44 PM
Joined: Feb 2005
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
Joined: Feb 2005
Posts: 10
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

#111874 19/02/05 08:34 PM
Joined: Nov 2004
Posts: 332
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Nov 2004
Posts: 332
you'll need raw for that
whch i dont tinker in
but im sure someone may be able to help you


The Kodokan will move you, one way or another.
#111875 19/02/05 09:35 PM
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
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 } ???

#111876 20/02/05 03:31 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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
}

Last edited by SladeKraven; 20/02/05 04:54 PM.

Link Copied to Clipboard