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 

Bots script

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


Joined: 18 May 2014
Posts: 30

PostPosted: Fri May 07, 2021 6:50 am    Post subject: Bots script Reply with quote

I'm searching for a script that when i type '/msg botnick bots'

That i get a list with all linked bots.
Can someone help me with this ?
Back to top
View user's profile Send private message
CrazyCat
Owner


Joined: 13 Jan 2002
Posts: 848
Location: France

PostPosted: Fri May 07, 2021 7:08 am    Post subject: Reply with quote

Really short:
Code:
bind msg n bots getbots
proc getbots {nick uhost handle text} {
   foreach lbot [botlist] {
      putserv "PRIVMSG $nick :[lindex $lbot 0] is connected to [lindex $lbot 1]"
   }
}

_________________
https://www.eggdrop.fr
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1138

PostPosted: Fri May 07, 2021 7:32 am    Post subject: Reply with quote

If you don't want the extra info, and are ok with just the bare list of bots on the botnet, experiment with substituting:

Code:

putserv "privmsg $nick :[bots]"


for

Code:

   foreach lbot [botlist] {
      putserv "PRIVMSG $nick :[lindex $lbot 0] is connected to [lindex $lbot 1]"
   }



Reference:
https://docs.eggheads.org/mainDocs/tcl-commands.html#bots
_________________
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
Back to top
View user's profile Send private message
Arnold_X-P
Master


Joined: 30 Oct 2006
Posts: 210
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Sat May 08, 2021 12:28 am    Post subject: Reply with quote

CrazyCat wrote:
Really short:
Code:
bind msg n bots getbots
proc getbots {nick uhost handle text} {
   foreach lbot [botlist] {
      putserv "PRIVMSG $nick :[lindex $lbot 0] is connected to [lindex $lbot 1]"
   }
}


use the code and it doesn't work....and it does not generate any error


but it works this way for me
Code:
bind msg n bots getbots
proc getbots {nick uhost handle text} {
   foreach lbot [split botlist] {
      putserv "PRIVMSG $nick :[lindex $lbot 0] is connected to [lindex $lbot 1]"
   }
}

_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
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