Giter VIP home page Giter VIP logo

pyburlybot's People

Contributors

clam- avatar dependabot[bot] avatar gkistler avatar stoopdapoop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

stoopdapoop ckx

pyburlybot's Issues

: in serverlabels

: is used to split serverlabel:#channel when using config command.
At the moment I'm raising error in this situation, but should we allow it and somehow work around?

Change config naming/loading scheme

Program should default to looking for "bbm.json" if no config file is specified on the command line, if the file doesn't exist, it should be created with defaults.

There also should be an option -c --create-config which will just create the file specified (or "bbm.json" if not specified), and exit.

[remind] [minor] [util/__init__.py ADDONS] Global reload reactor mutex

Add global 'currently reloading' mutex for when we're reloading modules for threads to acquire when calling module-provided functions from util.ADDONS. Minor, just to prevent weirdness, I doubt anything bad will happen from key lookup in the event that a module thread does a getattr on ADDONS while it's being modified.

MODULE COUNTDOWN

The following need doing:

  • spelling module
  • acronym module (syn too, I guess)
  • urlinfo module (head, title, etc) done.
  • wiki

There's many others to do but these are the ones I want and then can start using in production.

[dispatcher] MSGHOOKS is kinda bad

I currently rewrote how sendmsg and MSGHOOKS works because I wanted to use sendmsg events in steamchat module, which made me realise that the current implementation was kind of bad. (The rewrite isn't commited/pushed yet.)

Deciding how Mapping.override and MSGHOOKS interact needs to be done before it can be implemented properly.
So the only sane use of sendmsg at the moment is for capturing IRC bot outbound messages.

[addons] Needs work

Addons is not server aware at the moment. Dispatcher will _add for a server that has it enabled/allowed, so to make this work properly Addons just needs a {network: {addonname : Addon]} mapping, probably.

The call to getaddon (or whatever) will then need to be given a network name, but you could throw it in to container as bot.getAddon() which will internally call Addon.get(bot.networkname, ) etc...

Other than that, I think it might need a rethinking. Considering to things like how to die when an addon isn't available, and alternative actions/providers or something.

More strict config file parsing

Also do we want to do things like where expecting list, allow string?
example:
altnicks = ["alt1", "alt2"]
and also allow:
altnicks = "alt1"

There are a couple of cases in the code where I have already allowed this kind of thing.

[remind] Add allowance for only one "datespec" word for "tomorrow"

Normally datespec combined 2 "words" to form things like "on 3/3" or "in 4days", but we should probably check the first word for "tomorrow" then shuffle args around if that's the case.

More importantly are there any other one day relative times like that.
Context is "remind you tomorrow get ham"
Remember "remind you next week get ham" is 2 words.

[apis] How do we return results?

For example in the googleapis.py module, I've been returning results as tuples just containing the fields I've been needing to use in the actual modules that use those apis.
Should we actually be returning the JSON dictionaries in full? (probably. I've done it with youtube helper method.)

What to do on misbehaving servers?

SynIRC seems to have a trailing space after the last user in a RPL_NAMREPLY.
This will/does cause bad things to happen when parsing the line.

What to do? Should we strip first? How far will we go to cleanup malformed messages?

Consistent variable/label names

For example:
The variable for a "server name" is called "serverlabel" in settings, "network" in container, and probably 5 different things elsewhere.

I think this happens with a few other things, also.

pls help

[everything] Link formatting

So, the way we present URLs is usually (http://something.com)
We are lucky that mIRC is smart about what it considers part of a URL, but other things aren't as smart. Steam for example treats characters as part of the URL.

It appears Steam will follow "email" convention of enclosing URLs in chevrons <http://something.com>. I think this was some old defined standard or "suggestion" somewhere but I don't remember where I read it.

What do?

[helpers] distance_of_time_in_words Months? Weeks?

Do we want to add "months" and "weeks" to util.helpers.distance_of_time_in_words ?
At the moment if someone does something like .remind me in 3months do stuff it'll say:
I will remind you about that in 88 days, 14 hours and 12 minutes.
Do we want to add more coarse units?

Incorrect fractional time calculation

Steps to Reproduce:

  • Join IRC channel with an instance of pyBurlyBot running
  • Issue the following message to the channel:
.remind me in 1.5days remindmessage

Expected Response:

<pyBurlyBot> <user>: I will remind you about that in 1 day and 12 hours.

Actual Response:

<pyBurlyBot> <user>: I will remind you about that in 1 day and 6 hours.

Please fix

This is a critical, blocking bug

[updaterelaunch] Issue with multiple bot processes

From updaterelaunch.py:

#TODO: This won't really play nice when running multiple bot processes at a time.
#   After the first bot process updates, the rest will think they are up-to-date.
#   This could be solved by storing modtimes of modules and core files at launch time and comparing them.

setOption is potentially slow

Because of some type checking magics for module options, setOption could be slow.
This might be a problem if a module needs to setOption like every event.

I don't really want to add even more complexity to those already giant functions, but maybe we can bypass it with a typesafety=False or something.

[core] reload/help probably should be in separate modules.

Someone might want "help" available, but might not want "reload" available.
Also whatever is going to contain "reload" should probably be fleshed out with other commands like "join", "part", "quit" and maybe some things like "privmsg" and such...

Spelling module

Note that we can use the Google API to do spell checking:
google.py#L48

Should we? Google is pretty lenient about spelling errors.

Notice throttle

Throttle on msg's so they turn into notices if it's sending too many to a certain channel at a time would be funky.

What happens when exception in settings loading

One wonders, but one must know.

I have a feeling server's added up to that point will be "updated" or new, and servers not added yet will not exist or be stale.
Need to know and also decide if that's desired behaviour.

admin checking on dispatch

Do we want to have an attribute in the mapper called "adminonly=False/True" or whatever and check for admin ability before dispatch?

It would save the boilercode in modules "if bot.isAdmin()", but that's about it.
The other useful thing it would do is that on !help, we can limit display of adminonly commands (at the moment I'm just filtering the list to remove eval, just in case.)

It may also be useful for some kind of admin conditional regex or some other weird thing someone may want to do.

ENCODING

How to handle encoding properly... I'm assuming raw sendlines aren't encoded, and just the message portions are. Is there a server that handles weird encoded nicknames? how are they handled in prefix?

At the moment I'm just encoding on the higher level functions like msg, and when generating nickname (that isn't to assume nicknames can be unicode, it's just because they are decoded to unicode from the config.)

Are there weirdly encoded channels? I wonder. This needs looking in to sometime...

Implement smarter "reconnected resend msgs"

We can't just jack "joined channel" event, because the bot may not be joining any channels.
The other option is to use callLater from the "signed on" event, but I wonder how long is appropriate to wait...

Smarter truncation of gis results.

I think we need to make more helper methods :((((
Example:

(06:08:58) <@Clam> .gis computer
(06:08:59) <bbm> Personal computer - Wikipedia, the free encyclopedia (http://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Computer-aj_aj_ashton_01.svg/2000px-Computer-aj_aj_ashton_01.svg.png), HOW TO KEEP YOUR COMPUTER BLAZING FAST ? | KNOWEB BLOG (http://www.ittrainingnepal.com/img/image/_42_article_slc.jpg), Buffalo Computer Consulting (http://www.buffalocomputerconsulting.com/images/computer.jpg), What is a Desktop Computer? (with pictures) (http://images.wisegeek.com/blac

[remind] [minor] Add backreference functionality to modules/calc.py

Allow for the following:

<User> .c 5 + 5
<pyBurlyBot> 5 + 5 = 10
<User> .c * 500
<pyBurlyBot> 10 * 500 = 5,000

Some quick thoughts:

  • Before this was per-channel, but it might be a better idea to make this per-user instead.
  • Not really critical to persist this stuff to the database, this would probably be a good fit for a state helper.

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.