# Channel Users tcl by Nixen Group. v 1.0
### Description:
# public command for current users in the channel
# announces when people reached over 100 users in the channel.
### Thanks To:
# Berkstock
bind join - * join:peak
proc join:peak {nick host hand chan} {
set curnum [llength [chanlist $chan]]
if {$curnum > 99} {
if {$curnum==100} { puthelp "PRIVMSG $chan :5-----=====4(Over 100 users)5 =====----- "}
# return [cheking $curnum]
if {$curnum < 100} {
if {$curnum==99} { puthelp "PRIVMSG $chan :New low" }
}
}
return
}
#provides the !users public command:
bind pub o!o !users pub:users
proc pub:users {nick host hand chan arg} { set peak [cheking $chan]
putcmdlog "<$nick@$chan> !$hand! peak"
set number [llenght [chanlist $chan]]
puthelp "PRIVMSG $chan : Current Users: "
}
proc cheking {chan curnum} {global peak
set chan [string tolower $chan]
set peak($chan) "$curnum"
}
### Description:
# public command for current users in the channel
# announces when people reached over 100 users in the channel.
### Thanks To:
# Berkstock
bind join - * join:peak
proc join:peak {nick host hand chan} {
set curnum [llength [chanlist $chan]]
if {$curnum > 99} {
if {$curnum==100} { puthelp "PRIVMSG $chan :5-----=====4(Over 100 users)5 =====----- "}
# return [cheking $curnum]
if {$curnum < 100} {
if {$curnum==99} { puthelp "PRIVMSG $chan :New low" }
}
}
return
}
#provides the !users public command:
bind pub o!o !users pub:users
proc pub:users {nick host hand chan arg} { set peak [cheking $chan]
putcmdlog "<$nick@$chan> !$hand! peak"
set number [llenght [chanlist $chan]]
puthelp "PRIVMSG $chan : Current Users: "
}
proc cheking {chan curnum} {global peak
set chan [string tolower $chan]
set peak($chan) "$curnum"
}