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.

eggdrop + bnc + bnc script problem

Help with usage of shell accounts and bouncers.
Post Reply
d
dacapn
Voice
Posts: 2
Joined: Sat Nov 04, 2006 5:58 am

eggdrop + bnc + bnc script problem

Post by dacapn »

I'm running an eggdrop on one machine and want it to connect to irc through a bnc on another shell. I configured the eggdrop and a bnc tcl script for the bot to connect to the bnc but I'm still having trouble with it. The bnc log only seems to state that there was a connection from the ip of the machine that the bot is being run on, but not that the connection to the irc server was completed. I can connect to the bnc and get through to the desired server from home.

I've re-written the server list a number of times, checked wildcards for statements that accomodate the various bnc default messages but haven't had any luck. Anyone able to give me an idea where to start or a more elegant solution to getting the eggdrop to connect?

Thanks
dacapn
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Read here about how to get error logs from the Eggdrop. Not much else to suggest without some more hints about what the problem may be..

Help us help you
d
dacapn
Voice
Posts: 2
Joined: Sat Nov 04, 2006 5:58 am

configs

Post by dacapn »

Well here's the bnc script I'm using (bestbnc.tcl from the script archive):

Code: Select all

# BestBnc.tcl v1.3 (6.6.99)
# By Flint (peaker)
# ---------------------------------------------
# OK, added support for 'on the fly' commands
# Server notices/RAW coding hasnt be implimented
# because I have yet to find a bouncer that req.
# it.  Drop me a line at peaker@peaker.net if
# you have a bouncer that needs to be implimented...
# Also fixed a little bug with .rehash :)
# ---------------------------------------------
# Should work with BNC, EzBounce, and that
# other bouncer :P

# Well... figure it out =) Your bouncer password
set bnc_pass "mypassword"

# Set this for your vhost
# Set this for '0' if you dont want to use a vhost
# DO NOT JUST UNSET THIS
#set vip this.is.my.really.cool.vhost.com
#set vip 0
set vip the.really.neat.vhost.from.my.provider.net

# Set this for the bouncer HOSTNAME or IP (no port)
set bnc_ip "my.shell.address.with.the.bnc.net"

# Set this for the bouncer PORT
set bnc_port "bnc port"

# Set this as your IRC server list
set irc_servers {
   irc2.choopa.net
   efnet.demon.co.uk
   rc.lagged.org
   irc.lightning.net
   irc.mindspring.com
   irc.rt.ru
   irc.easynews.com
   irc.servercentral.net
   irc.blackened.com
   irc.efnet.pl
}

# Set this for your ident (if you dont have it, set it for 0)
set ident 0
#set ident "dacapn"

# dont mess below here

unset servers
set servers { $bnc_ip:$bnc_port }
set strict-servernames 0
set serv 0

bind dcc n bounce bounce
bind dcc n bouncer bouncer
bind dcc n rehash rehasher

proc rehasher {nick idx a} {
        set rehash 1
        putlog "Rehashing (bestbnc.tcl)..."
        rehash
}

proc bounce {nick idx a} {
        global bnc_ip bnc_port
        putlog "Bouncing..."
        jump $bnc_ip $bnc_port
}
proc bouncer {nick idx a} {
        global bnc_pass bnc_ip bnc_port
        if {[lindex $a 0] == ""} {
                putidx $idx "Use: .bouncer <option> <args...>"
                putidx $idx "See README"
                return 0
        }
        if {[string tolower [lindex $a 0]] == "pass"} {
                if {[lindex $a 1] == ""} {
                        putidx $idx "Use: .bouncer pass <new password>"
                        putidx $idx "See README"
                        return 0
                }
                set bnc_pass [lindex $a 1]
                putidx $idx "Bouncer password changed."
                putlog "#$nick# bouncer pass ..."
                return 0
        }
        if {[string tolower [lindex $a 0]] == "ip"} {
                if {[lindex $a 1] == ""} {
                        putidx $idx "Use: .bouncer ip <ip/hostname of bnc>"
                        putidx $idx "See README"
                        return 0
                }
                set bnc_ip [lindex $a 1]
                putidx $idx "Changed - Check bouncer port as well."
                return 1
        }
        if {[string tolower [lindex $a 0]] == "port"} {
                if {[lindex $a 1] == ""} {
                        putidx $idx "Use: .bouncer port <port>"
                        putidx $idx "See README"
                        return 0
                }
                set bnc_port [lindex $a 1]
                putidx $idx "Changed - Check bouncer ip as well."
                return 1
        }
}

# best
set best_1 "Use /quote pass <password> to authenticate."
set best_2 "Use /quote conn \[server\] <port> <pass> to"
set berr_1 "Failed connection."
set berr_2 "You are not allowed to connect to"

# bnc
set bnc_1 "You need to say /quote PASS <password>"
set bnc_2 "Level two, lets connect to something real now"
set bnc_3 "Switching Vhost to"
set bnc_err_1 "Failed Connection"

# ezbounce
set ez_1 "Please use /quote PASS <password> to register"
set ez_2 "Password accepted -- Welcome to ezbounce"
set err1 "Connection attempt to * failed: unknown host"
set err2 "You are not allowed to connect to"

bind notc - $best_1 auth
bind notc - $bnc_1 auth
bind notc - $ez_1 auth
bind notc - *$best_2* conn
bind notc - *$bnc_2* bnc_vip
bind notc - *$bnc_3* conn
bind notc - *$ez_2* ez_vip
bind notc - *$berr_1* conn
bind notc - *$bnc_err_1* conn
bind notc - *$err1* conn
bind notc - *$err2* conn

set sers [llength $irc_servers]
proc auth {nick host hand a} {
        global bnc_pass
        putserv "PASS $bnc_pass"
        putlog "Sending password to bouncer..."
        return 0
}
proc conn {nick host hand a} {
        global irc_servers serv sers
        if  {$sers < $serv} {
                set serv 0
                putlog "Server list exhasted.  Restarting..."
        }
        putserv "CONN [lindex $irc_servers $serv]"
        putlog "Connecting to [lindex $irc_servers $serv]"
        incr serv
        return 0
}
proc bnc_vip {nick host hand a} {
        global vip
        if {$vip == 0} { conn $nick $host $hand $a }
        putserv "VIP $vip"
        if {$ident == 0} { return 0 }
        putserv "IDENT $ident"
        return 0
}
proc ez_vip {nick host hand a} {
        global vip
        if {$vip == 0} { conn $nick $host $hand $a }
        putserv "INTERFACE $vip"
        return 0
}
# uncomment this to autoconnect when you start the bot
utimer 1 "jump $bnc_ip $bnc_port"
putlog "BestBNC v1.3 by Flint loaded..."
I've tried with and without the ident, the servers as they are listed above in server, "server", "server port" formats but still no help. I've set my userid in my eggdrop.conf to be my shell login and other things without success. I've also specified the server to be my bnc and gotten no help there.

As I said I get nothing helpful in my logs... The eggdrop just saves the channel and user file hourly and the bnc log just says something like "received connection from ..." with the proper eggdrop address. Ordinarily all it says is "received connection from ..." and something along the lines of "connecting user@host to ..." with the appropriate server.

Is any of this helpful?
Post Reply