Author Topic: EpicBot (epic7's IRC bot)  (Read 3678 times)

0 Members and 1 Guest are viewing this topic.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
EpicBot (epic7's IRC bot)
« on: December 30, 2012, 09:16:48 pm »
So, here's my IRC bot that has a bunch of random utilities :P
It'll be around 24/7 once I get my withg account all set up
(Thanks, alberthro! :P)

The bot is coded in Java using PircbotX.
Source code

Also, when I say pastebin, I'm referring to pastehtml.com.

Here are the commands that it has so far:

%define [word]

Retrieves the definition of a word.

Example:
<epic7> %define enigma
<epic7> [EpicBot] mystery , enigma , secret , closed book (noun) - something that baffles understanding and cannot be explained; "how it got out is a mystery"; "it remains one of nature's secrets"
<epic7> [EpicBot] For full definition, go to http://goo.gl/JvAje

<epic7> %define Sorunome
<epic7> [EpicBot] Sorunome (noun) - Derpy Hooves
<epic7> [EpicBot] For full definition, go to THE GAME


%shorten [URL]

Shortens a URL

Example:
<epic7> %shorten http://omnimaga.org
<epic7> [EpicBot] Shortened URL: http://goo.gl/q6Cjv


%paste [message]

Sends a message to a pastebin; html code is accepted

Example:
<epic7> %paste <h1>I AM HUNGRY</h1>
<epic7> [EpicBot] Pasted message: http://goo.gl/3rgBJ


%log

Pastes a log of the past 64 posts on your channel.
Html tags are apparently accepted in the log; that's a bug :P

Example:
<epic7> %log
<epic7> [EpicBot] Log for #omnimaga-spam: http://goo.gl/44jTJ


%dice [amount]

Rolls a given amount of dice, up to 2048. Even though nobody would ever need to roll 2048 dice at once :P

Example:
<epic7> %dice 2048
<epic7> [EpicBot] http://goo.gl/Z5CRK


%translate [from] [to] [message]

Translates text and sends it to pastebin. Sends to pastebin by default because I can't get the special characters to work correctly in omnom.
Uses bing translator api. Probably won't be very reliable, but whatever :P

For from and two, accepted values are
e- English
f- French
d or g- German
s- Spanish

Example:
<epic7> %translate e d Where's my dinner?
<epic7> [EpicBot] http://goo.gl/pUeGS


%stranslate [from] [to] [message]

Does the same as above, but posts to IRC instead of giving a pastebin link.

Example:
<epic7> %stranslate s e quise comer un reloj porque ellos son deliciosos
<epic7> [EpicBot] I wanted to eat a clock because they are delicious


%translol [message]

Does nothing useful, but can be kinda funny.
Translates from English to French, French to German, German to Spanish, and Spanish back to English :P

Example:
<epic7> %translol Felicitations, malefactors! I am endeavoring to misappropriate the formulary for the preparation of affordable comestibles! WHO WILL JOIN ME?!
<epic7> [EpicBot] Congratulations of the jury, the criminals! I'm trying to capture the list of medicinal products for the preparation of affordable edible! WHO WILL JOIN ME?


Other commands
%time
%test
%whoami
« Last Edit: December 30, 2012, 09:18:00 pm by epic7 »

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: EpicBot (epic7's IRC bot)
« Reply #1 on: December 31, 2012, 01:19:11 am »
Oh, nice!
And to your html bug: When loggin replace < with &lt; and replace > with &gt; and " with &quot; and & with &amp; and watch the magic happen :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: EpicBot (epic7's IRC bot)
« Reply #2 on: December 31, 2012, 01:45:21 am »
And that just makes it show the tags in text instead of the actual HTML?

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Re: EpicBot (epic7's IRC bot)
« Reply #3 on: December 31, 2012, 02:18:03 am »
Wow, nice one, very nice :)
I like the define sorunome, that definition seems about right.

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: EpicBot (epic7's IRC bot)
« Reply #4 on: December 31, 2012, 04:34:01 am »
And that just makes it show the tags in text instead of the actual HTML?
That's right :)
Also I didn't know about PircbotX :O and have always been using the plaing old Pircbot, maybe it's time to remake my bots with this one :P
Nice bot :)
[edit] Like the pastebin feature, mind if I use it in my bots as well (with credit ofc :P)?
« Last Edit: December 31, 2012, 04:36:12 am by ElementCoder »

Some people need a high five in the face... with a chair.
~EC

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: EpicBot (epic7's IRC bot)
« Reply #5 on: December 31, 2012, 11:20:18 am »
Sure, you can use that.

This was running regular pircbot until yesterday. I switched because pircbot didn't have support for SSL like pircbotx does, and I need SSL to get on the withg server.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: EpicBot (epic7's IRC bot)
« Reply #6 on: January 28, 2013, 07:08:05 pm »
Logging has a bug: it doesn't display any /me messages.

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: EpicBot (epic7's IRC bot)
« Reply #7 on: January 28, 2013, 07:09:16 pm »
Maybe I'll try to fix that someday :P

Also, when I log into other channels, like #THE_GAME for example, those also get logged into the #omnimaga one

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: EpicBot (epic7's IRC bot)
« Reply #8 on: January 28, 2013, 07:10:28 pm »
* Sorunome lost

How about you have a array in which are all channels you are in?
That way it might be easier with logging
or have in front of the message stuff like
#omnimaga:message
and then when logging you only grab the ones from #omnimaga/#THE_GAME etc.

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!