Code Monkey home page Code Monkey logo

irc's Introduction

irc

tinkering with a made-from-scratch irc library in python

documentation hosted on readthedocs.org

installing

install from github (recommended):

pip install -e git+git://github.com/coleifer/irc.git#egg=irckit

install using pypi:

pip install irckit

install dependencies:

pip install gevent (for botnet)
pip install boto (for botnet's EC2 launcher)
pip install httplib2 (for some of the bots)

irc's People

Contributors

bernardopires avatar coleifer avatar lz1irq avatar runeh avatar tmc avatar wraithan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

irc's Issues

Should PyPI be updated or atleast bump the version on github?

http://pypi.python.org/pypi/irckit isn't up-to-date with the code in this repo but the version numbers are the same, this caused some confusion for me when running the example bot on a particular irc server -- irc.udderweb.com. I expected the bot to "just work" (as it does on freenode), but it wouldn't join the channel and it wasn't obvious at first why not. It ended up being related the commit 2725e49, which isn't on the PyPI side.

This is an odd "issue" as the github code is fine but I thought this was the best place to mention this, please let me know if this isn't the case.

Boss wont start :(

When i start boss.py it gives me this:

Traceback (most recent call last):
  File "C:\Users\Charlie\Downloads\irc-master\irc-master\botnet\boss.py", line 347, in <module>
    options.logfile, options.verbosity)
  File "C:\Python27\lib\site-packages\irckit-0.1.1-py2.7.egg\irc.py", line 51, in __init__
    self.logger = self.get_logger('ircconnection.logger', self.logfile)
  File "C:\Python27\lib\site-packages\irckit-0.1.1-py2.7.egg\irc.py", line 58, in get_logger
    handler = RotatingFileHandler(filename, maxBytes=1024*1024, backupCount=2)
  File "C:\Python27\lib\logging\handlers.py", line 117, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "C:\Python27\lib\logging\handlers.py", line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "C:\Python27\lib\logging\__init__.py", line 901, in __init__
    self.baseFilename = os.path.abspath(filename)
  File "C:\Python27\lib\ntpath.py", line 487, in abspath
    path = _getfullpathname(path)
TypeError: coercing to Unicode: need string or buffer, int found
>>> 

Cant start boss.py on debian stable (8.2)

Hi there,
just tried to launch boss on couple server with debian. I did installed all requirements but still I'm getting this:

Traceback (most recent call last):
  File "boss.py", line 347, in <module>
    options.logfile, options.verbosity)
  File "/usr/local/lib/python2.7/dist-packages/irckit-0.1.1-py2.7.egg/irc.py", line 51, in __init__
    self.logger = self.get_logger('ircconnection.logger', self.logfile)
  File "/usr/local/lib/python2.7/dist-packages/irckit-0.1.1-py2.7.egg/irc.py", line 58, in get_logger
    handler = RotatingFileHandler(filename, maxBytes=1024*1024, backupCount=2)
  File "/usr/lib/python2.7/logging/handlers.py", line 117, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/handlers.py", line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/__init__.py", line 901, in __init__
    self.baseFilename = os.path.abspath(filename)
  File "/usr/lib/python2.7/posixpath.py", line 367, in abspath
    if not isabs(path):
  File "/usr/lib/python2.7/posixpath.py", line 61, in isabs
    return s.startswith('/')
AttributeError: 'int' object has no attribute 'startswith'

It crashes when I try to send unicode data

Traceback (most recent call last):
  File "app.py", line 42, in <module>
    run_bot(BlahBot, host, port, nick, ['#channel'])
  File "/Library/Python/2.7/site-packages/irc.py", line 326, in run_bot
    conn.enter_event_loop()
  File "/Library/Python/2.7/site-packages/irc.py", line 251, in enter_event_loop
    callback(**match.groupdict())
  File "/Library/Python/2.7/site-packages/irc.py", line 220, in handle_channel_message
    self.respond(result, channel=channel)
  File "/Library/Python/2.7/site-packages/irc.py", line 123, in respond
    self.send('PRIVMSG #%s :%s' % (channel.lstrip('#'), message))
  File "/Library/Python/2.7/site-packages/irc.py", line 76, in send
    self._sock_file.write('%s\r\n' % data)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 316, in write
    data = str(data) # XXX Should really reject non-string non-buffers
UnicodeEncodeError: 'ascii' codec can't encode characters in position 18-19: ordinal not in range(128)

SSL/TLS support

Disregard, the text below, I've submitted a pull request - #16

In order to use the redis bot on the IRC server I frequent I had to patch the library so that it uses SSL/TLS. I think it would be useful to add this functionality to the library but I was wondering what approach to take - let the programmer specify whether they want to use SSL, auto-detect based on port (6697), or maybe both

Should IRCConnection.connect() call sys.exit() ?

I think it would be much better just to return True or False and let the caller decide what to do if the connection was unsuccessful - retry a bit later, try another server, or indeed exit.

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.