GithubHelp home page GithubHelp logo

kaet's People

Contributors

adamlamore avatar fugitech avatar r4v5 avatar rakslice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kaet's Issues

Notice IRC disconnections and handle them

Continuing a conversation from the chat: the TCP connection between kaet and twitch irc will sometimes die and kaet won't notice. We should detect this in a Go-ish way and either die (so that monit will pick it back up and start it) or reconnect it ourselves (if this can be done easily enough).

Counter names can be multiple words

There should be a guard against counter names being more than one word in the "inc"/"dec"/"reset" commands. If a multi-word counter is created it cannot be parsed as a command. The counter should probably only take the first word of the data and ignore the rest.

Example seen on stream: "!inc ACOG 1" created a counter "ACOG 1". You then can't access this counter because "!ACOG 1" is parsed as the "ACOG" command with an argument of "1")

!addcommand/!removecommand shouldn't work on built-ins

Let's say some hapless fool calls !addcommand Help this streamer do great things! because they forgot the command they wanted to define. This text then shadows !help for the lifetime of the bot's process, and also affects aliased commands like !halp. !removecommand help manages to remove the errant command but doesn't actually restore !help's default behavior, so it actually removes the command (and any aliases like !halp). (This also extends to !removecommand removecommand, so, uh, be careful.)

We probably should detect when !addcommand or !removecommand would collide with a built-in and produce a helpful "I'm afraid I can't let you do that" type message.

Counters with value of 0 are non-intuitive

If you use "reset" the output says "0" but the counter is actually gone (and no longer available in commands). If you want a live counter with a value of 0 you have to create the counter with "inc"/"dec" and then use those commands to get the value to 0 (e.g. create a new counter with "inc" and "dec" back to 0). Perhaps "reset" and "removecounter" should be separate commands?

Streamer should count as a mod

It doesn't seem like the streamer counts as a 'mod' for purpose of 'mod-only commands', meaning streamer can't easily create/delete their own commands.

Example debug output, showing the user-type being empty:

2017/07/24 16:52:36 [IN] @badges=moderator/1,subscriber/0,turbo/1;color=#5F5775;display-name=r4v5;emotes=433:65-66;id=156a2dbc-ff2f-404e-99fb-4abc589a2204;mod=1;room-id=113481237;subscriber=1;tmi-sent-ts=1500933155182;turbo=1;user-id=39399416;user-type=mod :r4v5![email protected] PRIVMSG #bengineering :Yep, still need to fix that so that the streamer counts as a mod
2017/07/24 16:52:51 [IN] @badges=broadcaster/1,subscriber/0;color=#DAA520;display-name=Bengineering;emotes=;id=c25b5f41-5884-48ff-b638-b9a58baba0ee;mod=0;room-id=113481237;sent-ts=1500933126760;subscriber=1;tmi-sent-ts=1500933170337;turbo=0;user-id=113481237;user-type= :bengineering![email protected] PRIVMSG #bengineering :ohhhh alright cool I thought I was crazy

Feature request: simple counters

Could be something like:

<@admin> !addcounter shark
<@kaet> Added counter shark

<someone> !shark
<@kaet> added 1 shark

<someone> !sharkcount
<@kaet> 420 total sharks

Counts persist forever.

Counters can override commands

Have not tested in practice, but I don't see any guards in the code against counter names overriding existing commands (built-in or mod-added).

Example: "!inc help" would override the "help" command with a counter. Also, "!reset help" would delete the "help" command without the checks present in "removecommand".

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.