Comments (20)
God gave us regex for this.
from botbot.
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.
We already use something vaguely similar for the np
command
from botbot.
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.
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.
@neanias I don't see the issue there ?
from botbot.
Do we combine their old karma and new karma or just plain overwrite it?
from botbot.
@neanias yeah that's a fair point
from botbot.
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.
I wouldn't reset user1; just plain wipe it. The internals handles non-existing keys
from botbot.
@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.
I wouldn't assume that. I'd make sure it works for all karma terms.
from botbot.
but that's haaaaard
from botbot.
i.e. I can't think how the user would separate the terms
from botbot.
$transfer "hello there" "general kenobi"
from botbot.
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.
from botbot.
when parsing args how does botbot interpret " and ', I take it they become \" and \' ?
from botbot.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from botbot.