This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

simple join

Old posts that have not been replied to for several years.
Locked
d
dossi
Voice
Posts: 30
Joined: Mon Dec 20, 2004 9:21 pm

simple join

Post by dossi »

Im' looking for some help in creating a simple join script. If !summon was typed in a channel, the bot would make another bot join the channel. I think this would require a script on each bot.

ex (in #bots users are lameuser and lamebot):
[lameuser] !summon
-join- lamebot2 join #bots

Hope I didn't confuse you -- Any help, direction, tutorial would be appriciated. :D
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

First what you do is

make an array with numbers .. using botlist

Code: Select all

set i 0
foreach x [botlist] {
  set bots($i) $x
  incr i
}
then you generate a rand on when the trigger is activated you call upon the array with indice

Code: Select all

[rand [llength [botlist]]
then you use putbot to send a trigger to that bot over the botnet, ..

so on the trigger !summon the putbots will look like something like this

Code: Select all

putbot $bots([rand [llength [botlist]]) "JOINCHANNEL $chan"
the other bot should bind to bot and catch it then you see with switch or something what is wat and add the channel .. using "channel add"

i think that should help you ;)
XplaiN but think of me as stupid
d
dossi
Voice
Posts: 30
Joined: Mon Dec 20, 2004 9:21 pm

Post by dossi »

/me gets confused

:?: :roll:
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

here is a real simple version

Code: Select all

# master bot
proc summon_chan {nick host hand chan arg} {
  foreach {x} [botlist] {
    if {![onchan $x $chan]} {
      putbot $x "joinchan $chan"
      putserv "PRIVMSG $chan :$x joining channel."
      break
    }
  }
}

bind pub n !summon summon_chan

# slave bot
proc bot_join_chan {bot cmd arg} {
  channel add $arg
}

bind bot - joinchan bot_join_chan

i think that should do not tested tho
XplaiN but think of me as stupid
d
dossi
Voice
Posts: 30
Joined: Mon Dec 20, 2004 9:21 pm

Post by dossi »

With a few modifications, it works :-D

Thanks for the help
Locked