Browse Source

Convert to python module

dave/xdcc
dpedu 7 years ago
parent
commit
b7eacbfc22
  1. 5
      .gitignore
  2. 3
      bin/pyircbot
  3. 0
      examples/config.instance.yml
  4. 0
      examples/config.main.yml
  5. 0
      examples/data/config/BitcoinPrice.yml
  6. 0
      examples/data/config/Calc.yml
  7. 0
      examples/data/config/CryptoWalletRPC.yml
  8. 0
      examples/data/config/DogeDice.yml
  9. 0
      examples/data/config/DogeRPC.yml
  10. 0
      examples/data/config/DuckHunt.yml
  11. 0
      examples/data/config/GameBase.yml
  12. 0
      examples/data/config/Inventory.yml
  13. 0
      examples/data/config/LinkTitler.yml
  14. 0
      examples/data/config/MySQL.yml
  15. 0
      examples/data/config/NFLLive.yml
  16. 0
      examples/data/config/RandQuote.yml
  17. 0
      examples/data/config/Remind.yml
  18. 0
      examples/data/config/Scramble.yml
  19. 0
      examples/data/config/Seen.yml
  20. 9
      examples/data/config/Services.yml
  21. 0
      examples/data/config/Tell.yml
  22. 0
      examples/data/config/Weather.yml
  23. 0
      examples/data/data/Scramble/words.txt
  24. 2
      examples/run-example.sh
  25. 5
      pyircbot/__init__.py
  26. 0
      pyircbot/irccore.py
  27. 0
      pyircbot/jsonrpc.py
  28. 0
      pyircbot/modulebase.py
  29. 2
      pyircbot/modules/PingResponder.py
  30. 2
      pyircbot/modules/Services.py
  31. 5
      pyircbot/pyircbot.py
  32. 2
      pyircbot/rpc.py
  33. 2
      run-example.sh
  34. 12
      setup.py

5
.gitignore vendored

@ -2,4 +2,7 @@ libs
*__pycache__*
docs/_build
.DS_Store
botenv
botenv
dist
build
pyircbot.egg-info

3
pyircbot/main.py → bin/pyircbot

@ -4,7 +4,8 @@ import sys
import logging
import yaml
from optparse import OptionParser
from core.pyircbot import PyIRCBot
from pyircbot import PyIRCBot
if __name__ == "__main__":
" logging level and facility "

0
config.instance.yml → examples/config.instance.yml

0
config.main.yml → examples/config.main.yml

0
data/config/BitcoinPrice.yml → examples/data/config/BitcoinPrice.yml

0
data/config/Calc.yml → examples/data/config/Calc.yml

0
data/config/CryptoWalletRPC.yml → examples/data/config/CryptoWalletRPC.yml

0
data/config/DogeDice.yml → examples/data/config/DogeDice.yml

0
data/config/DogeRPC.yml → examples/data/config/DogeRPC.yml

0
data/config/DuckHunt.yml → examples/data/config/DuckHunt.yml

0
data/config/GameBase.yml → examples/data/config/GameBase.yml

0
data/config/Inventory.yml → examples/data/config/Inventory.yml

0
data/config/LinkTitler.yml → examples/data/config/LinkTitler.yml

0
data/config/MySQL.yml → examples/data/config/MySQL.yml

0
data/config/NFLLive.yml → examples/data/config/NFLLive.yml

0
data/config/RandQuote.yml → examples/data/config/RandQuote.yml

0
data/config/Remind.yml → examples/data/config/Remind.yml

0
data/config/Scramble.yml → examples/data/config/Scramble.yml

0
data/config/Seen.yml → examples/data/config/Seen.yml

9
data/config/Services.yml → examples/data/config/Services.yml

@ -1,8 +1,9 @@
user:
nick:
- pyircbot3
- pyircbot3_
- pyircbot3__
- dave
- dave_
- dave__
- dave___
password: nickservpassword
username: pyircbot3
hostname: pyircbot3.domain.com
@ -15,7 +16,7 @@ ident:
ghost_to: nickserv
ghost_cmd: ghost %(nick)s %(password)s
channels:
- "#xmopx"
- "#dave2"
privatechannels:
to: chanserv
command: invite %(channel)s

0
data/config/Tell.yml → examples/data/config/Tell.yml

0
data/config/Weather.yml → examples/data/config/Weather.yml

0
data/data/Scramble/words.txt → examples/data/data/Scramble/words.txt

2
examples/run-example.sh

@ -0,0 +1,2 @@
#!/bin/sh
../bin/pyircbot -c config.main.yml -b config.instance.yml

5
pyircbot/core/__init__.py → pyircbot/__init__.py

@ -9,3 +9,8 @@
.. automodule:: core.rpc
"""
__all__ = ["PyIRCBot"]
from pyircbot.pyircbot import PyIRCBot
from pyircbot.irccore import IRCCore

0
pyircbot/core/irccore.py → pyircbot/irccore.py

0
pyircbot/core/jsonrpc.py → pyircbot/jsonrpc.py

0
pyircbot/core/modulebase.py → pyircbot/modulebase.py

2
pyircbot/modules/PingResponder.py

@ -7,7 +7,7 @@
"""
from modulebase import ModuleBase,ModuleHook
from pyircbot.modulebase import ModuleBase,ModuleHook
class PingResponder(ModuleBase):
def __init__(self, bot, moduleName):

2
pyircbot/modules/Services.py

@ -7,7 +7,7 @@
"""
from modulebase import ModuleBase,ModuleHook
from pyircbot.modulebase import ModuleBase,ModuleHook
from time import sleep
class Services(ModuleBase):

5
pyircbot/core/pyircbot.py → pyircbot/pyircbot.py

@ -9,8 +9,9 @@
import logging
import time
import sys
from core.rpc import BotRPC
from core.irccore import IRCCore
from pyircbot.rpc import BotRPC
from pyircbot.irccore import IRCCore
from pyircbot import modulebase
import os.path
class PyIRCBot:

2
pyircbot/core/rpc.py → pyircbot/rpc.py

@ -8,7 +8,7 @@
import traceback
import logging
from core import jsonrpc
from pyircbot import jsonrpc
from threading import Thread
class BotRPC(Thread):

2
run-example.sh

@ -1,2 +0,0 @@
#!/bin/sh
./pyircbot/main.py -c config.main.yml -b config.instance.yml

12
setup.py

@ -0,0 +1,12 @@
#!/usr/bin/env python3
from setuptools import setup
setup(name='pyircbot',
version='4.0.0aa',
description='A modular python irc bot',
url='http://gitlab.xmopx.net/dave/pyircbot3/tree/master',
author='dpedu',
author_email='dave@davepedu.com',
packages=['pyircbot'],
scripts=['bin/pyircbot'],
zip_safe=False)
Loading…
Cancel
Save