Code: Select all
return 0
Code: Select all
putlog "I'm not oped in $::channel."
Code: Select all
## Settings
set line "*Fserve Active*"
set phrase "*Fserve Active*"
set channel "#E-Hub"
## Binds
bind pubm - "*$line*" voiceUser
bind time - "00 * * * *" time_proc
bind time - "30 * * * *" time_proc
bind pubm - "*$phrase" saveUser
## Code
proc voiceUser {nick uhost hand channel rest} {
putserv "MODE $channel +v :$nick"
return
}
proc time_proc {min hour day month year} {check_word}
proc check_word {} {
if {![botisop $::channel]} {
putlog "I'm not oped in $::channel."
return 0
}
foreach user [chanlist $::channel] {
if {[isvoice $user $::channel]} {
set hand [nick2hand $user]
if {[matchattr $hand S]} {
chattr $hand -S
return
}
pushmode $::channel -v $user
puthelp "NOTICE $nick :you've been devoiced for not serving."
}
}
}
proc saveUser {nick chan hand idx args} {
if {[validuser $hand]} {
chattr $hand +S
return
}
adduser $nick
chattr $nick +S
}
Code: Select all
## Settings
set line "*Fserve Active*"
set channel "#E-Hub"
## Binds
bind pubm - "$line" voiceUser
bind time - "00 * * * *" time_proc
bind time - "30 * * * *" time_proc
bind pubm - "$line" saveUser
## Code
proc voiceUser {nick uhost hand channel rest} {
putserv "MODE $channel +v :$nick"
return
}
proc time_proc {min hour day month year} {check_word}
proc check_word {} {
if {![botisop $::channel]} {
putlog "I'm not oped in $::channel."
return 0
}
foreach user [chanlist $::channel] {
if {[isvoice $user $::channel]} {
set hand [nick2hand $user]
if {[matchattr $hand S]} {
chattr $hand -S
return
}
pushmode $::channel -v $user
puthelp "NOTICE $user :you've been devoiced for not serving."
}
}
}
proc saveUser {nick chan hand idx args} {
if {[validuser $hand]} {
chattr $hand +S
return
}
adduser $nick
chattr $nick +S
}
Code: Select all
bind pubm - "$line" voiceUser
bind time - "00 * * * *" time_proc
bind time - "30 * * * *" time_proc
bind pubm - "$line" saveUser
Code: Select all
bind pubm - "$line" voiceUser
bind time - "00 * * * *" time_proc
bind time - "30 * * * *" time_proc
Code: Select all
proc voiceUser {nick uhost hand channel rest} {
putserv "MODE $channel +v :$nick"
saveUser $nick $uhost $hand $channel $rest
return
}
Code: Select all
adduser $nick
chattr $nick +S
Code: Select all
adduser $nick
chattr [nick2hand $nick] +S
Code: Select all
## Settings
set line "*Fserve Active*"
set channel "#E-hub"
## Binds
bind pubm - "$line" voiceUser
bind time - "00 * * * *" time_proc
bind time - "30 * * * *" time_proc
## Code
proc voiceUser {nick uhost hand channel rest} {
putserv "MODE $channel +v :$nick"
saveUser $nick $uhost $hand $channel $rest
return
}
proc time_proc {min hour day month year} {check_word}
proc check_word {} {
if {![botisop $::channel]} {
putlog "I'm not oped in $::channel."
return 0
}
foreach user [chanlist $::channel] {
if {[isvoice $user $::channel]} {
set hand [nick2hand $user]
if {[matchattr $hand S]} {
chattr $hand -S
return
}
pushmode $::channel -v $user
puthelp "NOTICE $user :you've been devoiced for not serving."
}
}
}
adduser $nick
chattr [nick2hand $nick] +S }