LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-22-2007, 07:37 AM   #1
Fophillips
LQ Newbie
 
Registered: Dec 2006
Posts: 7

Rep: Reputation: 0
Dcc


I'm making an IRC bot in Ruby, and I need it to use DCC. But after reading through the spec and studying the messages sent by irssi I'm still confused. According to Wikipedia the syntax for sending a file is:
Code:
PRIVMSG <nick> :^ADCC SEND <filename> <ip> <port> <file size>^A
But the message that gets sent when I actually try to send a file is:
Code:
PRIVMSG <nick> :^ADCC SEND bot.rb 3232236034 55433 622^A
None of these numbers correspond to any of the supposed arguments. Can anyone help?
 
Old 04-22-2007, 12:45 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
I suspect it is converting the IP to a single 4-byte integer. The example you posted corresponds to 192.168.2.2. 55433 seems like a reasonable port for DCC use. I have no idea how big the file you are sending is, perhaps a small file at 622 bytes?
 
Old 04-22-2007, 02:58 PM   #3
Fophillips
LQ Newbie
 
Registered: Dec 2006
Posts: 7

Original Poster
Rep: Reputation: 0
How would you go about converting the IP? And the file size is 601 bytes, not 622.
 
Old 04-22-2007, 03:01 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Not sure about the file size, but the IP address is something like:

Quote:
3232236034%256=2
3232236034/256=12625922
12625922%256=2
12625922/256=49320
49320%256=168
49320/256=192
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dcc bruj3w Linux - Networking 0 08-26-2006 09:20 AM
DCC Alliance mark_alfred MEPIS 3 05-31-2006 07:16 PM
X-Chat DCC? N|k0N Linux - Software 1 10-02-2004 04:45 PM
xchat and dcc true_atlantis Linux - Software 0 01-23-2004 08:48 PM
DCC Sends jrmann1999 Linux - General 0 07-01-2001 07:53 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration