egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

!list

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
pilouuu
Halfop


Joined: 26 Dec 2005
Posts: 82

PostPosted: Thu Jan 11, 2007 11:22 am    Post subject: !list Reply with quote

Code:
bind pub -|- "\!bots" request:bots

proc request:bots {nickname hostname handle channel arg} {
  set requestable {}
  foreach user [userlist] {
    if {[matchattr $user b] && [matchattr $user B]} {
      lappend requestable [hand2nick $user]
    }
  }
  putserv "NOTICE $nickname :Here is a list of my requestable bots:"
  putserv "NOTICE $nickname :[join $requestable ", "]"
}


Hi

Bot not say list bot whit Global flags +B or +b. Were is problem

Thx


expl:

!bots

<bot> Here is a list of my requestable bots:
...
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Jan 12, 2007 5:25 pm    Post subject: Reply with quote

This code should work, assuming you wish to list user-entries who have both b and B (use the binding from the initial post). If you rather want a listing of user-entries that have either b or B, replace the & with a |

Code:
proc request:bots {nick host hand chan txt} {
 puthelp "NOTICE $nick :Here is a list of my requestable  bots:"
 puthelp "NOTICE $nick :[join [userlist bB&] ", "]"
 return 1
}

_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber