| View previous topic :: View next topic |
| Author |
Message |
l.kleijn Voice
Joined: 18 May 2014 Posts: 33
|
Posted: Fri May 07, 2021 6:50 am Post subject: Bots script |
|
|
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 |
|
 |
CrazyCat Revered One

Joined: 13 Jan 2002 Posts: 1032 Location: France
|
Posted: Fri May 07, 2021 7:08 am Post subject: |
|
|
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 - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community. |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Fri May 07, 2021 7:32 am Post subject: |
|
|
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 |
|
 |
Arnold_X-P Master

Joined: 30 Oct 2006 Posts: 221 Location: DALnet - Trinidad - Beni - Bolivia
|
Posted: Sat May 08, 2021 12:28 am Post subject: |
|
|
| 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]"
}
} |
_________________
thanks to that they help, that others learn  |
|
| Back to top |
|
 |
|