Thread: RicBot Base and RicBot Google.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    63

    RicBot Base and RicBot Google.

    I started writing an IRC bot in C++ for windows XP.

    The name came from a typo of ircbot which made friend made, but I liked the sound and kept it as the name.

    Didn't really know what it would do, though I had a few ideas in the TODO file, they are more like notes than actual things to do.

    Well anyway I have a base, and a version with a google search option. I thought I would post both versions as they are. People can tell me areas which are poorly done, or could be changed in some way. Or maybe make suggestions for it.

    If you want to know why I did something a certain way, or how something works just ask.

    It could do with more error checking, and it could also do with more protocol related code, currently it only checks to see if it can join a channel.

    Anyway I thought I would post them.

    TODO from the base.
    1.) Code for when windows shuts down, so the
    bot automatically closes.

    2.) Write some functions for the bot, for example.

    Channel protection bot.
    Trivia bot.
    AI bot.
    Google/News/Image search.
    MSDN search.
    IMDB search.

    3.) Code a little GUI for when the bot opens,
    saying something like "RicBot blah blah" you get the idea
    TODO from the google version
    1.) Code for when windows shuts down, so the
    bot automatically closes.

    2.) Write some functions for the bot, for example.

    Channel protection bot.
    Trivia bot.
    AI bot.
    Google/News/Image search.
    MSDN search.
    IMDB search.
    -----------------------------------------------
    Google search is almost complete, it connects to google,
    searches, retrieves all the webpage and stores it into
    a variable, then parses it. Needs more testing to be done.
    -----------------------------------------------

    3.) Code a little GUI for when the bot opens,
    saying something like "RicBot blah blah" you get the idea

    4.) Now that google search is almost complete,
    thought I would add something else to do hehe.
    How about a global time checker.
    You type !time and it gives a default time zones time,
    like for example GMT.
    But if you supply it with either a country like
    !time FR (france) it will give the time in france or
    if you supply it with something like !time UTC then
    it will use UTC time instead of GMT.

    5.) What about something a bit more cool, how about a
    translator. You supply it with 2 main arguments, and
    the other arguments are the text to be translated.

    !translate english russian Hello how are you?

    The first argument is the language you are translating from,
    the second argument is the language you are translating to.

    6.) Also what about a !define command, to define a word?
    it could use googles define:keyword

    7.)What about spell checker?
    !spell word
    it could connect to dictionary.com
    There should be less to do as it advances but oh well.

    Any type of feedback at all is appreciated.

    (incase you are wondering why it has a readfile and writefile function, well it originally wrote the data it recieved for the webpage to a HTML file called google_file.html and then the file was read, but I decided to store the data directly into a variable (not good for big pages I guess) so rather than just delete the code, I put it in 2 separate functions incase it is needed later.)

    -EDIT-
    I forgot to say, for the address of the IRC server you will have to use an IP not hostname, because it doesn't use a gethostbyname() function. I was intending on reading up on getaddrinfo() and using that, but I forgot all about it.

    Also if anybody decides to do any work on this or use large parts of it, could they put a link to this thread in the comments or readme. Thank you.
    Last edited by John_; 01-31-2006 at 02:16 PM.

Popular pages Recent additions subscribe to a feed