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.

About DCC CHAT

Old posts that have not been replied to for several years.
Locked
c
cerberus_gr
Halfop
Posts: 97
Joined: Fri Feb 07, 2003 8:57 am
Location: 127.0.0.1

About DCC CHAT

Post by cerberus_gr »

Code: Select all


bind ctcp F "*CHAT*" fd:chataccept

proc fd:chataccept { nick uhost hand dest key text } {
    set port [lindex [split $text] 3]
    listen $port script fd:fserv_chat_control
}

# What idx and text here?????
proc fd:fserv_chat_control { idx } { control $idx fd:fserv_chat }

proc fd:fserv_chat { idx text } {
    putlog "OK boss"
    putdcc $idx "welcome"
    return 1
}
I think that something is wrong :P
The eggdrop doesn't accept the DCC :(
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

That is because you are doing things totaly wrong.

When a client DCC chats your bot, it obtains the IP and port of the user.

The bot should make a outgoing connection to this. Your script makes starts to listen on the port the client sends.

This means that botht eh client and the bot are listening, but nobody is making any connections.

What exactly are you trying to do, and we mayu be able to advise you more.
c
cerberus_gr
Halfop
Posts: 97
Joined: Fri Feb 07, 2003 8:57 am
Location: 127.0.0.1

Post by cerberus_gr »

I want to control a DCC chat.
I have undestand that the other user opens this port (passive) and wait for me to connect there. So what is the next step when he sends me a ctcp for a dcc chat?
c
cerberus_gr
Halfop
Posts: 97
Joined: Fri Feb 07, 2003 8:57 am
Location: 127.0.0.1

Post by cerberus_gr »

I'm back :P

What I want to do:

I have a user abcd. I want when this user sends me a dcc chat to open a connection and the bot sends text there and the user sends text too.
I don't want to ask the user for a password or send him the banner or these messages "You have no messages." & "*** abcd joined the party line." I just want to communicate with dcc chat with abcd user without being a party line user.

Plz help :(
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Do you want to control and incoming dcc chat, or an outgoing dcc chat? Incoming means the user types /dcc chat bot. Outgoing means the user types !chat or something, and the BOT sends a dcc chat to the user (like an fserve).
c
cerberus_gr
Halfop
Posts: 97
Joined: Fri Feb 07, 2003 8:57 am
Location: 127.0.0.1

Post by cerberus_gr »

I want to connect to a fserv. So the eggdrop would msg a "trigger" on channel and the fserv would sent a dcc chat request to the eggdrop. I want my eggdrop to accept this chat and can download from fserv (I know how I should do this).
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Ok, so look at what ppslim said again. You need to make a connection *to* the fserve, but you're using the "listen" command, which simply opens a port on the local computer.
c
cerberus_gr
Halfop
Posts: 97
Joined: Fri Feb 07, 2003 8:57 am
Location: 127.0.0.1

Post by cerberus_gr »

ppslim wrote:The bot should make a outgoing connection to this.
This would be:
socket "host from dcc chat request" "port from dcc chat request"
???

Now how can I read and write in this socket. Is there an idx?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Yes that will work, but "socket" uses tcl's own networking. If you want to use eggdrop's, which will give you an idx, then use the "connect" command described in tcl-commands.doc. Look for the section titled "CONTROL PROCEDURES" to see how to control the new idx.
c
cerberus_gr
Halfop
Posts: 97
Joined: Fri Feb 07, 2003 8:57 am
Location: 127.0.0.1

Post by cerberus_gr »

It works great. Thx :)
Locked