|
|
@ -174,9 +174,12 @@ class user:
|
|
|
|
self.client.send_numeric("461", "%s USER :Not enough parameters." % self.nickname)
|
|
|
|
self.client.send_numeric("461", "%s USER :Not enough parameters." % self.nickname)
|
|
|
|
elif data[0] == "NICK":
|
|
|
|
elif data[0] == "NICK":
|
|
|
|
if len(data) >= 2:
|
|
|
|
if len(data) >= 2:
|
|
|
|
self.nickname = data[1]
|
|
|
|
if data[1] not in self.server.users:
|
|
|
|
self.registered_nick = True
|
|
|
|
self.nickname = data[1]
|
|
|
|
self.verify_registration()
|
|
|
|
self.registered_nick = True
|
|
|
|
|
|
|
|
self.verify_registration()
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
self.client.send_numeric("433", "%s %s :Nickname is already in use." % (self.nickname, data[1]))
|
|
|
|
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 and data[0] == "PONG":
|
|
|
|
elif self.registered == 2 and data[0] == "PONG":
|
|
|
|