Small cleanup
This commit is contained in:
parent
46eeffee39
commit
1bb3f2aefb
11
wolfbot.py
11
wolfbot.py
@ -17,10 +17,7 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
from oyoyo.client import IRCClient
|
from oyoyo.client import IRCClient
|
||||||
from oyoyo.parse import parse_nick
|
|
||||||
import logging
|
import logging
|
||||||
import botconfig
|
import botconfig
|
||||||
import time
|
import time
|
||||||
@ -28,9 +25,11 @@ import traceback
|
|||||||
import modules.common
|
import modules.common
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
class UTCFormatter(logging.Formatter):
|
class UTCFormatter(logging.Formatter):
|
||||||
converter = time.gmtime
|
converter = time.gmtime
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if botconfig.DEBUG_MODE:
|
if botconfig.DEBUG_MODE:
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
@ -50,9 +49,9 @@ def main():
|
|||||||
handler.setFormatter(formatter)
|
handler.setFormatter(formatter)
|
||||||
|
|
||||||
cli = IRCClient(
|
cli = IRCClient(
|
||||||
{"privmsg":modules.common.on_privmsg,
|
{"privmsg": modules.common.on_privmsg,
|
||||||
"notice":lambda a, b, c, d: modules.common.on_privmsg(a, b, c, d, True),
|
"notice": lambda a, b, c, d: modules.common.on_privmsg(a, b, c, d, True),
|
||||||
"":modules.common.__unhandled__},
|
"": modules.common.__unhandled__},
|
||||||
host=botconfig.HOST,
|
host=botconfig.HOST,
|
||||||
port=botconfig.PORT,
|
port=botconfig.PORT,
|
||||||
authname=botconfig.USERNAME,
|
authname=botconfig.USERNAME,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user