Giter VIP home page Giter VIP logo

Comments (20)

neanias avatar neanias commented on July 17, 2024 2

God gave us regex for this.

from botbot.

cazagen avatar cazagen commented on July 17, 2024

I like the idea of being able transfer karma. However I also quite like the idea of users having aliases that are linked. So in duncan's case dunx++ would also increment yulax behind the scenes

from botbot.

neanias avatar neanias commented on July 17, 2024

We already use something vaguely similar for the np command

from botbot.

himmelmaus avatar himmelmaus commented on July 17, 2024

I thought about doing that, but that also has the problem of if somebody at a later point joins with the same username.

I'll stick with my current method of approach and send a pr sometime soon

from botbot.

neanias avatar neanias commented on July 17, 2024

I think Findlay's right, I think it better to transfer them over to the new nick in redis. The thing to be wary of is if the user transfers nicks but then is awarded karma before transferring their old nick's karma.

from botbot.

himmelmaus avatar himmelmaus commented on July 17, 2024

@neanias I don't see the issue there ?

from botbot.

neanias avatar neanias commented on July 17, 2024

Do we combine their old karma and new karma or just plain overwrite it?

from botbot.

cazagen avatar cazagen commented on July 17, 2024

@neanias yeah that's a fair point

from botbot.

himmelmaus avatar himmelmaus commented on July 17, 2024

oh, I was planning of having user2's karma = user1's karma + user2's karma and then just resetting user1's karma to 0 - and doing the same thing with the butts

so basically combining the 2 karmas then resetting the other's to 0

from botbot.

neanias avatar neanias commented on July 17, 2024

I wouldn't reset user1; just plain wipe it. The internals handles non-existing keys

from botbot.

himmelmaus avatar himmelmaus commented on July 17, 2024

@neanias good point

I've also realised there's a problem with karma terms where there's a space within the name - shall I assume this is only going to be used for transferring karma between users and hence none of the names should have spaces in them?

from botbot.

neanias avatar neanias commented on July 17, 2024

I wouldn't assume that. I'd make sure it works for all karma terms.

from botbot.

himmelmaus avatar himmelmaus commented on July 17, 2024

but that's haaaaard

from botbot.

himmelmaus avatar himmelmaus commented on July 17, 2024

i.e. I can't think how the user would separate the terms

from botbot.

neanias avatar neanias commented on July 17, 2024

$transfer "hello there" "general kenobi"

from botbot.

neanias avatar neanias commented on July 17, 2024

Make sure you differentiate the two usages in the docstring though. $transfer <old> <new> or $transfer "<old with spaces>" "<new (with/out spaces)>". That's a fun one, actually. Supporting moving from non-spaced to spaced names and vice-versa.

from botbot.

hreeder avatar hreeder commented on July 17, 2024

from botbot.

himmelmaus avatar himmelmaus commented on July 17, 2024

when parsing args how does botbot interpret " and ', I take it they become \" and \' ?

from botbot.

himmelmaus avatar himmelmaus commented on July 17, 2024

ok I've sent a pr with my first rough attempt at this here , will attempt adding the tokeniser once I've had my tea

from botbot.

himmelmaus avatar himmelmaus commented on July 17, 2024

Ok so I've got tokenisation working using regex, however since I'm also transferring butts should I make the butt part not transfer anything if there's a space in the name?

from botbot.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.