Opening Connections With IRC Servers/Networks

This is a discussion on Opening Connections With IRC Servers/Networks within the Networking/Device Communication forums, part of the General Programming Boards category; First of all, your responses are wrong. What you would send back to the server is: Code: PONG :3b22356b\r\n Since ...

  1. #16
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,262
    First of all, your responses are wrong. What you would send back to the server is:
    Code:
    PONG :3b22356b\r\n
    Since the IRC message will be sent to you in the same format, all you have to do is replace the PING with PONG. You code can be as simple as:
    Code:
    if(!strncmp(szIrcMsg,"PING",4))
    {
       memcpy(szIrcMsg,"PONG",4);
       // Send szIrcMsg back to the server now
    }

  2. #17
    Registered User
    Join Date
    Jun 2005
    Posts
    9
    How should I declare the identifier szIrcMsg? I got this errors while compiling:

    Code:
    79 C:\Files\dev\Projects\IRCD.cpp `szIrcMsg' undeclared (first use this function) 
      (Each undeclared identifier is reported only once for each  function it appears in.)
    (PS: sorry for all the questions im sorta new to c++) Thanks.

  3. #18
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,262
    szIrcMsg is the buffer that you receive the data from the server into.

    You might want to spend some time learning the ins and outs of the language before you jump into something like an IRC bot.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Count established connections
    By TomChesley in forum Networking/Device Communication
    Replies: 1
    Last Post: 05-27-2008, 09:32 PM
  2. IRC, reading the stream
    By Iyouboushi in forum C# Programming
    Replies: 6
    Last Post: 08-03-2006, 06:34 PM
  3. Select handling more then 500 connections
    By Chronom1 in forum Networking/Device Communication
    Replies: 5
    Last Post: 02-27-2005, 03:20 PM
  4. Some help needed with IRC
    By SaintK in forum C++ Programming
    Replies: 2
    Last Post: 04-04-2004, 08:27 AM
  5. Multiple Client Connections
    By (TNT) in forum Windows Programming
    Replies: 1
    Last Post: 04-06-2002, 11:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21