Karma doesn't check if you upvoted a valid username (or even a valid link), it allows pretty much anything that you can write in square brackets. So, these would also be valid:

[mod://Acme::Bleach]++ # Perfect source code obfuscation [https://bing.com]-- [id://11155739]-- # Load of rubish, doesn't work the way i want it to

This is the relevant code in chatterbot:

... my $vote = 0; my ($id, $type); if($decoded =~ /\[([^\]]+?)\]([+-]{2})/) { ($id, $type) = ($1, $2); if($type eq '++') { $vote++; } elsif($type eq '--') { $vote--; } } if(!$vote) { # Not a vote contained in the message, we are done here return 1; } my $reason = ''; if($decoded =~ /^.+?\#(.*)$/) { $reason = $1; $reason =~ s/^\ +//g; $reason =~ s/\ +$//g; } ...

In the old Tanktalus version, there where 4 sections:

  1. Most referenced Monk
  2. Most name-dropping Monk
  3. Most referenced external Hosts
  4. Karma

This would mean my chatterbot would have to check each link in square brackets against PM to see if it was a homenode. And it would potentially list all URLs posted in the last 7 days (giving web scrapers/searchbots a greater chance to see it), no matter if you want your URL to show up there or not. By folding those functions into the Karma system, i reduced the number of server lookups and let the user choose it the URL would show up in the CB Stats.

Changing it back to the Tanktalus version wouldn't be too hard(¹), most of the support code is in place(²). It really depends on how you people want to use it. I'm open for suggestions.

Edit: Chatterbot does check case insensitiv since the update if the sender name and receiver link of Karma points match. Old points don't change, this is only when parsing new chat messages.


(¹) see also: "Famous last words"
(²) Nothing that a can of Red Bull, a bit of shouting at my monitor and some generous amount of facepalming couldn't fix.


In reply to Re^2: Chatterbot update by cavac
in thread Chatterbot update by cavac

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.