Services: Properly register the NickServ.password group and child values.

Closes: Sf#3019174

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
James Vega 2010-06-21 19:35:35 -04:00
parent 0e22e218f0
commit d78f7b6ac5
1 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,6 @@
###
# Copyright (c) 2005, Jeremiah Fincher
# Copyright (c) 2010, James Vega
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -33,7 +34,10 @@ import supybot.registry as registry
def registerNick(nick, password=''):
p = conf.supybot.plugins.Services.Nickserv.get('password')
v = p.register(nick, registry.String(password, '', private=True))
h = 'Determines what password the bot will use with NickServ when ' \
'identifying as %s.' % nick
v = p.register(nick, registry.String(password, h, private=True))
v.channelValue = False
if password:
v.setValue(password)
@ -82,9 +86,7 @@ conf.registerGlobalValue(Services, 'ghostDelay',
conf.registerGlobalValue(Services, 'NickServ',
ValidNickOrEmptyString('', """Determines what nick the 'NickServ' service
has."""))
conf.registerGroup(Services.NickServ, 'password',
registry.String('', """Determines what password the bot will use with
NickServ.""", private=True))
conf.registerGroup(Services.NickServ, 'password')
conf.registerGlobalValue(Services, 'ChanServ',
ValidNickOrEmptyString('', """Determines what nick the 'ChanServ' service
has."""))