# Edit 'TAG' to your desired tag
bind join - {% TAG|*} voice:user
bind nick - {% TAG|*} 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
}
}
# Also edit 'tag' here to your desired tag
proc devoice:user {nick uhost hand chan nn} {
if {![string match -nocase tag|* $nn] && [isvoice $nn $chan]} {
pushmode $chan -v $nn
}
}
Edit: Added comments indicating where to edit tags
Last edited by Sir_Fz on Sat May 12, 2007 3:57 pm, edited 1 time in total.
bind join - {% TAG|*} voice:user
bind nick - {% TAG|*} 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 tag|* $nn] && [isvoice $nn $chan]} {
pushmode $chan -v $nn
}
}
I don't think bind join will work, since the proc for bind join should only have 4 parameters, nick, uhost, hand and chan.. whereas this one has 5 which is nn.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
awyeah wrote:
...
I don't think bind join will work, since the proc for bind join should only have 4 parameters, nick, uhost, hand and chan.. whereas this one has 5 which is nn.
I believe you failed to notice that the last argument has a default-value, allowing the proc to handle 4 or 5 arguments.
I suppose the same effect could be achieved using args and "lindex $args end", although Sir_Fz's way works equally well...
You don't normally need botisop for these type of scripts executing just simple mode change commands. If the bot is not opped, it will not give an error for the script in the partyline and will not change the channel mode +v/-v, but will continue to execute the script further onwards.
The bot will however send a request to the server for mode change, but due to the non-op status, server/client will return not-opped status.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================