| View previous topic :: View next topic |
| Author |
Message |
gamer12 Voice
Joined: 14 Aug 2012 Posts: 10
|
Posted: Sun Sep 16, 2012 1:24 pm Post subject: [SOLVED] Public Command List Channel Members |
|
|
aaa
Edit: Original request for a script which lists members of a channel on public command. This thread is now locked. Sir_FZ
Last edited by gamer12 on Mon Sep 17, 2012 1:36 pm; edited 2 times in total |
|
| Back to top |
|
 |
Football Master
Joined: 26 Dec 2008 Posts: 205 Location: Quakenet, #Football
|
Posted: Sun Sep 16, 2012 1:37 pm Post subject: |
|
|
Someone wrote this script for me a while ago:
| Code: |
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"
} |
_________________ Idling at #Football, Quakenet. |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Mon Sep 17, 2012 12:25 am Post subject: |
|
|
Here's a better version, one that the bot won't flood itself off while trying to paste the entire list of channel members.
| Code: |
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]
}
}
|
_________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
gamer12 Voice
Joined: 14 Aug 2012 Posts: 10
|
Posted: Mon Sep 17, 2012 1:05 pm Post subject: |
|
|
| thanks alot both of you! |
|
| Back to top |
|
 |
|