Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.
/ async-irc Public archive

An implementation of the asyncio Protocol interface for IRC connections

License

Notifications You must be signed in to change notification settings

snoonetIRC/async-irc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async-irc Build Status

This project has moved to TotallyNotRobots/async-irc.

An implementation of asyncio.Protocol for IRC

Using the library

  • You can install the library using pip: pip install async-irc

Example

import asyncio

from asyncirc.protocol import IrcProtocol
from asyncirc.server import Server

loop = asyncio.get_event_loop()

servers = [
    Server("irc.example.org", 6697, True),
    Server("irc.example.com", 6667),
]

async def log(conn, message):
    print(message)

async def main():
    conn = IrcProtocol(servers, "BotNick", loop=loop)
    conn.register_cap('userhost-in-names')
    conn.register('*', log)
    await conn.connect()
    await asyncio.sleep(24 * 60 * 60)

try:
    loop.run_until_complete(main())
finally:
    loop.stop()

About

An implementation of the asyncio Protocol interface for IRC connections

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages