From b28ccdddfc1503ab5e79e246d845b9af653831f7 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 10 Apr 2011 02:09:19 -0400 Subject: [PATCH] moving config information to config/ --- actions.py | 2 +- bot.py | 4 ++-- config/__init__.py | 0 config.py => config/irc_config.py | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 config/__init__.py rename config.py => config/irc_config.py (72%) diff --git a/actions.py b/actions.py index 1096b52..92d6a5f 100644 --- a/actions.py +++ b/actions.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import string, re, subprocess -from config import * +from config.irc_config import * s, send, say, action, notice, join = None, None, None, None, None, None diff --git a/bot.py b/bot.py index 7e700dd..4a4e730 100644 --- a/bot.py +++ b/bot.py @@ -3,8 +3,8 @@ ## Imports import socket, string, re from actions import * -from config import * -from secure_config import * +from config.irc_config import * +from config.secure_config import * def send(msg): # send a message 'msg' to the server s.send(msg + "\r\n") diff --git a/config/__init__.py b/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/config.py b/config/irc_config.py similarity index 72% rename from config.py rename to config/irc_config.py index e04898c..7dd16f6 100644 --- a/config.py +++ b/config/irc_config.py @@ -1,5 +1,8 @@ # -*- coding: utf-8 -*- +# EarwigBot Configuration File +# This file contains information that the bot uses to connect to IRC. + # our server's hostname HOST = "irc.freenode.net" @@ -18,8 +21,5 @@ REALNAME = "[[w:en:User:EarwigBot]]" # channel to join on startup CHANS = ["##earwigbot"] -# sleep this number of seconds in between API calls and messages sent to IRC -THROTTLE = 1 - # hostnames of users who can update/restart the bot with !update ADMINS = ["wikipedia/The-Earwig"] \ No newline at end of file