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.

linking bots together

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
r
romeo5k
Halfop
Posts: 46
Joined: Fri Jul 28, 2006 9:02 am

linking bots together

Post by romeo5k »

OKay.. For all, i have searched and searched, and my answer was unanswered. So thats why im asking here.
I grabbed THIS and i kept getting errors.

Anytime someone types anything in a channel BOT1 says that. Rather than Relaying it to BOT2 on a different channel and server. I emailed the author 2wice, and i have not received a response yet. The script is 5 yrs old, so i cannot expect him/her to still be avail.

What I WANT:
I have 2 different IRC servers, and 2 different Eggdrop bots running.
Bot1 will relay to Bot2.

I Basically actually want this same script HERE but instead on 2 different servers.. This one only supports channel to channel, I need server to server. With options to listen to one person, rip it and edit output.
Last edited by romeo5k on Mon Dec 17, 2007 10:11 pm, edited 1 time in total.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Try this (found doing a search):

Code: Select all

#**************************************#
#*         Chan Relay by YooDa      *#
#**************************************#


# chansets
setudef flag relay;
setudef str relay-victim;

#**************** relay control ******************#

bind pub n|n !relay relay:command;
proc relay:command {nick host hand chan arg} {
   set option [string tolower [lindex $arg 0]];
   switch -- $option {
      on {
         channel set $chan +relay
         putserv "NOTICE $nick :Done."
      }
      off {
         channel set $chan -relay
         putserv "NOTICE $nick :Done."
      }
      list {
         set list [channel get $chan relay-victim]
         putserv "NOTICE $nick :Relay victim list:"
         foreach {a b c d e f g} $list {
            putserv "NOTICE $nick :$a $b $c $d $e $f $g"
         }
         putserv "NOTICE $nick :End of list."
      }
      add {
         set add [string tolower [lindex $arg 1]];
         if {[lsearch [string tolower [channel get $chan relay-victim]] $add] < 0} {
            set list "[channel get $chan relay-victim] $add";
            channel set $chan relay-victim $list
            putserv "NOTICE $nick :Done.";
         } else {
            putserv "NOTICE $nick :Victim is already in list.";
         }
      }
      del {
         set del [string tolower [lindex $arg 1]];
         if {[lsearch [string tolower [channel get $chan relay-victim]] $del] >= 0} {
            set list [channel get $chan relay-victim];
            set newlist "";
            foreach victim $list {
               if {$victim != $del} {
                  set newlist "$newlist $victim";
               }
            }
            channel set $chan relay-victim $newlist
            putserv "NOTICE $nick :Done.";
         } else {
            putserv "NOTICE $nick :Victim is not in list.";
         }
      }
      default {
         putserv "NOTICE $nick :Syntax: $::lastbind ON/OFF/LIST/ADD/DEL"
      }
   }
}



#************* relay messages *****************#

# join message
bind JOIN - * relay:join;
proc relay:join {nick host hand chan} {
   if {[channel get $chan relay] && ![isbotnick $nick]} {
      set relay [channel get $chan relay-victim]
      if {$relay != ""} {
         foreach r $relay {
            puthelp "PRIVMSG $r :\[$chan\]     —› join: \002(\002$nick\002)\002 \002(\002$host\002)\002"
         }
      }
   }
}

# part message
bind PART - * relay:part;
proc relay:part {nick host hand chan message} {
   if {[channel get $chan relay] && ![isbotnick $nick]} {
      set relay [channel get $chan relay-victim]
      if {$message == ""} {
         set message "no such message";
      }
      if {$relay != ""} {
         foreach r $relay {
            puthelp "PRIVMSG $r :\[$chan\]     —› part: \002(\002$nick\002)\002 \002(\002$host\002)\002 \002(\002$message\002)\002"
         }
      }
   }
}

# public message
bind PUBM - * relay:pubm;
proc relay:pubm {nick host hand chan arg} {
   if {[channel get $chan relay] && ![isbotnick $nick]} {
      set access "";
      if {[isop $nick $chan]} {
         set access "@";
      } elseif {[isvoice $nick $chan]} {
         set access "+";
      }
      set relay [channel get $chan relay-victim]
      if {$relay != ""} {
         foreach r $relay {
            puthelp   "PRIVMSG $r :\[$chan\] \002(\002$access$nick\002)\002 $arg"
         }
      }
   }
}

# quit message
bind SIGN - * relay:sign;
proc relay:sign {nick host hand chan reason} {
   if {[channel get $chan relay] && ![isbotnick $nick]} {
      set relay [channel get $chan relay-victim]
      if {$reason== ""} {
         set reason "Signed Off";
      }
      if {$relay != ""} {
         foreach r $relay {
            puthelp   "PRIVMSG $r :\[$chan\]     —› quit: \002(\002$nick\002)\002 \002(\002$host\002)\002 \002(\002$reason\002)\002"
         }
      }
   }
}

# topic message
bind TOPC - * relay:topic;
proc relay:topic {nick host hand chan topic} {
   if {[onchan $nick $chan]} {
      if {[channel get $chan relay] && ![isbotnick $nick]} {
         set relay [channel get $chan relay-victim]
         if {$relay != ""} {
            foreach r $relay {
               puthelp   "PRIVMSG $r :\[$chan\]     —› topic:  \002(\002$nick\002)\002 changes topic to \002(\002$topic\002)\002"
            }
         }
      }   
   }
}

# kick message
bind KICK - * relay:kick;
proc relay:kick {nick host hand chan victim reason} {
   if {[channel get $chan relay] && ![isbotnick $nick]} {
      set relay [channel get $chan relay-victim]
      if {$relay != ""} {
         foreach r $relay {
            puthelp   "PRIVMSG $r :\[$chan\]     —› kick: \002(\002$victim\002)\002 was kicked by \002(\002$nick\002)\002 \002(\002$reason\002)\002"
         }
      }
   }
}

# channel modes
bind RAW - MODE relay:mode;
proc relay:mode {from key text} {
   set text [split $text];
   set nick [lindex [split $from !] 0]
   set host [lindex [split $from !] 1]
   set chan [lindex $text 0]
   set mode [join [lrange $text 1 end]]
   if {[validchan $chan] && [channel get $chan relay] && ![isbotnick $nick]} {
      set relay [channel get $chan relay-victim]
      if {$relay != ""} {
         foreach r $relay {
            puthelp   "PRIVMSG $r :\[$chan\]     —› mode: \002(\002$nick\002)\002 sets \002(\002$mode\002)\002"
         }
      }
   }
}


# nick message
bind NICK - * relay:nick;
proc relay:nick {nick host hand chan newnick} {
   if {[validchan $chan] && [channel get $chan relay] && ![isbotnick $nick] && ![isbotnick $newnick]} {
      set relay [channel get $chan relay-victim]
      if {$relay != ""} {
         foreach r $relay {
            puthelp   "PRIVMSG $r :\[$chan\]     —› nick: \002(\002$nick\002)\002 is now known as \002(\002$newnick\002)\002"
         }
      }
   }
}


# ctcp ACTION
bind CTCP - ACTION relay:action
proc relay:action {nick host hand dest key text} {
   if {[validchan $dest] && [channel get $dest relay] && ![isbotnick $nick]} {
      set relay [channel get $dest relay-victim]
      set access "";
      if {[isop $nick $dest]} {
         set access "@";
      } elseif {[isvoice $nick $dest]} {
         set access "+";
      }
      if {$relay != ""} {
         foreach r $relay {
            puthelp   "PRIVMSG $r :\[$dest\] • \002$access\002$nick $text"
         }
      }
   }
}

putlog "Chanrelay script by YooDa loaded." 
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
r
romeo5k
Halfop
Posts: 46
Joined: Fri Jul 28, 2006 9:02 am

Post by romeo5k »

ok, question..... these are 2 different scripts right?
And secondly where do i define the bots name that each one will be relaying to and from.?

**side thought, if this crap dont work soon, ill be paying for someone to make these bots for me**
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

romeo5k wrote:**side thought, if this crap dont work soon, ill be paying for someone to make these bots for me**
I'm sure less scrupulous people would gladly take your money, but IMO you'd be getting ripped off. Aside from the trust and security issues, there's very little worth paying for in setting up an eggdrop. There are several relay scripts in the tcl archive, just try a few different ones, and if you encounter a specific problem, post here and I'm sure you'll get enough free help to get things working.

Rather than depend on someone else to set things up, learn tcl and eggdrop config so you can be a good bot admin.
r
romeo5k
Halfop
Posts: 46
Joined: Fri Jul 28, 2006 9:02 am

Post by romeo5k »

i know what u mean rosc2112, but when you've worked on the same thing for 2days straight, and you feel like nothing can beat you, and u finally get beat, its like.... "WTF", but
back to me trying, i made 2 different tcl with the script u gave me, I put half on one bot, and the other half on the other, and nothing happened.
The bots were just sitting in there...im going to copy what i have in my .conf, and u tell me if im messing up somewhere. I dont think i am because the bot shows up in irc, and im able to dcc chat to the bot.
My thing is, wouldnt i define the bots and the servers somewhere.?

Code: Select all

set username "mellard"

set admin "Collabo"

set network "xxx.xxx.com"

set timezone "GMT"

set offset "-6"

#set my-hostname "localhost"
#set my-ip "localhost"

#addlang "english"

set max-logs 10
set max-logsize 0
set quick-logs 0
set raw-log 0
# logfile mco * "logs/eggdrop.log"
# logfile jpk #lamest "logs/lamest.log"
set log-time 1
set keep-all-logs 0
set logfile-suffix ".%d%b%Y"
set switch-logfiles-at 300
set quiet-save 1

set console "mkcobxs"

set userfile "mellard.user"

set sort-users 0

set help-path "help/"
set text-path "text/"
set temp-path "tmp/"
set motd "text/motd"
set telnet-banner "text/banner"
set userfile-perm 0600

set botnet-nick "mellard"
listen 32001 bots
listen 8000 users
set remote-boots 1
set share-unlinks 1
set protect-telnet 1
set dcc-sanitycheck 0
set ident-timeout 5
set require-p 0
set open-telnets 0
set stealth-telnets 0
set use-telnet-banner 0
set connect-timeout 15
set dcc-flood-thr 3
set telnet-flood 0:0
set paranoid-telnet-flood 0
set resolve-timeout 15

#set firewall "!sun-barr.ebay:3666"
#set nat-ip "127.0.0.1"
#set reserved-portrange 2010:2020

set ignore-time 20
set hourly-updates 00
set owner "Collabo"

set notify-newusers ""
set default-flags "p"
set whois-fields "url birthday"
set die-on-sighup 0
set die-on-sigterm 1

set must-be-owner 1
unbind dcc n simul *dcc:simul
set max-dcc 50
set allow-dk-cmds 1
set dupwait-timeout 5

set mod-path "modules/"
loadmodule dns
loadmodule channels
set chanfile "mellard.chan"
set force-expire 0
set share-greet 0
set use-info 1


set global-flood-chan 0:0
set global-flood-deop 0:0
set global-flood-kick 0:0
set global-flood-join 0:0
set global-flood-ctcp 0:0
set global-flood-nick 0:0
set global-aop-delay 0:0
set global-idle-kick 0
set global-chanmode "nst"
set global-stopnethack-mode 0
set global-revenge-mode 0
set global-ban-time 0
set global-exempt-time 0
set global-invite-time 0


set global-chanset {
        -autoop         -autovoice
        -bitch          -cycle
        -dontkickops    -dynamicbans
        -dynamicexempts -dynamicinvites
        -enforcebans    -greet
        -inactive       -nodesynch
        -protectfriends -protectops
        -revenge        -revengebot
        -secret         -seen
        +shared         -statuslog
        -userbans       -userexempts
        -userinvites    -protecthalfops
        -autohalfop
}


loadmodule server
set net-type 5

set nick "mellard"

set altnick "mellard-"
set realname "mellard2"
bind evnt - init-server evnt:init_server

proc evnt:init_server {type} {
  global botnick
  putquick "MODE $botnick +i-ws"
}

set default-port 6667

set servers {
xxx.xxx.com}

set keep-nick 1
set strict-host 0
set quiet-reject 1
set lowercase-ctcp 0
set answer-ctcp 3
set flood-msg 0:0
set flood-ctcp 0:0
set never-give-up 1
set server-cycle-wait 60
set server-timeout 60
set servlimit 0
set check-stoned 1
set serverror-quit 1
set max-queue-msg 300
set trigger-on-ignore 0
set double-mode 1
set double-server 1
set double-help 1
set optimize-kicks 0
set stack-limit 4
#set check-mode-r 1
#set nick-len 9
loadmodule ctcp
set ctcp-mode 0
loadmodule irc
set bounce-bans 0
set bounce-exempts 0
set bounce-invites 0
set bounce-modes 0
set use-exempts 0
set max-bans 0
set max-exempts 0
set max-invites 20
set max-modes 30
set kick-fun 0

# Set this to 1 if you want the bot to ban for control character/ctcp
# avalanches to a channel. This can prevent kick floods, but it also can
# fill the banlist.
set ban-fun 0
set learn-users 0
set wait-split 600
set wait-info 180
set mode-buf-length 200
#unbind msg - hello *msg:hello
#bind msg - myword *msg:hello
unbind msg - ident *msg:ident
unbind msg - addhost *msg:addhost
set opchars "%@&~"
set no-chanrec-info 0
set prevent-mixing 1

### IRC MODULE - OTHER NETWORKS (net-type 5) ###
#set kick-method 0
#set modes-per-line 3
#set include-lk 1
#set use-354 0
#set rfc-compliant 1
loadmodule transfer
set max-dloads 3
set dcc-block 0
set copy-to-tmp 1
set xfer-timeout 30
#loadmodule share
#set allow-resync 0
#set resync-time 900
#set private-global 0
#set private-globals "mnot"
#set private-user 0
#set override-bots 0
#loadmodule compress
set share-compressed 1
#set compress-level 9
#loadmodule filesys
set files-path "./filesys"
set incoming-path "./filesys/incoming"
set upload-to-pwd 0
set filedb-path ""
set max-file-users 20
set max-filesize 1024
#loadmodule notes
set notefile "mellard.notes"
set max-notes 50
set note-life 60
set allow-fwd 0
set notify-users 0
set notify-onjoin 0
loadmodule console
set console-autosave 1
set force-channel 0
set info-party 0
#loadmodule woobie
#loadmodule seen
loadmodule blowfish
#loadmodule assoc
#loadmodule wire
#loadmodule uptime 
***I xxx on the server address***
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

At the very top of this script is a setudef variable. This adds an option to your chanset. Did you enable this option in both bots? e.g. .chanset [channel] +relay :?:
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

romeo5k wrote:ok, question..... these are 2 different scripts right?
Obviously! :wink:
YooHoo wrote:At the very top of this script is a setudef variable. This adds an option to your chanset. Did you enable this option in both bots? e.g. .chanset [channel] +relay :?:
Check your bot configurations here: Setting up an Eggdrop

The fact the bot connects to an IRC network and joins a channel indicates nothing untoward.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Post Reply