ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Mircryption

Irssi Bot Using Blowssi


I have an Irssi bot that needs to be able to understand encrypted channels using Mircryption.  After getting Blowssi installed and set-up on my Irssi bot, I noticed that my triggers like !ep for TvRage only worked on unencrypted messages.  After fiddling with Blowssi for a while, I finally came up with this workaround:

At the bottom of "sub decrypt {}" change:

--- Code: Perl ---Irssi::signal_stop();  return 1;to

--- Code: Perl ---if ($event_type eq 'message_public') {    Irssi::signal_continue($params[1], $result, $params[3], $params[4], $params[5]);  }  else {    Irssi::signal_stop();  }  return 1;
Is there a better option to retain the ability of my other scripts working from the decrypted text after Blowssi decrypts it?

As a clarification for my problem:

My triggers are currently set to

--- Code: Perl ---Irssi::signal_add("message public", \&handle_message_public_sub);
So, when I do "!ep <tvshow>" in unencrypted text from another account, it responds normally, however, when I run the same command in encrypted text, Blowssi decrypts it just fine, but my !ep trigger never fires.

My solution above posts double on my bot's screen (which isn't really an issue, since it's a bot and no human is going to look at it very often):

18:40:46 <MyNick:#chan> !ep <tvshow>
18:40:46 <!MyNick> !ep <tvshow>

I thought about adding a custom signal to be emitted by Blowssi for when Blowssi decrypted a message_public type.  However, I'm going to need to be decrypting up to 30 times per second and handling the public messages once I get all of my bot scripts written, so I wasn't sure on how good adding another signal emit would be.

I'm afraid i don't have irssi experience so you are way ahead of me.  But just wanted to say, Nice work  :up:


[0] Message Index

Go to full version