Then, to RECIEVE a DCC Chat, via sockets, and not using mIRCs default window/ect.
How it works
1. You recieve DCC request, that contains PORT/IP.
2. You connect to IP/Port.
3. ..thats it.
Recieving the DCC Request
The request comes in the form of a CTCP, so lets monitor them.
[color:orange]; monitor all ctcps.
ctcp *:*:*:{
; identify if its a dcc chat
if ($1-3 == DCC CHAT chat) {
; if so dream up a socket name.
var %s = $+(sockrcv.,$nick,.,$5)
; open that socket to the given ip/port.
sockopen %s $longip($4) $5
; stops mirc from responding by default
haltdef
; end if.
}
; end ctcp event.
}
[/color]
Receiving what was said..
[color:orange]; monitor incoming data from that socket
On *:Sockread:sockrcv.*:{
; save to variable
sockread %sockread
; output it.
echo -> $gettok($sockname,2,46) $+ ; %sockread
; end sockread
}
[/color]
With minor adjustments these both will work together without duplication of events being required, i.e. to close a socket, or send data..
Hope these help.
Eamonn.