Code Monkey home page Code Monkey logo

Comments (6)

rlebeau avatar rlebeau commented on June 20, 2024

Can you be more specific? What is the exact problem? And, if multiple IRC clients have the same problem, what would you like Indy to do about it? Sounds like maybe it is a server-side problem.

from indy.

stuxamber avatar stuxamber commented on June 20, 2024

Sorry for not being specific.

When running an irc client under IdIRC.pas, I would use a different irc client such as mIRC to ping the id irc client, but it returns weird values such as PING REPLY 47367hrs 30mins 54secs.

It doesn’t make sense for a ping reply to take that long.

I have tested with different irc clients and all gave the correct response except for IdIRC.

You can test it by running a connection to any irc server using IdIRC, and then use a different irc client to ping it.

from indy.

rlebeau avatar rlebeau commented on June 20, 2024

I think the problem stems from TIdIRC treating a CTCP PING request the same as a CTCP TIME request, ie it sends a human-readable date/time string for the current machine that TIdIRC is running on. But a CTCP PING request is supposed to contain a timestamp that the requesting client chooses, and the target client is supposed to echo that timestamp back to the sender so the difference in times can be calculated relative to the requester's local clock.

Try this - in IdIRC.pas, change line 1579 (in the PING handler of TIdIRC.CommandPRIVMSG()) from this:

CTCPReply(FSenderNick, LCTCP, DateTimeToStr(Now)); {do not localize}

To this instead:

if LData = '' then begin
  LData := DateTimeToStr(Now);
end;
CTCPReply(FSenderNick, LCTCP, LData); {do not localize}

If that works, I will merge it in.

from indy.

stuxamber avatar stuxamber commented on June 20, 2024

I tried the change but it doesn’t seems to work, or I am doing it wrongly.

I changed the source directly from the folder and saved it and run my project but it doesn’t seems to reflect the changes.

from indy.

rlebeau avatar rlebeau commented on June 20, 2024

I changed the source directly from the folder and saved it and run my project but it doesn’t seems to reflect the changes.

Are you compiling Indy's source files directly into your project? If not, then you have to recompile+reinstall the Indy libs and link them into your project.

from indy.

rlebeau avatar rlebeau commented on June 20, 2024

Any update?

from indy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.