Code Monkey home page Code Monkey logo

cabalbot's Issues

rc_feed admin

Add process for adding to, removing from, and querying a new table called rc_feed_admin which contains columns "nick" "project" "channel". These are IRC accounts of individuals authorized to use commands like !hush !speak within an rc_feed channel

Write rc_feed function

Bot873 will be assuming duties of CabalBot. This includes acting as a recent changes bot for newiki and should have the capability of expanding into other small projects.

The function should expect two inputs "bot" which contains the bot commands and "change" which is the json formatted event from EventStreams. The function should rely on a sqlite3 database table called "rc_feed" with columns "project" and "channel" for where to report the change.

Very basic structure follows:

`db = sqlite3.connect(DB)
c = db.cursor()
channel = c.execute('''SELECT channel FROM rc_feed WHERE project=?;''', (change['wiki'],)).fetchall()
db,close()

bot.say(theChange, channel)
`

"people" table expansion script

Write a Python on shell script to process indicated project tables an add data to two tables called "people".

Example, the script should accept a CLI input like "metawiki enwiki ptwiki" and process those tables. The process action should be selecting nicks in the table, collapsing duplicates, and adding the selected nicks and the project to a row in the "people" table.

Write af_feed function

Write a function that accepts two inputs, "bot" which contains the bot commands and "change" which accepts the EventStream data. The function should select the channel for the abuse filter feed from the below sqlite database table and send the report to the channel via the bot class. Bonus points for pretty format and colors.

At present, I'm not sure of the format EventStreams sends AbuseLog hits. So I don't know how the report would be handled.

The function should rely on a sqlite database table called "af_feed" which has two columns: "project" and "channel"

Antivandalism Mode

Using the existing ORES feed, set a threshold for probability via IRC command. If threshold is crossed, revert the edit, add message to editor's talk page. Likely won't be as fancy as ChenzwBot but good as an emergency stand in.

af_feed admin

Add process for adding to, removing from, and querying a new table called af_feed_admin which contains columns "nick" "project" "channel". These are IRC accounts of individuals authorized to use commands like !hush !speak within an af_feed channel

Make the bot modular

Break the various functions out of the massive current script to make local callable plugins to use as needed. The Watcher file has grown into a very cumbersome and long script. It needs to be broken down into more digestible components that can be included or excluded as the situation requires by lay-users.

Dropped RC reports

Beginning recently, and possibly related to workload, bots have been dropping RC reports. Investigate converting the engine to async

Sopel module is deprecated

Sopel module is deprecated. Replace @module with @plugin and from sopel import module with from sopel import plugin.

Build relational table functions

New tables 'people' and 'channels' are created for relational support. Add populating sql commands to add to and delete from these tables on !watch add and !watch del respectively. !globalwatch should also write to these tables, but in people table, project should be global and no difference to the channels table.

Table: people
Columns

  • nick
  • project

Table channels
Columns

  • channel
  • nick

Write various basic bot responses

With CabalBot being retired, there are several basic functions that will need to be reproduced. This might be better handled as a standalone plugin.

Handle link requests like !ca !contribs !guc etc

GStools is broken

!addwiki and !onirc are broken.

!addwiki seems to only add trigger.group(5) instead of the whole string

!onirc needs a negative response if there are no pages in the CSD cat.

Watchers stop

EventStream and ORES stream both abruptly stop without warning.

Convert to f strings

Review entire plugin for places to replace old methods for joining strings with f strings.

"channels" table expansion script

Write a Python on shell script to process indicated project tables an add data to two tables called "channels".

Example, the script should accept a CLI input like "metawiki enwiki ptwiki" and process those tables. The process action should be selecting chan and nicks in the table, collapsing duplicates, and adding the selected chan and nicks to a row in the "channels" table.

contribs and xtools

The !contribs and !xtools commands will need to be rebuilt. The trigger.group() has no len attribute and can't be counted.

ignorenick doesn't add to database

MrFishBot and CVNBots added via IRC command, but failed to make it to the ignore_nicks table. Added manually but need to investigate for broken function/sql statement.

Update README

There are lots of changes happening. The README needs to be caught up.

Add single page stalk for feedadmin per channel

Add a function that adds a single page watch function for feedadmins to stalk a single page in a channel. Possible route to this would be to use the existing function, but perform a feedadmin check, then use the channel as the account name.

Reduce number of sqlite calls

Probably because it's processing so frequently, but rcfeed slowly builds a significant lag. This is likely due to lack of optimization within the rcfeed reporting process. ORESfeed currently does not experience the same trouble.

Autolink intelligence

Autolink (currently living in wikicmds) which takes [[links]] in chat and delivers a formatted hyperlink to chat needs to be able to know what project to link to based on trigger.sender. A new database table will be added called channel_lang which will have columns channel, project, and url. The table will have the url column in order to allow shortened urls like enwp.org. Any function checking the table should be able to handle url being null.

In addition, commands for bot admins to add, rewrite, and remove information from this table will need to be written. Likely a new sub-module will be needed. Perhaps called autolink or something similar.

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.