Convert to python module
This commit is contained in:
parent
99479e193c
commit
b7eacbfc22
5
.gitignore
vendored
5
.gitignore
vendored
@ -2,4 +2,7 @@ libs
|
||||
*__pycache__*
|
||||
docs/_build
|
||||
.DS_Store
|
||||
botenv
|
||||
botenv
|
||||
dist
|
||||
build
|
||||
pyircbot.egg-info
|
@ -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 "
|
@ -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
|
2
examples/run-example.sh
Executable file
2
examples/run-example.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
../bin/pyircbot -c config.main.yml -b config.instance.yml
|
@ -9,3 +9,8 @@
|
||||
.. automodule:: core.rpc
|
||||
|
||||
"""
|
||||
|
||||
__all__ = ["PyIRCBot"]
|
||||
|
||||
from pyircbot.pyircbot import PyIRCBot
|
||||
from pyircbot.irccore import IRCCore
|
@ -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
Normal file → Executable file
2
pyircbot/modules/Services.py
Normal file → Executable file
@ -7,7 +7,7 @@
|
||||
|
||||
"""
|
||||
|
||||
from modulebase import ModuleBase,ModuleHook
|
||||
from pyircbot.modulebase import ModuleBase,ModuleHook
|
||||
from time import sleep
|
||||
|
||||
class Services(ModuleBase):
|
||||
|
@ -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:
|
@ -8,7 +8,7 @@
|
||||
|
||||
import traceback
|
||||
import logging
|
||||
from core import jsonrpc
|
||||
from pyircbot import jsonrpc
|
||||
from threading import Thread
|
||||
|
||||
class BotRPC(Thread):
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
./pyircbot/main.py -c config.main.yml -b config.instance.yml
|
12
setup.py
Executable file
12
setup.py
Executable file
@ -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…
x
Reference in New Issue
Block a user