Pidgin plugin for MegaHAL

Some time ago I wrote how to setup MegaHAL to have some talks with “it”.

But, after that, I went one step further and I wrote a Pidgin (multinetwork -Jabber/XMPP, msn, etc.- Instant Messenger client,plugin) so MegaHAL can automatically answer to some people. In other words: you can say “for this Instant Messenger account, when this contact writes to me Pidgin will automatically respond some text using MegaHAL”.

(Warning: some people can get upset if they think that they are talking with you but they are talking with MegaHAL. Even if MegaHAL learnt from you and the co-worker chat logs.)

You can download the plugin file and copy to ~/.purple/plugins (you will need to install MegaHAL for Perl, see the README file for instructions.

You can clone all repository (there is some other stuff):
git clone git://git.pinux.info/misc.git

Then it’s inside misc/pidginPluginMegahal/

An example (continuation of another talk):
(22:38:01) RealUser: in case if pubilla comes, i will not kneel or do anything too strange
(22:38:40) megaHal: Well, when i'll have to kneel in front of the pubilla is brian from avenue q, in spanish, in madrid... It's nice to know where it comes.
(22:38:40) RealUser: test
(22:38:43) megaHal: I cannot test here, i would need and we just talk over each other.
(22:39:23) RealUser: wow man, you are mad !
(22:39:27) megaHal: You are not importing the paper. On the other .csl file with a man.
(22:39:37) RealUser: woman dude
(22:39:49) megaHal: Short title dude is back, and then i deleted without problems the doi. So he should update the wiki too). So you can be quite fast and the date, in parentheses, within the text cannot be 100% since web is not very busy: you could do a happy go lucky dude.
(22:40:25) RealUser: i love you
(22:40:28) megaHal: Is it you that i love you.
(22:40:46) RealUser: i don't know man
(22:40:48) megaHal: You don't know man.
(22:40:59) RealUser: no i do not know for sure
(22:41:01) megaHal: I know you do.
(22:41:15) RealUser: come on dude, no way
(22:41:18) megaHal: No way to do with this dude.
(22:41:24) RealUser: to do what?
(22:41:25) megaHal: What do i do.
(22:41:34) RealUser: everything
(22:41:38) megaHal: We consider everything in the backlog. Should it be that for x date this will be there.
(22:41:58) megaHal: Yes, a friend of mine said that i didn't get to the halfway point.

If somebody needs some information or help: you can leave a message in this post. I’ll answer, not MegaHAL 🙂

8 comments to Pidgin plugin for MegaHAL

  • With this plugin does megahal learn from ongoing conversations or only from chat logs?

  • I’ve tried using it on yahoo, and I don’t understand what type of account name the preferece is requiring. Everything I try gives me an error. I’ve tried, so far, my email address. The account name on the linux computer I’m using, but I’ve had no success. Seems like an interesting plugin, but I need more information, if possible.

  • Tarket Galal: the plugin doesn’t learn of the ongoing conversations. You can change the behaviour in the plugin source code, changing the line that says:
    my $megahal = AI::MegaHAL->new(‘Path’ => $megahal_directory, ‘Banner’ => 0,
    ‘Prompt’ => 0, ‘Wrap’ => 0, ‘AutoSave’ => 0);

    Change ‘AutoSave’ => 1

    I haven’t tested, but then it should learn.

  • Glenda: I think that in Protocol you should type “prpl-yahoo” (without double quotes of course) and then just your yahoo id (so, your Yahoo name, not the Yahoo address) in account name. It’s NOT related to the account name on your Linux computer, but the Yahoo account name.
    Let me know how it works

  • Glenda

    Carles, thank you for the reply. I made the changes that you explained. Megahal is answering, but only in the terminal I started Pidgin in. The words from megaHal in the terminal window are not being displayed, or sent, in pidgin. I’ll try to work it out, but if you have time for a suggestion, I appreciate it. I don’t know perl, but sometimes I can reason scripts out by reading them and googling about the commands. I’ll check back to see what you may write.

    Thank you 🙂

  • Jaime Herazo

    I suggest starting to look into migrating to one of the more modern MegaHAL descendants:

    Hailo (in Perl): http://hailo.org/ and https://github.com/hinrik/hailo
    Cobe (in Python): https://github.com/pteichman/cobe

    Either of them will bring substantial improvements, actively maintained code and more and more weirdness 🙂

  • […] Miscellaneous auto add and accept guests for meebo me widget for livechat from websites in pidgin MegaHAL Miscellaneous connects Pidgin to MegaHAL. The contact will be answered by MegaHAL instead of by […]

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>