Hey,can someone write me tcl with public command for !gbanlist?
It should say his global bans,from userfile..
Code: Select all
bind pub -|- !gbanlist gbanlist:pub
proc gbanlist:pub {nick host handle channel text} {
if {([llength [banlist]] == 0)} {
puthelp "NOTICE $nick :Global ban list is empty."
return 0
} else {
set count 0
foreach b [banlist] {
set count [expr $count +1]
if {([lindex $b 4] != 0) && ([lindex $b 2] != 0)} {
puthelp "PRIVMSG $nick :\[$count\] [lindex $b 0] ([lindex $b 1]) [join [ctime [lindex $b 4]]]"
puthelp "PRIVMSG $nick :Set By [lindex $b 5] on [join [ctime [lindex $b 3]]]. (expires [join [ctime [lindex $b 2]]])"
}
if {([lindex $b 4] != 0) && ([lindex $b 2] == 0)} {
puthelp "PRIVMSG $nick :\[$count\] [lindex $b 0] ([lindex $b 1]) [join [ctime [lindex $b 4]]]"
puthelp "PRIVMSG $nick :Set By [lindex $b 5] on [join [ctime [lindex $b 3]]]. (perm)"
}
if {([lindex $b 4] == 0) && ([lindex $b 2] != 0)} {
puthelp "PRIVMSG $nick :\[$count\] [lindex $b 0] ([lindex $b 1]) never used."
puthelp "PRIVMSG $nick :Set By [lindex $b 5] on [join [ctime [lindex $b 3]]]. (expires [join [ctime [lindex $b 2]]])"
}
if {([lindex $b 4] == 0) && ([lindex $b 2] == 0)} {
puthelp "PRIVMSG $nick :\[$count\] [lindex $b 0] ([lindex $b 1]) never used."
puthelp "PRIVMSG $nick :Set By [lindex $b 5] on [join [ctime [lindex $b 3]]]. (perm)"
}
}; puthelp "PRIVMSG $nick :$count Global bans."; return 1
}
}
Code: Select all
PRIVMSG $nick
Code: Select all
NOTICE $nick
Code: Select all
PRIVMSG $nick
Code: Select all
PRIVMSG $channel
Code: Select all
bind pub -|- !gbanlist gbanlist:pub
Code: Select all
bind pub o|- !gbanlist gbanlist:pub