01-22-2014, 11:07 PM
Since it is so damn popular atm, I went ahead and made myself an IRC Bot too. It had nothing spectacular or new, but it was a bot and it was working.
One thing I realized was how hard and frustrating socket connections was in python 3.x. To put it out simply, what happened over 2.x to 3.x was now, with 3.x you have to explicitly define the encoding of the data you are sending. So, this requires something like:
irc.send(bytes("PRIVMSG"+CHN+" : Hello\r\n","utf-8"))
when you have lots of these, It can get very obnoxious. So what ı basically did, was I created a little "framework" that anyone can use for their own personalized IRC Bots. It basically consists of very basic useful classes and functions that helps you out with the development process.
It is the version one, I was testing for a while, now ı know it works, so here is the link to the post in my pastebin page.
As I said, nothing new/fancy going on, anyone who has 3 months of beginner knowledge on python could do it, but yeah. Coding is coding, and I coded. :D
One thing I realized was how hard and frustrating socket connections was in python 3.x. To put it out simply, what happened over 2.x to 3.x was now, with 3.x you have to explicitly define the encoding of the data you are sending. So, this requires something like:
irc.send(bytes("PRIVMSG"+CHN+" : Hello\r\n","utf-8"))
when you have lots of these, It can get very obnoxious. So what ı basically did, was I created a little "framework" that anyone can use for their own personalized IRC Bots. It basically consists of very basic useful classes and functions that helps you out with the development process.
It is the version one, I was testing for a while, now ı know it works, so here is the link to the post in my pastebin page.
As I said, nothing new/fancy going on, anyone who has 3 months of beginner knowledge on python could do it, but yeah. Coding is coding, and I coded. :D