Giter VIP home page Giter VIP logo

brickbot's People

Contributors

benmcmahon100 avatar chintankamani avatar ciankehoe avatar davidweir57 avatar saraheisa avatar theycallmemac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

brickbot's Issues

luas command

luas - a command that gives luas information by stop number

I'm not really sure if this is a Realtime API either but it exists. I'll snoop around for projects that might do this too.

help command

No args:
should list all available commands with a blurb as to what they do
One arg:
should list help for the command specified in the argument

info command

info - a command that simulates that gives you brickbot information such as the author, contributors, a link to the code, and current uptime.

I haven't looked for any code yet, but this should be as simple as a few lines of bash/python/whatever :P

User role management job

A job that runs asyncly in the event loop to move users that are verified into the brickie role.

crypto command

crypto - a command showing the latest info on a specified cryptocurrency

https://github.com/nemo-rb/mooney is a very popular bot in Redbrick IRC - we can use something with this. Maybe not with that code exactly, but something similar exists

Register command

Should begin a DM channel with the caller and start the signup/verify flow

Role based permissions system.

New commands - by default - should only be runnable by "special" users - i.e., users we can trust.

Otherwise, a commands audience can be specified as an array of roles we want to use it.

By default, this shall be ["committee", "rbadmin", "dev"] for the sake of simplicity, with left to right precedence (a dev can't derole and admin, and admin can't derole a committee, etc)

wiki command

wiki - returns a link to a random page on wiki.redbrick.dcu.ie

There's a Random Page functionality on the wiki already so could be a fun one for people to just ping all the time on Discord. May also encourage use of the wiki.

isitup command

Brickbot (once the framework is together) needs an isitup command to display website information.

If every plugin was spun up using OpenFaas it would mean that we could write a plugin in any language.

nslookup functionality

Simple, I have it as an OpenFaas Function already, I just need to build in the capabilities for calling it.

bug: Replace auth system with tokens

The current system just checks that a user exists. There is no verification of identity and no checks for collisions in used usernames. See #51

The verification flow should do the following:

  • Send a mail or use a webgate to get a JWT
  • JWT should be validated in a flow separate to the command itself and roles should be assigned based off of the roles of the member in LDAP

LDAP search filter not sanitised in !verify command

The !verify command accepts a username as the first parameter, which is used to lookup a user on an LDAP server. It's possible to do !verify * [email protected] (the username being a wildcard), and have brickbot cycle through every single user on the LDAP server to see if the email [email protected] matches their altmail. If it so happens that the email is associated with any username in the database, it'll grant you access to the Discord server. It may also be possible to craft other strings to send to the LDAP server, as presently, brickbot just injects user input into the search string.

I think the easiest way to fix this is to use an EqualityFilter as the filter key in https://github.com/redbrick/brickbot/blob/master/commands/verify.js#L19, but I don't have the time to test it.

set up package.json

The package.json file is missing a significant amount of information - all it contains are dependencies. It needs to be updated before resolving #17

Signup Command V1

Should send an email request to the admins asking that a given username <> email combo be registered.

announce command

announce - a command that sends a copy of the most recent Redbrick announce letter privately to whoever invoked it

I don't really think there's code that does this anywhere. Something fresh needs to be written.

events command

events - a command that gets a list of redbrick events for the specific period of time (day, week, month)

There's no code out there for this at the moment, but we use Google Calendar for all the events so that could be a great place to start.

testing that faas.jamesmcdermott.ie is available

It feels overly simplistic but because all of the functions are hosted in the form https://faas.jamesmcdermott.ie/function/namedFunction it makes sense to check that https://faas.jamesmcdermott.ie/ is up first. It's probably also worth testing that the SSL cert is valid.

coinflip command

coinflip - a command that simulates the toss of a coin

I haven't looked for any code yet, but this should be as simple as a few lines of bash.

spotify command

Brickbot (once the framework is together) needs a spotify command to display track information

Write Tests For each Command

This is pretty self explanatory. Tests should also be mandatory when submitting PR's with changes being made to the logic of bot.js

committee / cmt command

committee || cmt - lists all current Redbrick Committee members by rbusername, name and role.

Could implement a feature where you can request specific roles;

!cmt admin

It would then return username, name of every person in that role (maybe a photo/link to redbrick site with more info about that person if we want to look at that further down the line).

room command

room - provides timetable information for a specified room or building in DCU

Once upon a time https://github.com/theycallmemac/dcurooms was all the rave, I swear. It can work good in this context I just need to figure out how to implement it accordingly.

add certinfo

Simple, I have it as an OpenFaas Function already, I just need to build in the capabilities for calling it.

Verify command

Check off a valid username <> email combo and send a verification email

Migrate command

Move all users with role X to role Y in keeping with the permissions system

fix paths

Paths such as /home/bots/brickbot/commands in bot.js and brickbot.service.

Along with this, we should move tokens from /tmp to /etc.

pwgen command

This should send the user a generated password. Also ideally dont log it

coinflip

Replicate original coinflip functionality

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.