summaryrefslogtreecommitdiff
path: root/miniircd
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2016-07-19 15:17:44 +0200
committerJoel Rosdahl <joel@rosdahl.net>2016-07-19 15:17:44 +0200
commit6771a3b58524e59aa855cd7579b2e05fd57dd4b8 (patch)
tree5f75204e0baaf362f77a077a223d23794de09367 /miniircd
parent72ddd9993836c89caf212e106aa8aeab4bb6521f (diff)
downloadminiircd-6771a3b58524e59aa855cd7579b2e05fd57dd4b8.tar.gz
miniircd-6771a3b58524e59aa855cd7579b2e05fd57dd4b8.zip
Rename --logdir to --log-dir for consistency
Diffstat (limited to 'miniircd')
-rwxr-xr-xminiircd12
1 files changed, 6 insertions, 6 deletions
diff --git a/miniircd b/miniircd
index e4c9379..3bb5c18 100755
--- a/miniircd
+++ b/miniircd
@@ -592,7 +592,7 @@ class Client(object):
client.message(line)
def channel_log(self, channel, message, meta=False):
- if not self.server.logdir:
+ if not self.server.log_dir:
return
if meta:
format = "[%s] * %s %s\n"
@@ -600,7 +600,7 @@ class Client(object):
format = "[%s] <%s> %s\n"
timestamp = datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S UTC")
logname = channel.name.replace("_", "__").replace("/", "_")
- fp = open("%s/%s.log" % (self.server.logdir, logname), "a")
+ fp = open("%s/%s.log" % (self.server.log_dir, logname), "a")
fp.write(format % (timestamp, self.nickname, message))
fp.close()
@@ -640,7 +640,7 @@ class Server(object):
self.motdfile = options.motd
self.verbose = options.verbose
self.debug = options.debug
- self.logdir = options.logdir
+ self.log_dir = options.log_dir
self.chroot = options.chroot
self.setuid = options.setuid
self.statedir = options.statedir
@@ -671,8 +671,8 @@ class Server(object):
self.channels = {} # irc_lower(Channel name) --> Channel instance.
self.clients = {} # Socket --> Client instance.
self.nicknames = {} # irc_lower(Nickname) --> Client instance.
- if self.logdir:
- create_directory(self.logdir)
+ if self.log_dir:
+ create_directory(self.log_dir)
if self.statedir:
create_directory(self.statedir)
@@ -915,7 +915,7 @@ def main(argv):
metavar="X", default=10, type="int",
help="set count backup log file to X [default: %default]")
op.add_option(
- "--logdir",
+ "--log-dir",
metavar="X",
help="store channel log in directory X")
op.add_option(