diff options
| -rw-r--r-- | README.md | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..ff3a957 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# PyRC # + +An IRC library written in Python + +## License ## + +[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause). See LICENSE. + +## Usage ## + +``` +#!/usr/bin/python + +import PyRC +import sys +import time + +Irc = PyRC.Client() + +Irc.connect(host='irc.example.com') + +# Give the server a moment to respond +time.sleep(2.0) + +print Irc.main_loop() + +Irc.join("#example) + +print Irc.main_loop() + +Irc.message('#example', 'PyRC Bot is listening') + +print Irc.main_loop() + +while True: + try: + msgs = Irc.main_loop() + if msgs: + for line in msgs: + print line + time.sleep(1.0) + msgs = [] + except KeyboardInterrupt: + Irc.quit('Powered by PyRC Bot') +``` + +<br /> +Copyright (c) 2009-2015, Daniel Washburn. All rights reserved. |