Skip to content

Commit

Permalink
Fix broken config options introduced in commit 1cc0032
Browse files Browse the repository at this point in the history
Commit 1cc0032 introduced two new config options: bind_ip and
bind_port. Unfortunately, it makes no sense to bind to a specific port
as only one user will be able to connect at a time (when a second user
tries to use iris, the (host, port) tuple will already be in use).
Additionally, the port was never converted from a str to an int, which
caused an exception if bind_ip was defined. Remove the bind_port option
entirely.

Since the bind_ip option has nothing to do with the actual execution of
the iris daemon and instead deals with connecting to the IRC server,
move it from the execution section to the irc section.
  • Loading branch information
mrflea committed Feb 25, 2013
1 parent 61aece3 commit 92b63ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
12 changes: 5 additions & 7 deletions iris.conf.example
Expand Up @@ -30,13 +30,7 @@ syslog_addr:
# SYSLOG PORT: Sets the port to send syslog datagrams to, if syslog_addr is set.
syslog_port: 514

# Binds to a specific IP and port
# Use this if your machine has more than one outgoing IP
# Example:
# bind_ip: 127.0.0.1
# bind_port: 0
bind_ip:
bind_port:


# BACKEND IRC CONNECTION OPTIONS
# These options provide the needed information for the backend to connect to
Expand All @@ -53,6 +47,10 @@ port: 6667
# SSL: Use SSL to connect to IRC server or not
ssl: false

# BIND IP: The (local) IP address to bind to for the IRC server connection.
# Leave unset to bind to the first applicable interface.
bind_ip:

# REALNAME: The realname field for clients connecting through the
# webclient.
realname: http://moo.com/
Expand Down
5 changes: 2 additions & 3 deletions qwebirc/ircclient.py
Expand Up @@ -226,11 +226,10 @@ def createIRC(*args, **kwargs):
server = config.irc["server"]
port = config.irc["port"]

bind_ip = config.execution["bind_ip"]
bind_port = config.execution["bind_port"]
bind_ip = config.irc["bind_ip"]
bindToAddress = None
if bind_ip:
bindToAddress = (bind_ip, bind_port)
bindToAddress = (bind_ip, 0)

if config.irc["ssl"]:
from twisted.internet.ssl import ClientContextFactory
Expand Down

0 comments on commit 92b63ac

Please sign in to comment.