Am gasit si eu un tcl facut de realdog dar credca are o mica gresala. Da mesaj cu helperii sau adminii care sunt on sau daca nu sunt spune ca nu sunt dar pe toate canalele pe care este botul nu numai pe canalul de help sau/si consola.
Code:
###################################################
# Original posted by caesar & arcade @ Undernet @ www.forum.botlending.com
# Modified by ReaL|DoG on #Lending @ Undernet
# For any question or bug please contact ReaLDoG@IrcProject.Info
# Update reason : Bugs fixed
###################################################
bind pub -|+v !helper helper:set
bind pub N|- !admin admin:set
bind join - * admin:check
set schan "#BSCegg"
####### Don't edit below unless you know what you're doing. #####
proc helper:set {nick uhost hand channel txt} {
global schan
if {![botonchan $schan]} return
switch [set mode [string tolower [lindex [split $txt] 0]]] {
"on" {
chattr $hand -|+l $schan;
putserv "NOTICE $nick :Ti-ai setat statusul online."
}
"off" {
chattr $hand -|-l $schan;
putserv "NOTICE $nick :Ti-ai setat statusul offline."
}
default {
putserv "NOTICE $nick :Sorry, nu cunosc modul \002$mode\002, doar 'on' sau 'off'"
}
}
}
proc admin:set {nick uhost hand channel txt} {
global schan
if {![botonchan $schan]} return
switch [set mode [string tolower [lindex [split $txt] 0]]] {
"on" {
chattr $hand +O ;
putserv "NOTICE $nick :Ti-ai setat statusul online."
}
"off" {
chattr $hand -O ;
putserv "NOTICE $nick :Ti-ai setat statusul offline."
}
default {
putserv "NOTICE $nick :Sorry, nu cunosc modul \002$mode\002, doar 'on' sau 'off'"
}
}
}
proc admin:check {nick uhost hand chan} {
global schan
if {![botonchan $schan] || [isbotnick $nick]} return
if {![llength [set online [chanlist $chan -|+l]]] && [botonchan $schan]} {
puthelp "NOTICE $nick :Momentan nici un \002HELPER\002 online / Currently no \002HELPER\002 online.";
} else {
puthelp "NOTICE $nick :\002HELPERI\002 online / Online \002HELPERS\002: [join $online ","]";
}
if {![llength [set online [chanlist $chan +O|-]]] && [botonchan $schan]} {
puthelp "NOTICE $nick :Momentan nici un \002ADMIN\002 online / Currently no \002ADMINS\002 online.";
} else {
puthelp "NOTICE $nick :\002ADMINS\002 online / Online \002ADMINS\002: [join $online ","]";
}
}