Browse Source

store the entire line in data as data.line; better explanation for irc_config.AFC_CHANS

tags/v0.1
Ben Kurtovic 13 years ago
parent
commit
a1b4c72473
3 changed files with 3 additions and 1 deletions
  1. +1
    -1
      config/irc_config.py
  2. +1
    -0
      irc/data.py
  3. +1
    -0
      irc/frontend.py

+ 1
- 1
config/irc_config.py View File

@@ -19,7 +19,7 @@ REALNAME = "[[w:en:User:EarwigBot]]"

# channels to join on main server's startup
CHANS = ["##earwigbot", "##earwig", "#wikipedia-en-afc"]
AFC_CHANS = ["#wikipedia-en-afc"] # report recent AFC changes
AFC_CHANS = ["#wikipedia-en-afc"] # report recent AfC changes/give AfC status messages upon join
BOT_CHANS = ["##earwigbot", "#wikipedia-en-afc"] # report edits containing "!earwigbot"

# hardcoded hostnames of users with certain permissions


+ 1
- 0
irc/data.py View File

@@ -5,6 +5,7 @@
class Data(object):
def __init__(self):
"""store data from an individual line received on IRC"""
self.line = str()
self.chan = str()
self.nick = str()
self.ident = str()


+ 1
- 0
irc/frontend.py View File

@@ -38,6 +38,7 @@ def main():
for line in lines:
line = line.strip().split()
data = Data()
data.line = line

if line[1] == "JOIN":
data.nick, data.ident, data.host = re.findall(":(.*?)!(.*?)@(.*?)\Z", line[0])[0]


Loading…
Cancel
Save