Hey,
Can someone give me a simple example
of 'puallbots' and 'bind bot'
I've been fiddling with it for a while and can't
get it to work. All I need to carry over is $nick
and maybe $hand, just never works for me though.
Thanks in advance.
So, if you want to send $nick and $hand:putallbots <message>
Description: sends a message across the botnet to all bots. If no script intercepts the message on the other end, the message is ignored.
bind bot <flags> <command> <proc>
proc-name <from-bot> <command> <text>
Description: triggered by a message coming from another bot in the botnet. The first word is the command and the rest becomes the text argument; flags are ignored.
Code: Select all
# masta bot
proc your:proc {nick hand} {
set msg "saw $nick $hand"
putallbots $msg
}
################
# slaves bots
bind bot - saw proc:saw
proc:saw {from command args} {
global masta_nick mychan
if {$from == $masta_nick} {
set unick [lindex $args 0]
set uhand [lindex $args 1]
putquick "PRIVMSG $mychan :$masta_nick saw $unick, known as $uhand"
}
}
Code: Select all
proc myproc { n u h a } {
code...
set netinvite "ainvite $n $h"
putallbots $netinvite
}
# botnet invite
bind bot - ainvite ninvite
proc ninvite {from command args} {
set n [lindex $args 0]
set h [lindex $args 1]
inviteall $n $h
}
# auth invite
proc inviteall { n h args } {
set clist ""
foreach c [channels] {
if {[matchattr $h -|I $c] && [botisop $c] && [string match *+private* [channel info $c]]} {
putserv "INVITE $n $c"
lappend clist $c
}
}
return 0
}
Don't think you forget to send args?kain wrote: inviteall $n $h
proc inviteall { n h args } {
Code: Select all
proc inviteall { n h {args ""}} {
Code: Select all
# auth invite
proc inviteall { n h c } {
set clist ""
foreach c [channels] {
if {[matchattr $h -|I $c] && [botisop $c] && [string match *+private* [channel info $c]]} {
putserv "INVITE $n $c"
lappend clist $c
}
}
return 0
}