aaa
Edit: Original request for a script which lists members of a channel on public command. This thread is now locked. Sir_FZ
Code: Select all
bind pub o|o .call call:proc
proc call:proc {nick uhost hand chan arg} {
global botnick
# check if user has access to bot or not
set nicklist [chanlist $chan]
# removing botnick from list
set notbot [lsearch $nicklist $botnick]
set nicklist [lreplace $nicklist $notbot $notbot]
# removing nickname that triggered event
set notnick [lsearch $nicklist $nick]
set nicklist [lreplace $nicklist $notnick $notnick]
puthelp "PRIVMSG $chan :$nicklist"
puthelp "PRIVMSG $chan :>>>>> \0030,4$arg\003"
}
Code: Select all
bind pub o|o !call pub:call
proc pub:call {nick uhost hand chan text} {
# create the list with channel users (not bot's user's)
set chanList [chanlist $chan]
# remove botnick from list
set pos [lsearch -nocase $chanList $::botnick]
set chanList [lreplace $chanList $pos $pos]
# paste 25 (or how many you wish) nicks per line
while {[llength $chanList] != 0} {
puthelp "PRIVMSG $chan :[join [lrange $chanList 0 25]]"
set chanList [lrange $chanList 25 end]
}
}