Author Topic: Hey to any bots out there lurking?  (Read 409 times)

Offline FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Hey to any bots out there lurking?
« Reply #15 on: February 25, 2018, 02:54:33 PM »
IRC let's you create a room on the fly. Just type /join #whateverPeteLikes and the room comes to be.

Offline Pete

  • Cuz I sez so, varmint!
Re: Hey to any bots out there lurking?
« Reply #16 on: February 25, 2018, 03:47:54 PM »
@ Fell: Yes, I just tried that. I signed in and got dancing girls moving across the screen, so, you were correct... whateverPeteLikes... Oh wait, is that Bill in a tutu? My eyes!!! I think I just developed a greater appreciation to Norby bot. That, and I going to start attending church again.

@ Code Hunter: I wrote my bot in Qb64. What I don't get is how to get the information back and forth with, I presume _openclient or whatever it's called. I haven't used that statement in maybe 7 years. So what I did is...

1) Open firefox and go to IRC.

2) Position firefox at half screen.

3) run program, which...

Reads the chat screen, copies the text, saves it to a file, reads back the file, parses the text, and gathers the last new post. It then makes that post into a bing search and sends it back by pasting it in the message input box and emulating an Enter key press.

Pete :)

 

Re: Hey to any bots out there lurking?
« Reply #17 on: February 25, 2018, 04:01:40 PM »
Mine setup is quite a bit simpler.

1) OpenClient (Port 6667 FreeNode)
2) Send the Nick, Password, and channels to conect to
3) Wait for it to complete the server messages

After that is is simple to have the program just constantly check for any messages comming in.

If it is a 'Ping' send 'Pong'

If Norby's name is mentioned, parse the incomming text and respond accordingly.

My main code for the Bible is a separate program and I just import that in and instead of getting text from the user it gets the incomming message that has been parsed to use the function.
« Last Edit: June 13, 2018, 04:51:04 AM by odin »

Offline Pete

  • Cuz I sez so, varmint!
Re: Hey to any bots out there lurking?
« Reply #18 on: February 25, 2018, 04:32:22 PM »
Yes. If I was up to learning / relearning some _openclient functions, that's the way I would have set mine up, too. Using what I already know made it possible to pop together something fast, while I was in chat.

I posted the code here, at my QB Forum site: http://www.network54.com/Forum/648955/message/1519587034

To try it would be a pain, because screen sizes are different, so _SCREENPRINT and _SCREENCLICK positions would probably need to be changed to fit other people's desktop and browser configurations. It only single clicks, btw, but if you have single click substitute for the traditional double click in your operating system, I'd be very careful before trying it out. I'd recommend opening something full screen in the background, like Notepad, just to shield any exposed areas of the desktop.

Pete

Offline bplus

  • B = B + geberation
Re: Hey to any bots out there lurking?
« Reply #19 on: February 26, 2018, 10:24:19 AM »
Thanks Pete for Bot-A-BING code. Now that might deserve a star or two at least Bronze :D

Oh! but we better discuss ground rules for testing these suckers out so they are fun and NOT a nuisance.
B = B + ...