Re: Kick command proposal
Posted: Tue Jun 12, 2012 2:35 am
Uninvite is more descriptive. Revoke what? People normally use "invite." Even the previous post mixes the metaphor with "revoke their invites". /uninvite FTW.
Code: Select all
if chatmessage.lower().startswith('/kick'):
(pid, msg) = self.IGetPIDMsg(chatmessage[len('/kick'):])
if pid:
# Age player list check removed. Make sure the client code checks this!
# We don't want to kick anyone from a different age if a KI# was entered.
if len(msg):
msg = msg.strip()
else:
msg = None
# The actual kick
try:
result = PtKickClient(pid, msg)
except NameError:
# Function was not implemented
return
except ValueError:
# Player in different age
return
if (not result):
return
self.IAddRTChat(None, "Player kicked", 0)
# Kick was successful. Now revoke visitor privileges to this age if needed.
AgeName = PtGetAgeName()
# For sub ages we must substitute the main age (hard-coded unfortunately).
if (AgeName == 'Ahnonay'):
AgeName = 'AhnonayCathedral'
if (AgeName == 'ErcanaCitySilo'):
AgeName = 'Ercana'
AgesIOwnFolder = ptVault().getAgesIOwnFolder()
contents = AgesIOwnFolder.getChildNodeRefList()
for content in contents:
link = content.getChild()
link = link.upcastToAgeLinkNode()
if (type(link) == type(None)):
continue
AgeInfo = link.getAgeInfo()
if (type(AgeInfo) != type(None)):
if (AgeInfo.getAgeFilename() == AgeName):
CanVisitFolder = AgeInfo.getCanVisitFolder()
if CanVisitFolder.playerlistHasPlayer(pid):
self.IRevokeToVisit(pid, AgeInfo)
self.IAddRTChat(None, "Player's visitation to this age removed", 0)
break
return None
This was a feature request during the discussions which received a fair amount of support. I don't remember seeing any objections back then so I implemented it. You know as well as I do that if we wait for community consensus nothing will ever get done around here.Ehren wrote:D'Lanor, would you consider having the /kick command just kick people out of the age and NOT doing anything with invitations? Why make it so complicated? If they don't want the kicked player to come back, then they can manually do the uninviting (or have this uninviting thing as a separate command).
There might be some cases that someone wants to kick a player, but not get rid of that player's invitations. What if you wanted to kick someone who was just afk too long in one of your ages, or any reason other than actually disliking that person. Granted, it would probably be rare... but one would hope the need of this command at all would be rare.