Skip Menu |

This queue is for tickets about the POE-Component-IRC-Plugin-Hailo CPAN distribution.

Report information
The Basics
Id: 97852
Status: open
Priority: 0/
Queue: POE-Component-IRC-Plugin-Hailo

People
Owner: Nobody in particular
Requestors: znmeb [...] borasky-research.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.18
Fixed in: (no value)



Subject: Replyrate parameter seems to be ignored
I'm building an IRC bot. I set the Replyrate parameter to 10, which is supposed to mean 10 percent of the time the bot replies. But it looks like it always replies, subject only to the limits given by Abuse_interval.
On Thu Aug 07 19:25:05 2014, znmeb@borasky-research.net wrote: Show quoted text
> I'm building an IRC bot. I set the Replyrate parameter to 10, which is > supposed to mean 10 percent of the time the bot replies. But it looks > like it always replies, subject only to the limits given by > Abuse_interval.
Can you show me the relevant code? Maybe there's a bug there that you're missing.
Subject: Re: [rt.cpan.org #97852] Replyrate parameter seems to be ignored
Date: Fri, 8 Aug 2014 09:33:18 -0700
To: bug-POE-Component-IRC-Plugin-Hailo [...] rt.cpan.org
From: "M. Edward (Ed) Borasky" <znmeb [...] borasky-research.net>
Here it is. I'm going to test with the abuse interval set to zero later today. On Fri, Aug 8, 2014 at 6:58 AM, Hinrik Orn Sigurdsson via RT <bug-POE-Component-IRC-Plugin-Hailo@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=97852 > > > On Thu Aug 07 19:25:05 2014, znmeb@borasky-research.net wrote:
>> I'm building an IRC bot. I set the Replyrate parameter to 10, which is >> supposed to mean 10 percent of the time the bot replies. But it looks >> like it always replies, subject only to the limits given by >> Abuse_interval.
> > > Can you show me the relevant code? Maybe there's a bug there that you're missing.
-- Twitter: http://twitter.com/znmeb Computational Journalism Server http://j.mp/compjournoserver Data is the new coal - abundant, dirty and difficult to mine.

Message body is not shown because sender requested not to inline it.

I don't see anything wrong with your code. However, getting back to your original post, when you said "But it looks like it always replies", did you mean it always replies when its name is mentioned? Because in your code you have set "Talkative => 1", which means it will always replies when someone mentions the bot's name. Does it still reply every time (instead of the expected 10%) when its name is not mentioned?
Subject: Re: [rt.cpan.org #97852] Replyrate parameter seems to be ignored
Date: Sun, 10 Aug 2014 15:29:33 -0700
To: bug-POE-Component-IRC-Plugin-Hailo [...] rt.cpan.org
From: "M. Edward (Ed) Borasky" <znmeb [...] borasky-research.net>
Current configuration: $irc->plugin_add( 'Hailo', POE::Component::IRC::Plugin::Hailo->new( Talkative => 0, Method => 'privmsg', Abuse_interval => 0, Replyrate => 10, Own_channel => $channel, Ignore_regexes => [ qr{\w+://\w} ], # ignore lines containing URLs Hailo_args => { brain_resource => 'brain.sqlite', }, ) ); It posts a reply to every message I type with or without its name and to every action. On Sun, Aug 10, 2014 at 3:13 PM, Hinrik Orn Sigurdsson via RT <bug-POE-Component-IRC-Plugin-Hailo@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=97852 > > > I don't see anything wrong with your code. > > However, getting back to your original post, when you said "But it looks like it always replies", did you mean it always replies when its name is mentioned? Because in your code you have set "Talkative => 1", which means it will always replies when someone mentions the bot's name. > > Does it still reply every time (instead of the expected 10%) when its name is not mentioned?
-- Twitter: http://twitter.com/znmeb Computational Journalism Server http://j.mp/compjournoserver Data is the new coal - abundant, dirty and difficult to mine.