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.

Problems with DCCing

General support and discussion of Eggdrop bots.
Post Reply
D
D3matt
Voice
Posts: 8
Joined: Thu Sep 30, 2010 9:16 pm

Problems with DCCing

Post by D3matt »

I had an Eggdrop running on my computer (localhost), which I was able to connect to fine with /ctcp bot chat. Trying to DCC to it myself always gave an Invalid Port error but I didn't really care because it worked fine the other way.

But, since my friend and I moved it to his home server farm, I can't DCC to it at all. He can DCC to it fine both ways, but when I do a CTCP, it sends the DCC, but all I get is this:

Code: Select all

DCC Chat session
-
Client: HazBot (127.0.1.1)
Time: Thu Sep 30 19:38:17 2010
-
Acknowledging chat request...
-
Unable to connect
-
DCC session closed
Trying to open the DCC myself still gives the Invalid Port error.

EDIT: We are both using mIRC.

EDIT2: I just noticed the IP of HazBot. That's clearly the problem, since it's not located at 127.0.1.1, obviously. So how do I get it to try and connect to the right IP?
D
D3matt
Voice
Posts: 8
Joined: Thu Sep 30, 2010 9:16 pm

Post by D3matt »

Apologies for double-posting, but the Bot is now feeding me an IP of 255.255.255.255, which is again, obviously, not right. How do I tell the damn bot to shove the attitude and start telling me accurately what IP it's on? The /whois shows the bot's IP properly (though it's worth mentioning that my IRCop lets me see hidden IPs).
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

use the nat-ip settings in youre bots config file
set nat-ip "127.0.0.1"

If you have a NAT firewall (you box has an IP in one of the following ranges: 192.168.0.0-192.168.255.255, 172.16.0.0-172.31.255.255, 10.0.0.0-10.255.255.255 and your firewall transparently changes your address to a unique address for your box) or you have IP masquerading between you and the rest of the world, and /dcc chat, /ctcp chat or userfile sharing aren't working, enter your outside IP here. This IP is used for transfers only, and has nothing to do with the my-ip or my-hostname settings. You may still need to set my-ip and/or my-hostname.
this would be IP Address you would need to telnet to when you want to connect to the bot. (I.E the address of the server the bot is running from).
D
D3matt
Voice
Posts: 8
Joined: Thu Sep 30, 2010 9:16 pm

Post by D3matt »

Oh, OUTSIDE IP, ok. I didn't notice that bit. I'll pass that on to the server op and see if that helps.

EDIT: Apparently I can change that with the .set command via telnet. But when I do .set anything it just says "What? You need '.help'. This is rather odd behavior as I am the owner of the bot and it should be working. It says it recognizes me as an owner, but none of my owner commands (.set, .tcl) seem to be working...
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

few things to check for on that one
check you have

Code: Select all

#unbind dcc n tcl *dcc:tcl
#unbind dcc n set *dcc:set
and not

Code: Select all

unbind dcc n tcl *dcc:tcl
unbind dcc n set *dcc:set
Also note the settings of must-be-owner i often forget this one :oops:

Code: Select all

# If you enable this setting, only permanent owners (owner setting) will be
# able to use .tcl and .set. Moreover, if you want only let permanent owners
# use .dump, then set this to 2.
# WARNING: setting this to 0 is a security risk, don't do it unless you trust
# your owners enough to give them shell access to the account the bot is
# running on. 
set must-be-owner 1
lastly if that didn't help any, just make sure that

Code: Select all

#set owner "MrLame, MrsLame"
match you're handle on the bot.
D
D3matt
Voice
Posts: 8
Joined: Thu Sep 30, 2010 9:16 pm

Post by D3matt »

Unless he changed it when he uploaded it, all of those are as they should be. I am an owner, so must-be-owner shouldn't affect me, but I'm pretty sure that's 1.

He said he set the nat-ip to his outside IP last night during our trouble-shooting session, and I think that's when it started sending its IP as 255.255.255.255.
D
D3matt
Voice
Posts: 8
Joined: Thu Sep 30, 2010 9:16 pm

Post by D3matt »

I finally got FTP set up with the host, and was able to look at the config file.

The owners were not set, I set it and now that part works.

He was trying to use a dyndns domain as the bot's nat-ip which was causing the problems with sending the wrong IP. I changed it and now it works fine.

The only question is, how else can I deal with the dynamic Ip, besides using /userip to get the bot's IP and using telnet to update the nat-ip? Would pinging the dyndns domain every, say, 24 hours, and grabbing the IP then setting that as the nat-ip be a feasible alternative?
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

probably not good to ping people so much :/ You mentioned dyndns, you could try using the same thing they kinda do. only to update you're eggdrop's nat-ip setting to its external one.

Code: Select all

package require http

set dnu_url "http://checkip.dyndns.com/"

proc dnu {} {
 global dnu_url nat-ip
  set token [http::geturl $dnu_url]
  set data [::http::data $token]
  set tmp [join [lrange [split $data] end-1 end-1]]
  regsub -all -nocase -- {([a-z]|<|\/|>)} "$tmp" "" new_ip
  set ::nat-ip $new_ip
  ::http::cleanup $token
}
will work, but you just need to find a way to run it. I'd say maybe from a timer or something along them lines. I haven't included a check to test if the IP its getting is the same as the one thats already set, since it wouldn't make any differance.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Just a few thoughts..
Given the nature of established connections over tcp, the IP address can be trusted to remain the same for as long as the connection is established (should the IP change, then the connection would be terminated). Thus, you would only have to update nat-ip whenever your eggdrop connects to a new irc server.
NML_375
D
D3matt
Voice
Posts: 8
Joined: Thu Sep 30, 2010 9:16 pm

Post by D3matt »

Thanks for the script, I might try that.
Post Reply