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
The eggdrop doesn't accept the DCC
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?
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.
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).
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).
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.
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.