Coder Social home page Coder Social logo

shizu's Introduction

shizu's People

Contributors

bluabk avatar heretic121 avatar hawken93 avatar skandix avatar

Stargazers

 avatar

Watchers

James Cloos avatar Niklas Ludvigsen avatar  avatar

shizu's Issues

Find a way to handle IRC QUIT properly

Quit isn't as much quitting as it is crashing.. Mostly due to pyinotify threads (ref: implement threads)

17371: ERROR :Closing link: (~shizu@localhost) [Quit: But.....Why?]

Traceback (most recent call last):
  File "shizu.py", line 1187, in <module>
    class Client:
  File "shizu.py", line 1339, in Client
    ircquit(ircsock)
  File "shizu.py", line 372, in ircquit
    watch.stop()
  File "/srv/shizubot/git/shizu/modules/watch.py", line 192, in stop
    notifier.stop()
  File "/usr/local/lib/python2.7/dist-packages/pyinotify.py", line 1501, in stop
    os.write(self._pipe[1], 'stop')```
OSError: [Errno 9] Bad file descriptor

!stats command <string> does not check if <string> exists

!stats command does not check if exists and thus it crashes.

Traceback (most recent call last):
File "shizu.py", line 1186, in
class Client:
File "shizu.py", line 1271, in Client
commands(tmpusernick, message, channel, ircsock)
File "shizu.py", line 1041, in commands
sendmsg(str(stats.get_cmd(cmd[2])), chan, ircsock)
File "/srv/shizubot/git/shizu/modules/stats.py", line 113, in get_cmd
return cfg.get_cmd(str(cmd))
File "/srv/shizubot/git/shizu/modules/stats.py", line 38, in get_cmd
return int(self.config.get('stats-cmd', name))
File "/usr/lib/python2.7/ConfigParser.py", line 340, in get
raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'all' in section: 'stats-cmd'

!samba np kills bot when BATCH mode is not set

Foobar2000 seems to not always be using BATCH mode (when handle is removed, on playback resume?)

File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'sudo smbstatus -L -vvv | grep BATCH | grep DENY_WRITE | grep -v .jpg | grep -v .png' returned non-zero exit status 1

TODO:
- Add a try and except clause for catching bad check_output feedback and not have the bot crash because of it.
- Make a proper fix that checks both BATCH and not BATCH cases.

Better handling of youtube.py / youtube-dl

Some strings seems to bypass the youtube-only url regex check?

From time to time (and on connect) the script will tend to throw the following stderr from check_output(youtube-dl):

WARNING: Long argument string detected. Use -- to separate parameters and URLs, like this:
youtube-dl -- --get-title

Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.

Restructor git structure

Master -> Release ready code
Relase branch -> working code with enough features to call it a release
Every other branch -> Features, testing, forks, etc etc

ConfigParser doesn't save.... sorta

When the script is running you can mess with config as much as you'd like, but upon quit/restart it will forget everything since its initial state.. i.e. it doesn't really write the changes to file for some reason.

Implement threading across code (priority: watch.py)

watch.py (pyinotify) in particular as it really slows down the bot, sometimes by several minutes...

What if the server has had a reboot and lost its cache? ... Be ready to keep restarting that bot as it will not be able to send a PONG for the next.. half-hour?

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.