Page 3 of 5

Re: Kick command proposal

Posted: Tue Jun 12, 2012 2:35 am
by JWPlatt
Uninvite is more descriptive. Revoke what? People normally use "invite." Even the previous post mixes the metaphor with "revoke their invites". /uninvite FTW.

Re: Kick command proposal

Posted: Tue Jun 12, 2012 2:55 am
by Deledrius
I forgot there even was an invite command (is there?). I always use the KI... *shudder*

Re: Kick command proposal

Posted: Tue Jun 12, 2012 10:12 am
by D'Lanor
I implemented the invite revocation because it was specified during the long discussions about kicking last year. I can implement this so that it only revokes the invitation for the age one is kicked from. That would make more sense IMO.

Re: Kick command proposal

Posted: Tue Jun 12, 2012 10:03 pm
by Hoikas
I have completed work on PtKickClient in my fork of the H'uru codebase. The kick message will work properly for any two clients on MOSS or Cyan Server shards that understand it. I will have to write a reader for DirtSand. I will port to CWE-ou soon.

Some things I added since I last talked about the command... Specifying a client that is not in the age (or yourself) will raise a ValueError. Also, on receipt of a kick message, the kicked client will display a status message [You have been kicked by (kicker) ("reason")], then link out approximately one second later. The delay is to ensure that the kicked player has an opportunity to grok why they faded out of the age.

Re: Kick command proposal

Posted: Tue Jun 12, 2012 11:42 pm
by D'Lanor
I did some work on the Python code earlier today but it is not in my repo yet because I wanted to make sure I'm calling the function as intended. I see you have addressed the first comment in my code with that ValueError which I am adding to the Python code now. Would this be the correct way to call the function?

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

Re: Kick command proposal

Posted: Wed Jun 13, 2012 12:16 am
by Hoikas
That is indeed correct. The function will also accept the ptKey of a remote client as well, but I doubt you'll need to utilize that. Also, the msg argument is optional.

Re: Kick command proposal

Posted: Wed Jun 13, 2012 12:28 am
by Ehren
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.

Re: Kick command proposal

Posted: Wed Jun 13, 2012 9:19 am
by D'Lanor
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.
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. ;)

I have now made it so that only the kicked player's visitation to the age he/she was kicked from will be removed. The kicker will receive a notification of this. I think this is a good compromise.

Re: Kick command proposal

Posted: Wed Jun 13, 2012 5:55 pm
by D'Lanor
A new /kick command is now available in my BitBucket repo. Essentially the same as posted above but with a few error messages added.

Re: Kick command proposal

Posted: Wed Jun 13, 2012 9:07 pm
by JWPlatt
FYI - I thought it would be prudent to see if this particular feature is worthwhile to consider for MOULa - managed expectations and all that. Chogon says it sounds okay.