Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

IRC protocol question

Options
  • 01-01-2007 8:45pm
    #1
    Closed Accounts Posts: 22,479 ✭✭✭✭


    My bot written in PHP, keeps coming offline after about 10 mins each time I connect it. It pongs the IRC server back the correct string so I can't see why it is doing this. Any ideas, will post some of the code up if required. The code I use to keep it online is [PHP]while ($data = fgets($connection, 1024)) {
    server reply interpretation here
    }
    [/PHP]
    I'm running it using the command line on a dedicated server (100mbit). If anyone has any ideas it would be great.


Comments

  • Registered Users Posts: 37,485 ✭✭✭✭Khannie


    I'd suggest trying a different IRC network (or maybe setting up your own server locally). Quakenet (for example) has very sophisticated bot removal at the backend.


  • Closed Accounts Posts: 22,479 ✭✭✭✭philologos


    its going to be used to get MYSQL data from a webbased game Moblife to its irc network at irc.moblife.co.uk #moblife. So its crucial that it is there but i've found a bug in my code, also to generate IRC stats on a MYSQL database and seperate php page.

    It was reading the wrong word for "PING :" to send the request back to and I've changed the whileloop to something more obvious like
    I assumed that first word in the reply when split by " " would be $section[1] but it was $section[0]
    [PHP]
    while (2 > 1) {
    [/PHP]
    I've just put it online again it should be okay now :) *fingers crossed, and all other possible limbs* :)


Advertisement