Giter Club home page Giter Club logo

arx-7's Introduction

Heya!

๐Ÿ‘‹ My name is Ian Mitchell (he/him), and I'm a software engineer from Seattle, Washington, specializing in front-end development (mostly using React). I've been doing web development for a long time now - I'm one of those ones that finds CSS fun, and tries to use it as much as possible.

Recently...

Interaction Kit is a Discord HTTP bot framework I'm using to learn more about the Discord API and TypeScript.

sentrydiscord.dev is a popular tool I developed for forwarding sentry alerts to a Discord server.

My personal website is a little more developer-focused, relying on MDX and custom CSS to give me maximum flexibility with my content.

Ramble is a Bluesky web client using Next.js and React Server Components (currently closed source)

Starboard is a Discord bot I recently built primarily for my community server.

I also wrote and maintain Deschtimes, a project-management solution for foreign media translation groups.

Find me out and about

๐Ÿ‘พ @desch (I have a community server you can join too!)

๐ŸŒ ianmitchell.dev

๐Ÿฆ @IanMitchel1

โœ‰๏ธ [email protected]

arx-7's People

Contributors

fyurie avatar greenkeeperio-bot avatar ianmitchell avatar kunaldes avatar kyhz avatar lae avatar llyyr avatar tabaha avatar zaneneuschuler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arx-7's Issues

Blacklist Exploit

You can make ARX-7 return a blacklisted word. If you search for .yt Disney, it might output "Disney XD" - if XD is a blacklisted word, it should be filtered to something else ([redacted]?)

Add Defining Ports to the Config

Similar to the bug report requesting SSL support, being able to define ports should be permitted as well. Just like the SSL option, either have a "port": "6667" option or adjust the server line to detect colons and know that "irc.rizon.net:6667" means to connect on port 6667.

Add SSL Support to the Config

Ideally, SSL Support should be added to the bot. Most decent IRC servers support SSL connections, typically on port 6697 or 9999, however some use different ports. Ideally you could just add something to config.json for a "ssl": "true/false". Either that or make it detect on the server line in config.json whether there is a colon and a port, for example irc.rizon.net:6667 (non-ssl) or irc.rizon.net:+6697 (ssl). It may be better to just have them both separate.

Testing Suite

We should have some unit tests to prevent regressions

Add Staff Commands

We'll need to add commands to allow Staff to modify a Showtimes database. This will be similar to Servrhe's functionality

Username Permissions

We should try to move away from passwords and support whitelisted identified names for admin commands. node-irc doesn't support this; we'll have to figure out a way to do this ourselves.

Automatic Updates

It'd be fun to have an option where the bot could auto-update itself. Not sure how entirely feasible it is, but it's worth looking into!

Permit Invalid SSL Certificates

Due to self-signing issues with IRC servers and ZNC bouncers, it is often necessary to permit invalid SSL certificates or Unsigned certificates. Hexchat, for example, has an option in the server list to accept invalid SSL certificates. For security reasons it should be a setting, but the need for the feature is there.

Exception Error Thrown (Don't Know Context)

So this happened. Dunno if you're able to tell what occurred but have an exception error:

belfiore@souma:~/ARX-7$ node app.js
/home/belfiore/ARX-7/node_modules/irc/lib/irc.js:748
throw err;
^

TypeError: Cannot read property 'includes' of undefined
at ARX7.message (/home/belfiore/ARX-7/src/arx7.js:84:29)
at Client. (/home/belfiore/ARX-7/src/bot.js:28:8)
at emitMany (events.js:108:13)
at Client.emit (events.js:182:7)
at Client. (/home/belfiore/ARX-7/node_modules/irc/lib/irc.js:517:22)
at emitOne (events.js:77:13)
at Client.emit (events.js:169:7)
at iterator (/home/belfiore/ARX-7/node_modules/irc/lib/irc.js:745:26)
at Array.forEach (native)
at Socket. (/home/belfiore/ARX-7/node_modules/irc/lib/irc.js:740:15)

Look into Config Refactor

With the channel being a key, it makes it hard to account for non-lowercase values. It might be worth looking into different ways of representing channels/plugins to offload some of the checks performed on each message. If not, we should still refactor some of the code out of the message loop and precompute it if possible

Have the bot not immediately autorejoin

Due to >Rizon, have the bot not autorejoin a channel, or just stay gone when it has been kicked. Otherwise, the bot will be killed and can be glined and can cause everything connected from that IP to be knocked off of the network.

Malformed YouTube IDs cause crash

When given a malformed id such as youtube.com/watch?v=8WZr6fโ€ฆ, the following line causes a crash (snippet of undefined):

title: data['items'][0]['snippet']['title'],

Identifying to Nickserv should occur before joining channels

It seems that the bot isn't identifying to nickserv and then joining the channels defined in the config. It's either joining too quickly and exposing the host or it's joining the channels first and then identify to nickserv. Currently, this is what occurs:

  • Belfiore (~[email protected]) has joined
  • Athena gives channel half-operator status to Belfiore

The host reflected should be "bots.on.bots".

Add a check on the bot start to validate that channels are properly formatted

When the bot starts, it's possible for the name field in config.json to not be a properly formatted channel. You can essentially have just "nisekoi" instead of "#nisekoi". Of course, the bot should also allow to be launched with double hashes for those odd channels on freenode like ##freebsd or something.

YouTube Search Failures

When searching for rather specific entries, such as ๆ–ฐๅนดๆ˜Žใ‘ใŸใ‹ใ‚‰osuใจใใกใŒใ„ the search errors out with "null"

Build ARX-7 into Single ES5 File

Currently we're using a babel require hook, which has negative performance impacts. This isn't super important, but it'd be nice to have a build/run NPM script that would compile ARX-7 into a single, es5 file.

Migrate away from `node-irc`

Ref: See issue martynsmith/node-irc#399

There is a lot of functionality that doesn't work for our usecase, and over time we've been reinventing the wheel for a lot of the higher APIs. It might be worth looking at alternative libraries to use. Hopefully, it'd also make it easier to test the arx7.js file

Create an IRC Admin Interface

Aoi-chan accidentally put the Imgur plugin in for Commie, so Rhe got mad at me again. He suggested adding an IRC interface / recognized commands to modify the bot while it's running. Adding / Removing plugins shouldn't be too difficult.

Add .blame Command

We'll need to tie into a Showtimes API, which will be defined elsewhere. This will be similar to Servrhe's functionality

Look into Promises for Messages

Right now, we use promises in some places (API calls), but probably should be making more liberal usage of them. It makes sense to make the plugins async in nature, and (I hope) will make it easier to test with Mocha. Changes will happen in #18

Permit Connections to ZNC Bouncers

For uptime and other reasons, it would be nice to be able to be able to connect the bot to a user on a bouncer. The general way this works is that you have a ZNC instance running on a server to keep the user online even if the user isn't actually connected in an IRC client. The general process for this is as follows:

/server whateverdomain.com:xxxx or /server whateverdomain.com:+xxxy (for SSL).
Once you've connected to the server you'll get the following:
*** You need to send your password. Configure your client to send a server password.
*** To connect now, you can use /quote PASS :, or /quote PASS /: to connect to a specific network.

At that point, you can provide what is requested. You would reply by sending the server the following:
/quote pass username:password
OR
/quote pass username/network:password

Once it has done that, it will join all the channels and be connected. I imagine this will be best as a config option of a ZNC yes/no option, a znc username option, a znc network option (i personally don't use ZNC in that fashion), and a znc password option. If there is no ZNC Network, then just put the znc username and password together to get username:password.

Refine Blacklist Logic

Blacklisted word checks are pretty rudimentary right now; the system should redesigned to be more flexible.

Add Travis CI

This will mostly be so I can learn how to set this up - not super needed with a project like this

Swap out Twitter Library

twitter-node-client has a few console.log statements in it that screw up logging and testing - we should look into replacing it.

Check for a leading # in the channel name

You can apparently run the bot without having the leading # in the channel name. It won't join the channel, of course, for the lack of the leading #. There either needs to be an alert for the lack of the leading # or the bot just needs to not run.

Have the bot set usermodes on itself on connecting

Essentially have the ability to set a usermode on the bot on connection to a server, after it identifies to nickserv and joins channels. For example, being able to set +G or +g on it, if you so desired.

[Twitter] Entities display as the spelled out item instead of the character itself

It seems that characters like <, >, &, and so on will display as their respective entity names (or whatever they're called), >, <, &. Ideally it would just display the characters instead of taking up the space.

For example, the tweet https://twitter.com/StockTwits/status/612616851269488640 displays as the following:

[Twitter]: 15 patterns in technical analysis and how they look. Print this out and hang it -> http://t.co/scZXLVMbdL $SPY http://t.co/VE30iFWL6n | By StockTwits (@stocktwits)
theres the one with the candles

Blacklist Evasion

[10:43:40] <&RHExcelion> .c xD
[10:43:40] <%Belfiore> RHExcelion: xD
[10:43:40] * Athena sets mode: +b *!*@bots.on.bots
[10:43:40] * Belfiore was kicked by Athena (Watch your language!)

Not sure if this is something I introduced or an oversight @kunaldes?

Feature to Disable Triggers If Another Nick is Present Per Channel

Request to add a feature that will keep the bot from responding to certain commands per channel if another nick is present. For example, if the bot were in #Horriblesubs, both Belfiore and another bot would respond to .choose. As well, if a YouTube link were pasted, Belfiore and Internets would respond as well. If it were possible to check for Internets or Yotsugi for the YouTube and Choose scripts respectively, it would stop double pasting as well as act as a failover if one of the other bots were to disappear.

Feature to limit the number of lines spammed per second

It would be nice to have a feature added so the user can specify how many lines can be flooded to the server per second before it gets excess flooded out. Apparently Rizon has a limit at 1 line/500ms global limit, but I'm not sure if thats a network limit or a server limit, so being able to set the ratelimiting globally would be nice so it can impact all bot responses.

Commands do not respond in three or more channels based on their place in the config.

On the little bit of testing I did, it appears that the bot does not respond to commands based on the position of the channel in the config file. Everything below the second channel name entry won't respond to any of the listed commands. The bot will join the channels just fine, however. Example below:

  "channels": [
    {
      "name": "#aoi-chan",
      "key": null,
      "plugins": [
        "choose",
        "reply",
        "order",
        "twitter",
        "youtube",
        "time"
      ]
    },
    {
      "name": "#commie-subs",
      "key": null,
      "plugins": [
        "choose",
        "reply",
        "imgur",
        "order",
        "twitter",
        "youtube"
      ]
    },
    {
      "name": "#fffpeeps",
      "key": null,
      "plugins": [
        "choose",
        "reply",
        "imgur",
        "order",
        "twitter",
        "youtube"
      ]
    },
    {
      "name": "#horriblesubs",
      "key": null,
      "plugins": [
        "choose",
        "reply",
        "imgur",
        "order",
        "twitter",
        "youtube"
      ]
    },
    {
      "name": "#gundam",
      "key": null,
      "plugins": [
        "choose",
        "reply",
        "imgur",
        "order",
        "twitter",
        "youtube"
      ]
    }
  ],

User Specific Ignore Feature

It would be nice to be able to ignore specific people like chronic spammers, people who flood the channel, and nbk. :)

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.