Just some quick notes:

I have updated chatterbot to disable self-referencing Karma (chatterbot will quip that he dropped your vote into the recycling bin or something similar). It's not 100% foolproof, but it's better than before.

I have also fixed a timezone bug in the CBStats "special nodes" section that watches for Paco to return. This might or might not break when switching between daylight savings and standard time.

If you have noticed any other bugs, just send me a private message.

Replies are listed 'Best First'.
Re: Chatterbot update
by LanX (Saint) on Jun 19, 2024 at 09:32 UTC
    > If you have noticed any other bugs,

    Found another one: usernames here are case insensitive, but cb stats is distinguishing between LanX and Lanx

    > just send me a private message.

    oops, too late... ;)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery

      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.

        All of the link checking should be case insensitive. For cb stats purposes, there's never a reason to distinguish one from another based on case alone.

        And hitting the server just to check the validity (or proper casing) of a link is a bad idea — unless you cache aggressively.

        > I'm open for suggestions.

        If you don't want to check individual PM nodes - i.e. roughly something like \[(\w+)\] plus whitespace - maybe at least normalize them to a standard when counting

        • LanX -> Lanx
        • choroba -> Choroba
        As a second step the printed version could be the first or last or the most counted representation of the name.

        Choroba could even know better, because he's also running an external agent.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        see Wikisyntax for the Monastery