Proposal for unique triggers|calyx|calyx238@gmail.com|1364228508|calyx|xx|0|87.112.106.181|Because repeating the same phrase is an obvious giveaway, I tend to do this a lot:<br /><br />[CODE]<br />+ _what_do_you_like_to_do_<br />* &lt;get mentioned_hobbies&gt; eq 1 =&gt; I told you that<br />- &lt;set mentioned_hobbies=1&gt;I like music, video games, and computers.<br /><br />+ what do you like to do for fun<br />@ _what_do_you_like_to_do_<br /><br />You&gt; what do you like to do for fun<br />Bot&gt; I like music, video games, and computers.<br />You&gt; what do you like to do for fun<br />Bot&gt; I told you that<br />[/CODE]<br /><br />But doing this for every interesting reply is tedious. I think it would be useful if there was a option to automatically ensure that the same trigger is not used with the same user twice. This could be disabled by default, and would not break backwards compatibility. Then when triggering the same response twice, a &quot;ERR: Unique Violation&quot; can be produced, which can then be handled in the application code. For example:<br /><br />[CODE]<br />+ &#123;unique=1&#125;what do you like to do for fun<br />- I like music, video games, and computers.<br /><br />You&gt; what do you like to do for fun<br />Bot&gt; I like music, video games, and computers.<br />You&gt; what do you like to do for fun<br />Bot&gt; ERR: Unique Violation<br />[/CODE]<br /><br />I think this should not be too difficult to implement.<br /><br />Any thoughts?||1364228850|calyx|
Re: Proposal for unique triggers|calyx|calyx238@gmail.com|1364341868|calyx|xx|0|146.90.223.55|I needed this feature asap, so I patched it into the Perl implementation.<br /><br />It works like this:<br /><br />[code]<br />+ &#123;unique&#125;tell me something interesting<br />- I will only say this once!<br />- And I will only say this once!<br /><br />You&gt; tell me something interesting<br />Bot&gt; And I will only say this once!<br />You&gt; tell me something interesting<br />Bot&gt; ERR: No Reply Found<br />You&gt; tell me something interesting<br />Bot&gt; I will only say this once!<br />You&gt; tell me something interesting<br />Bot&gt; ERR: No Reply Found<br />You&gt; tell me something interesting<br />Bot&gt; ERR: No Reply Found<br />You&gt; tell me something interesting<br />Bot&gt; ERR: No Reply Found<br />You&gt; ^C<br />[/code]<br /><br />If anyone is interested you can send me a PM or email and I'll direct you to my patch.||||
