ircdb: When serializing, do not write a 'password' command if there is no password set.

Having a 'password' command with no password stops the unserialization for that user.

May be a first step toward allowing users with no password (GH-1140).
This commit is contained in:
Valentin Lorentz 2016-02-07 10:49:17 +01:00
parent 61e5a29351
commit 11496b4bbb
1 changed files with 3 additions and 2 deletions

View File

@ -352,8 +352,9 @@ class IrcUser(object):
write('name %s' % self.name)
write('ignore %s' % self.ignore)
write('secure %s' % self.secure)
write('hashed %s' % self.hashed)
write('password %s' % self.password)
if self.password:
write('hashed %s' % self.hashed)
write('password %s' % self.password)
for capability in self.capabilities:
write('capability %s' % capability)
for hostmask in self.hostmasks: