forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


IRC (How to)

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
LinkSisco
Valued Newbie


Joined: 17 May 2002
Posts: 30
Location: UK

PostPosted: Sat Aug 17, 2002 3:37 pm    Post subject: IRC (How to) Reply with quote

Is the a way or a dll in fact that can connect to irc servers???

I want to try make an irc client.

THank you.
Back to top
View user's profile Send private message
Protected
Valued Contributor
Valued Contributor


Joined: 02 Jan 2001
Posts: 228
Location: Portugal

PostPosted: Sat Aug 17, 2002 3:42 pm    Post subject: Reply with quote

You can use any DLL that supports TCP, like VDSINET or VDSIPP. I would recommend VDSIPP since it's easier and supports 99 different connections at the same time.
In order to find the commands exchanged between the IRC servers and clients, you can use a program I did specially for that, look in http://www.vdsworld.com/~protected/P13.HTML . Turn it on and connect it to any irc server, and then connect your client to yourself using this program's port, it will show you the commands sent by the server and client and direct them to the client and server.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
LinkSisco
Valued Newbie


Joined: 17 May 2002
Posts: 30
Location: UK

PostPosted: Sat Aug 17, 2002 3:49 pm    Post subject: Reply with quote

Thank you very much.
Back to top
View user's profile Send private message
LinkSisco
Valued Newbie


Joined: 17 May 2002
Posts: 30
Location: UK

PostPosted: Sat Aug 17, 2002 10:33 pm    Post subject: Reply with quote

Ok, I have been working with your program for a while now and im still no closer.

i connected to the irc server using the program, then i connected my irc client to the server.

I then sent normal stuff like /nick XXXXX and things like that which show up on the programs window but thats not any help because it only displays what i typed.

Am i doing something worng here?
Or has someone done this before and willing to share the source as an example?

Thank you.
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Sat Aug 17, 2002 10:50 pm    Post subject: Reply with quote

This is a slightly modified version of Tommy's example in the archive:
Code:

  option decimalsep,"."
  external vdsinet.dll,Public Freeware Key|90257236
  inifile open,.\@name(%0).ini
  %%name = @iniread(general,name)
  if @not(@trim(%%name))
    repeat
      %%name = @input(Please enter your nickname:)
      if @not(@ok())
        exit
      end
    until @trim(%%name)@not(@ok())
  end
  inifile write,general,name,%%name
  %%server = @iniread(general,server)
  if @not(@trim(%%server))
    repeat
      %%server = @input(Please enter the server's IP address:)
      if @not(@ok())
        exit
      end
    until @trim(%%server)@not(@ok())
  end
  inifile write,general,server,@trim(%%server)
  %%port = @iniread(general,port)
  if @not(@trim(%%port))
    repeat
      %%port = @input(Please enter the port on the server:)
      if @not(@ok())
        exit
      end
    until @trim(%%port)@not(@ok())
  end
  inifile write,general,port,@trim(%%port)
  DIALOG CREATE,IRC,-1,0,584,346
  DIALOG ADD,EDIT,eChat,8,8,416,280,,MULTI
  DIALOG ADD,LIST,lUsers,8,432,144,280
  DIALOG ADD,EDIT,eText,296,8,416,24
  DIALOG ADD,BUTTON,bSubmit,296,432,144,24,&Submit,default
  DIALOG ADD,STATUS,sStatus
  DIALOG SHOW
  net socket,auto
  net socket,vdsevents
  net socket,addr,@trim(%%server)
  net socket,port,@trim(%%port)
  net socket,client
  list create,1
  list create,2
:evloop
  %E = @event()
  if %E
    goto %E
  end
  %E = @net(socket,event)
  if %E
    goto %E
  end
  wait "0.2"
  goto evloop
:bSubmitbutton
  %%data = @dlgtext(eText)
  %%char = " "
  gosub split
  if @equal(@substr(%%command,1,1),/)
    %%command = @strdel(%%command,1,1)
    %%text = %%command %%params
    gosub send
  else
    %%text = PRIVMSG %%channel :%%params
    gosub send
  end
  dialog set,eText
  goto evloop
:network
  %%buffer = %%buffer@net(socket,data)
  if @not(@zero(@pos(@cr(),%%buffer)))
    repeat
      %%data = @substr(%%buffer,1,@pred(@pos(@cr(),%%buffer)))
      %%buffer = @strdel(%%buffer,1,@succ(@pos(@cr(),%%buffer)))
      %%char = " "
      gosub split
      if @equal(%%command,PING)
        %%text = PONG %%params
        gosub send
      else
        list clear,1
        list assign,1,@dlgtext(eChat)
        list clear,2
        list assign,2,%%command %%params
        dialog set,eChat,@text(2)@text(1)
      end
    until @zero(@pos(@cr(),%%buffer))
  end
  goto evloop
:connect
  %%text = USER %%name @chr(34)mshome.net@chr(34) @chr(34)@net(socket,addr)@chr(34) :%%name@cr()@chr(10)NICK %%name
  gosub send
  goto evloop
:send
  net socket,sendserver,%%text@cr()@chr(10)
  list clear,1
  list assign,1,@dlgtext(eChat)
  list clear,2
  list assign,2,%%text
  dialog set,eChat,@text(1)@text(2)
  %P = @LEN(@DLGTEXT(eChat))
  %P = @sendmsg(@win(~eChat),$0B1,@FSUB(%P,1),%P)
  %P = @sendmsg(@win(~eChat),$0B7,0,0)
  DIALOG FOCUS,eText
  exit
:split
  if @zero(@pos(%%char,%%data))
    %%command = %%data
    %%params =
  else
    %%command = @substr(%%data,1,@pred(@pos(%%char,%%data)))
    %%params = @substr(%%data,@succ(@pos(%%char,%%data)),@len(%%data))
  end
  exit
:closec
  list clear,1
  list assign,1,@dlgtext(eChat)
  list clear,2
  list assign,2,Connection closed
  dialog set,eChat,@text(2)@text(1)
  goto evloop
:error
  warn Fatal error: @net(socket,error)
:close
  list close,1
  list close,2
  exit

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Protected
Valued Contributor
Valued Contributor


Joined: 02 Jan 2001
Posts: 228
Location: Portugal

PostPosted: Sat Aug 17, 2002 11:05 pm    Post subject: Reply with quote

In the window of my program, you should see the messages sent by the client and by the server
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Sun Aug 18, 2002 6:11 am    Post subject: Reply with quote

You can always try to look at the RFC, which is quite extended though:

http://www.irchelp.org/irchelp/text/rfc1459.txt
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Protected
Valued Contributor
Valued Contributor


Joined: 02 Jan 2001
Posts: 228
Location: Portugal

PostPosted: Sun Aug 18, 2002 12:37 pm    Post subject: Reply with quote

Oh, cool, thanks Tommy that may be of use for me too.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group