|
|
Joined: Aug 2007
Posts: 3
Self-satisified door
|
OP
Self-satisified door
Joined: Aug 2007
Posts: 3 |
Okay, so I'n trying to make it so my bot will join the channel if it's only a halfop/op. And say a message if a voice and regular invited it, and then part. Well then here's the script. on *:INVITE:#:{
join $chan
msg $chan 12Hello, Im 14 $+ $me $+ 12, and I was invited by 14 $+ $nick $+ 12, type !commands for my commands.
}
elseif ($nick isvoice # || $nick isreg #) {
part $chan Only ops/halfops can invite me.
notice $nick Only ops/halfops can invite me.
}
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
* This belongs in the scripting forum.
on *:invite:#: {
set -u5 %invite.nick $nick
join $chan
}
on me:*:join:#: {
if (%invite.nick !isop $chan && %invite.nick !ishop $chan && %invite.nick != $null) {
part $chan
.notice %invite.nick Only ops/halfops can invite me.
}
else {
msg $chan 12Hello, Im 14 $+ $me $+ 12, and I was invited by 14 $+ $nick $+ 12, type !commands for my commands.
}
}
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
Same idea, but I'd use the "end of names list", to assure the correct processing of isop/ishop (?) ; store chan and nick, join the chan
on *:invite:#: {
set -eu3 %invite.chan $chan
set -eu3 %invite.nick $nick
join $chan
}
; "end of names" after joining a chan
raw 366:*:{
; it's the chan you were invited to
if ($2 == %invite.chan) {
; the nick who invited you is halfop or op
if ((%invite.nick isop $2) || (%invite.nick ishop $2)) {
.msg $2 Hello, I'm $me $+ , and I was invited by %invite.nick $+ , type !commands for my commands. ....!
}
; the nick is not op/hop
else {
part $2 Only Halfops/Ops should invite me.
.notice %invite.nick Only Halfops/Ops should invite me.
}
unset %invite.*
}
}
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Not a bad idea, though I have never had it fail using it from the on JOIN event.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
At ON JOIN, you don't know who has what mode, as mIRC gets that from the NAMES reply.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
You're right. I wasn't thinking.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Aug 2007
Posts: 3
Self-satisified door
|
OP
Self-satisified door
Joined: Aug 2007
Posts: 3 |
Thanks guys.
|
|
|
|
|
|