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.

Can a hub link out instead of in?

General support and discussion of Eggdrop bots.
Post Reply
a
anotheregglover
Voice
Posts: 38
Joined: Thu Jan 13, 2005 12:01 am
Contact:

Can a hub link out instead of in?

Post by anotheregglover »

I'd prefer not to open a port on my hub. Is there any way to make the hub connect to the leaves instead of the leaves connecting to the hub?
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

that's a good question, not real clear on the specifics of the way ports open/close... have you tried to manually link the bots via the .link command, instead of letting the bot auto-connect?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

From a single eggdrop's point of view, +h ("hub") basically means always try to keep a direct link with this bot. The same goes with +a ("althub") if there is no other +h or +a bot directly linked.

Remove any +h and/or +a flags, and you could easily set up the links manually using .link, as suggested by YooHoo. Any automated linking would require some non-trivial scripting.
NML_375
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

I've never tried this, but it might work... on the leafs, add the hub with no botaddr (so they won't try to link), then on the hub, make sure you have botaddrs for all your leafs, .chattr them +L (that's the custom user flag "L" as I'm guessing you don't want them to be .botattr +l), then add this little script to make the hub try to link to them every minute:

Code: Select all

bind time - * checkLinks
proc checkLinks args {
	foreach bot [userlist bL&] {
		if {![islinked $bot]} {link $bot}
	}
}
Have you ever read "The Manual"?
a
anotheregglover
Voice
Posts: 38
Joined: Thu Jan 13, 2005 12:01 am
Contact:

Post by anotheregglover »

Thanks, I'll give that a shot!

One more question: Is it possible to make eggdrop listen on a specific IP instead of 0.0.0.0?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

I've never seen an eggdrop listening on 0.0.0.0, but I always set "my-ip" in the .conf - that might be the solution.
Have you ever read "The Manual"?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Simple answer:
Setting my-ip will affect any listen-command (as well as any outbound connection apart from the socket-command) executed after it has been set, it will however not affect any previous sockets.


Some further info, perhaps not directly related to topic:
With some care, you could craft some more advanced setups..
Imagine your server has several subnets routed to it, such as 10.1.1.253 and 192.168.73.18. Then you could do a setup such as this:

Code: Select all

set my-ip 10.1.1.253
listen 4432 bots
set my-ip 192.168.73.18
listen 5213 users
unset my-ip
Here bots will have to connect to a completely different ip than normal users, making it alittle more complicated to join a rogue bot..
Meanwhile, it will still rely on the host's routing-tables for outbound connections.
NML_375
Post Reply