mIRC Home    About    Download    Register    News    Help

Print Thread
#129322 04/09/05 09:44 PM
Joined: Aug 2003
Posts: 66
B
bynw Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Aug 2003
Posts: 66
i want to limit the invite and joining to channel ops only ....

so I thought about using this:

Code:
 on *:INVITE:#:{
  if $nick isop $chan /join $chan
  else msg $nick you must be a channel operator on $chan to invite me
}

 


What am i missing to make this work??

#129323 04/09/05 09:54 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I thought only channel operators could invite people anyways.. Guess I was very wrong.

-Andy

#129324 04/09/05 09:58 PM
Joined: Aug 2003
Posts: 66
B
bynw Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Aug 2003
Posts: 66
thats what i thought too ... but apparently not as i've got a bot that can be invited by anyone and i want to nip that quickly

#129325 04/09/05 10:09 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You'd have to whois the user who invites you. Maybe something like..

Code:
on *:INVITE:#:{  
  set %invite.chan $chan | set %invite.nick $nick
  .enable #invite | whois $nick
}

#invite off
Raw 319:*: {
  if ($istok($3-,$+(@,%invite.chan),32)) join %invite.chan
  else { msg %invite.nick you must be a channel operator on $chan to invite me }
  unset %invite.* 
  .disable #invite 
}
#invite end


Or another way would be to join the channel if he's not an op, part again..

-Andy

#129326 05/09/05 01:18 AM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
The /invite command is for ops only. If it's working for people that are not ops (or perhaps half ops on some servers), then the server admin(s) are stupid. Tell them.

Regards,


Mentality/Chris
#129327 05/09/05 05:03 AM
Joined: Aug 2003
Posts: 66
B
bynw Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Aug 2003
Posts: 66
actually thats not exactly true :-)

per the RFC:
8.1.8. INVITE (RFC1459 +i)

INVITE mode permits only invited users to enter the channel.
Only owners and hosts can issue an invitation when this mode
is on.

I was needing it in a channel that wasnt invite only.

#129328 05/09/05 07:46 AM
Joined: Aug 2005
Posts: 32
R
Ameglian cow
Offline
Ameglian cow
R
Joined: Aug 2005
Posts: 32
OK, i have decided to use this script, but my mIRC once invited from a normal user sends the user and still joins because it's got the "auto-join" on invite switched on which is vital for my account. So how would i be able to set it up so that it leaves the channel with a message saying that an OP must invite me IF an OP hasn't invited me! :P

#129329 05/09/05 08:03 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
It's rather late here dude so I really have no idea what you just said lol. I don't have a coding head on me right now.

Do you mean:

Code:
On *:Invite:#: {
  .timer 1 1 if $nick !isop $chan part $v2 
}


-Andy

#129330 07/09/05 02:20 AM
Joined: Aug 2003
Posts: 66
B
bynw Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Aug 2003
Posts: 66
Quote:
It's rather late here dude so I really have no idea what you just said lol. I don't have a coding head on me right now.

Do you mean:

Code:
On *:Invite:#: {
  .timer 1 1 if $nick !isop $chan part $v2 
}



That's a good base there Andy
but it would work better as:

Code:
On *:Invite:#: {
  .timer 1 1 if $nick !isop $chan part $chan
}


So my next question. How to get it to also ignore said user?

#129331 07/09/05 08:16 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
I see no difference in your script, $v2 returns exactly the same as $chan in this case. Unless you're using mIRC 5.8 or something, then you should upgrade ASAP.

and just add a line to ignore him, see /help /ignore for all sorts of switches and address types...

Code:
on *:INVITE:#: {
  .timer 1 1 if ($nick !isop $chan) part $chan
  ignore $nick
}

#129332 07/09/05 01:11 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Although true that $v2 and $chan return the same information, there is nothing wrong with making a script backwards compatible if it doesn't affect the speed, reliability, etc. of the script.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard