Code: Select all
bind join - {% CFC|*} voice:user
bind nick - {% CFC|*} voice:user
bind nick - * devoice:user
proc voice:user {nick uhost hand chan {nn ""}} {
if {$nn == ""} {set nn $nick}
if {![isvoice $nn $chan]} {
pushmode $chan +v $nn
}
}
proc devoice:user {nick uhost hand chan nn} {
if {![string match -nocase CFC|* $nn] && [isvoice $nn $chan]} {
pushmode $chan -v $nn
}
Code: Select all
bind join - {% AFC|*} voice:user
bind nick - {% AFC|*} voice:user
Code: Select all
if {![string match -nocase CFC|* $nn] && [isvoice $nn $chan]} {
Code: Select all
if {![string match -nocase CFC|* $nn] && ![string match -nocase AFC|* $nn] && [isvoice $nn $chan]} {
Code: Select all
setudef flag tagvoice
bind join - {% CFC|*} voice:user
bind nick - {% CFC|*} voice:user
bind join - {% AFC|*} voice:user
bind nick - {% AFC|*} voice:user
bind join - {% AVFC|*} voice:user
bind nick - {% AVFC|*} voice:user
bind join - {% LFC|*} voice:user
bind nick - {% LFC|*} voice:user
bind join - {% MU|*} voice:user
bind nick - {% MU|*} voice:user
bind join - {% NU|*} voice:user
bind nick - {% NU|*} voice:user
bind join - {% NUFC|*} voice:user
bind nick - {% NUFC|*} voice:user
bind join - {% BCFC|*} voice:user
bind nick - {% BCFC|*} voice:user
bind join - {% EPL|*} voice:user
bind nick - {% EPL|*} voice:user
bind nick - * devoice:user
proc voice:user {nick uhost hand chan {nn ""}} {
if {$nn == ""} {set nn $nick}
if {![isvoice $nn $chan]} {
pushmode $chan +v $nn
}
}
proc devoice:user {nick uhost hand chan nn} {
if {![string match -nocase CFC|* $nn] && ![string match -nocase AFC|* $nn] && ![string match -nocase AVFC|* $nn] && ![string match -nocase LFC|* $nn] && ![string match -nocase EPL|* $nn] && ![string match -nocase MU|* $nn] && ![string match -nocase BCFC|* $nn] && ![string match -nocase NU|* $nn] && ![string match -nocase NUFC|* $nn] && [isvoice $nn $chan]} {
pushmode $chan -v $nn
}
Code: Select all
setudef flag tagvoice
bind join - {% CFC|*} voice:user
bind nick - {% CFC|*} voice:user
bind join - {% AFC|*} voice:user
bind nick - {% AFC|*} voice:user
bind join - {% AVFC|*} voice:user
bind nick - {% AVFC|*} voice:user
bind join - {% LFC|*} voice:user
bind nick - {% LFC|*} voice:user
bind join - {% MU|*} voice:user
bind nick - {% MU|*} voice:user
bind join - {% NU|*} voice:user
bind nick - {% NU|*} voice:user
bind join - {% NUFC|*} voice:user
bind nick - {% NUFC|*} voice:user
bind join - {% BCFC|*} voice:user
bind nick - {% BCFC|*} voice:user
bind join - {% EPL|*} voice:user
bind nick - {% EPL|*} voice:user
bind join - {% THFC|*} voice:user
bind nick - {% THFC|*} voice:user
bind nick - * devoice:user
proc voice:user {nick uhost hand chan {nn ""}} {
if {$nn == ""} {set nn $nick}
if {![isvoice $nn $chan]} {
pushmode $chan +v $nn
}
}
proc devoice:user {nick uhost hand chan nn} {
if {![string match -nocase CFC|* $nn] && ![string match -nocase AFC|* $nn] && ![string match -nocase AVFC|* $nn] && ![string match -nocase LFC|* $nn] && ![string match -nocase EPL|* $nn] && ![string match -nocase MU|* $nn] && ![string match -nocase BCFC|* $nn] && ![string match -nocase NU|* $nn] && ![string match -nocase NUFC|* $nn] && ![string match -nocase THFC|* $nn] && [isvoice $nn $chan]} {
pushmode $chan -v $nn
}
}
Code: Select all
setudef flag tagvoice
bind join - {% CFC|*} voice:user
bind nick - {% CFC|*} voice:user
bind join - {% AFC|*} voice:user
bind nick - {% AFC|*} voice:user
bind join - {% AVFC|*} voice:user
bind nick - {% AVFC|*} voice:user
bind join - {% LFC|*} voice:user
bind nick - {% LFC|*} voice:user
bind join - {% MU|*} voice:user
bind nick - {% MU|*} voice:user
bind join - {% NU|*} voice:user
bind nick - {% NU|*} voice:user
bind join - {% NUFC|*} voice:user
bind nick - {% NUFC|*} voice:user
bind join - {% BCFC|*} voice:user
bind nick - {% BCFC|*} voice:user
bind join - {% EPL|*} voice:user
bind nick - {% EPL|*} voice:user
bind join - {% THFC|*} voice:user
bind nick - {% THFC|*} voice:user
bind nick - * devoice:user
proc voice:user {nick uhost hand chan {nn ""}} {
if { ![channel get $chan tagvoice] } { return 0 }
if {$nn == ""} {set nn $nick}
if {![isvoice $nn $chan]} {
pushmode $chan +v $nn
}
}
proc devoice:user {nick uhost hand chan nn} {
if { ![channel get $chan tagvoice] } { return 0 }
if {![string match -nocase CFC|* $nn] && ![string match -nocase AFC|* $nn] && ![string match -nocase AVFC|* $nn] && ![string match -nocase LFC|* $nn] && ![string match -nocase EPL|* $nn] && ![string match -nocase MU|* $nn] && ![string match -nocase BCFC|* $nn] && ![string match -nocase NU|* $nn] && ![string match -nocase NUFC|* $nn] && ![string match -nocase THFC|* $nn] && [isvoice $nn $chan]} {
pushmode $chan -v $nn
}
}
Code: Select all
bind join - {% somenick!*@host.domain} kick:somenick
proc kick:somenick {nick host hand chan test} {
putserv "KICK $chan $nick :You are banned."
}
( 8 ) JOIN (stackable)
bind join <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel>
Description: triggered by someone joining the channel. The mask in
the bind is matched against "#channel nick!user@host" and can
contain wildcards.
Module: irc
Code: Select all
setudef flag chelsea
bind join - {% CFC|*} voice:user
bind nick - {% CFC|*} voice:user
bind nick - * devoice:user
proc voice:user {nick uhost hand chan {nn ""}} {
if { ![channel get $chan chelsea] } { return 0 }
if {$nn == ""} {set nn $nick}
if {![isvoice $nn $chan]} {
pushmode $chan +v $nn
}
}
proc devoice:user {nick uhost hand chan nn} {
if { ![channel get $chan chelsea] } { return 0 }
if {![string match -nocase CFC|* $nn] && [isvoice $nn $chan]} {
pushmode $chan -v $nn
}
}