• (2 Pages)
  • +
  • 1
  • 2

IRC Bot 101 - basic bot layout and creation. Rate Topic: -----

#16 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 12428
  • View blog
  • Posts: 48,810
  • Joined: 12-June 08

Posted 24 August 2011 - 06:55 AM

You wouldn't per-say replace it with a thread, just dump the loop *IN* a thread.

The loop is required to run to check if any messages in the IRC room have been transmitted. What are *your* thoughts on replacing it?
Was This Post Helpful? 0
  • +
  • -

#17 TechKid  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 3
  • View blog
  • Posts: 82
  • Joined: 04-September 10

Posted 25 November 2012 - 09:47 AM

This is really cool, great tutorial! :)
Was This Post Helpful? 0
  • +
  • -

#18 Cyntalan  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 30-March 16

Posted 30 March 2016 - 06:29 PM

So I'm trying to work with this on some level and I've run into a few issues.

First off, the code as is seems to launch out of order. The user/nick/join commands run before the connection is completed, and thus never actually act when they should.

Secondly, I'm having the IDENT issue that's stated in previous replies (hangs on AcceptTcpClient), but I know for a fact that nothing in my network is blocking ports (I also have mIRC running with IDENT working there and my application has the same permissions as mIRC). I did comment out the whole IDENT section, which allows me to get the MOTD, but again, as the user/nick/join commands are done before the connection is complete, nothing occurs after the MOTD.

Lastly, on fiddling with the code, I moved the user/nick/join commands inside the While loop to have sCommand checked for the end of MOTD line (376). Once it sees that, the commands execute properly and everything is fine. However, I have learned that it doesn't seem to matter what server I use, I get one successful connection. All following connections timeout after the the IDENT. The servers I'm using do allow connections without IDENT (they simply concatenate a tilde to the hostname), but I have noticed a common difference in that the hostname is cached on successive attempts. Only when the server does not have the hostname cached does it allow a connection.

So there you have it: a trifecta of failures. I came across this in an attempt to rebuild a Java-based bot that was failing due to, oddly enough, the exact same problem as #1 here (the user/nick/join commands execute before connection), but due to my lack of knowledge of Java, I had no idea how to play with that one in the same way I do in VB. If I had to guess, problem #3 can be traced back to my ghetto workaround for problem #2, but I'm not entirely certain. Seeing as this was done 2 years ago, I'm also just as likely to believe that a combination of OS differences (I'm on Win 10, I'm betting this was done on 7/8, even possibly XP/Vista), newer versions of any of the multitude of references in the VB causing some unexpected incompatibilities, or some other unknown variable that has come into play since this was originally designed. Any ideas?
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2