Skip to main content

A Python IRC client library

Project description

irc-toolkit
===========

[![Build Status](http://img.shields.io/travis/kylef/irctk/master.svg?style=flat)](https://travis-ci.org/kylef/irctk)

An IRC client toolkit in Python.

## Installation

```bash
$ pip install irc-toolkit
```

## Usage

```python
import zokket
import irctk

class PingBot(object):
def __init__(self):
client = irctk.Client()
client.delegate = self
client.connect('chat.freenode.net', 6697, secure=True)

def irc_registered(self, client):
channel = client.add_channel('#test')
channel.join()

def irc_private_message(self, client, nick, message):
if message == 'ping':
nick.send('pong')

def irc_channel_message(self, client, nick, channel, message):
if message == 'ping':
channel.send('{}: pong'.format(nick))

if __name__ == '__main__':
bot = PingBot()
zokket.DefaultRunloop.run()
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

irc-toolkit-0.1.0.tar.gz (6.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page