|
|
Joined: Aug 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Aug 2003
Posts: 66 |
i want to limit the invite and joining to channel ops only .... so I thought about using this: 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??
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
I thought only channel operators could invite people anyways.. Guess I was very wrong.
-Andy
|
|
|
|
Joined: Aug 2003
Posts: 66
Babel fish
|
OP
Babel fish
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
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
You'd have to whois the user who invites you. Maybe something like..
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
|
|
|
|
Joined: Jun 2003
Posts: 5,024
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Aug 2003
Posts: 66
Babel fish
|
OP
Babel fish
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.
|
|
|
|
Joined: Aug 2005
Posts: 32
Ameglian cow
|
Ameglian cow
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
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
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:
On *:Invite:#: {
.timer 1 1 if $nick !isop $chan part $v2
}
-Andy
|
|
|
|
Joined: Aug 2003
Posts: 66
Babel fish
|
OP
Babel fish
Joined: Aug 2003
Posts: 66 |
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:
On *:Invite:#: {
.timer 1 1 if $nick !isop $chan part $v2
}
That's a good base there Andy but it would work better as:
On *:Invite:#: {
.timer 1 1 if $nick !isop $chan part $chan
}
So my next question. How to get it to also ignore said user?
|
|
|
|
Joined: Apr 2003
Posts: 701
Hoopy frood
|
Hoopy frood
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... on *:INVITE:#: {
.timer 1 1 if ($nick !isop $chan) part $chan
ignore $nick
}
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
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
|
|
|
|
|
|