Skip to content

Commit

Permalink
implement allowRegister
Browse files Browse the repository at this point in the history
  • Loading branch information
normanr committed Oct 8, 2006
1 parent b4a06e3 commit dafda68
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion yahoo.py
Expand Up @@ -490,10 +490,13 @@ def xmpp_base_disco(self, con, event, type):
if to == config.jid:
if node == None:
if type == 'info':
features = [NS_VERSION,NS_COMMANDS,NS_AVATAR]
if config.allowRegister:
features = [NS_REGISTER] + features
return {
'ids':[
{'category':'gateway','type':'yahoo','name':VERSTR}],
'features':[NS_REGISTER,NS_VERSION,NS_COMMANDS,NS_AVATAR]}
'features':features}
if type == 'items':
list = [
{'node':NODE_ROSTER,'name':config.discoName + ' Roster','jid':config.jid}]
Expand Down Expand Up @@ -670,6 +673,8 @@ def xmpp_iq_discoinfo_results(self, con, event):
raise NodeProcessed

def xmpp_iq_register_get(self, con, event):
if not config.allowRegister:
return
if event.getTo() == config.jid:
username = []
password = []
Expand All @@ -692,6 +697,8 @@ def xmpp_iq_register_get(self, con, event):
raise NodeProcessed

def xmpp_iq_register_set(self, con, event):
if not config.allowRegister:
return
if event.getTo() == config.jid:
remove = False
username = False
Expand Down

0 comments on commit dafda68

Please sign in to comment.