in "PalabreServer" in Method "sendInfoToClient(self,attrs)"
Code:
def sendInfoToClient(self,attrs): """
envia informacion especifica al solicitante
""" #Si la informacion solicitada es de tipo "Jugadores en una partida" procedo if attrs['type'] == "players": liste = "<info type='players' players='%i'>" % len(self.server.allNickNames)
for q in self.server.allNickNames.values():
if q.isClientInRoom(attrs['heading']):
if q.id > idMenor and q.id < idMayor: idMayor = q.id
currentClient = q
idMenor = idMayor
if idMayor != 1000000: liste += " <player name='%s' pais='%s' />" % (str(currentClient.nickName), str(currentClient.pais))
else: armado = True
liste += "</info>" self.clientSendMessage(msg=liste)
I sorted of minor to major.
which is the major Number than can enter in variable numeric? I put 1000000
in "PalabreServer" in Method "sendInfoToClient(self,attrs)"
[code]
def sendInfoToClient(self,attrs):
"""
envia informacion especifica al solicitante
"""
#Si la informacion solicitada es de tipo "Jugadores en una partida" procedo
if attrs['type'] == "players":
liste = "<info type='players' players='%i'>" % len(self.server.allNickNames)
for q in self.server.allNickNames.values():
if q.isClientInRoom(attrs['heading']):
if q.id > idMenor and q.id < idMayor:
idMayor = q.id
currentClient = q
idMenor = idMayor
if idMayor != 1000000:
liste += " <player name='%s' pais='%s' />" % (str(currentClient.nickName), str(currentClient.pais))
else:
armado = True
liste += "</info>"
self.clientSendMessage(msg=liste)
[/code]
I sorted of minor to major.
which is the major Number than can enter in variable numeric? I put 1000000
teank you! bye bye
celio
Hi,
I see no easy way to do this.
Palabre users are stored in a python dictionnary with the nicknames as key, so the order is based on what python returns and it's sorted on the keys ...
But I guess that a plugin could store a different dictionnary sorted by time ...
And you could request this different user list by a specific node ...
wawi
How I can order the clients as they go entering to the server?