Handle non-registration commands before registration

master
Sven Slootweg 13 years ago
parent 9a06fb5ad8
commit e12405a442

@ -175,8 +175,10 @@ class user:
self.verify_registration() self.verify_registration()
else: else:
self.client.send_numeric("461", "%s NICK :Not enough parameters." % self.nickname) self.client.send_numeric("461", "%s NICK :Not enough parameters." % self.nickname)
elif self.registered < 2:
self.client.send_numeric("451", "%s %s :You have not registered." % (self.nickname, data[0]))
else: else:
self.client.send_numeric("451", "%s %s :You have not registered." % self.nickname) print "Received %s command." % data[0]
def verify_registration(self): def verify_registration(self):
if self.registered_nick == True and self.registered_user == True: if self.registered_nick == True and self.registered_user == True:

Loading…
Cancel
Save