On 8/26/11 12:51 PM, Alexander Holler wrote: > Am 25.08.2011 16:37, schrieb Peter Saint-Andre: >> On 8/25/11 5:20 AM, Kevin Smith wrote: >>> On Thu, Aug 25, 2011 at 4:27 AM, Peter >>> Saint-Andre<[email protected]> wrote: > >>> Irrespective of fully-anonymous rooms, a (not XEP-0045) extension to >>> allow timed bans seems to me like it could be useful. I don't know >>> what others think. >> >> Clearly I need to write that spec for ad-hoc commands in MUC... > > I could try to write an XEP for those timed affiliations, but I'm unsure > if extending an existing namespace through another XEP is a way to go.
My point about ad-hoc commands is that it would enable us to escape from updating XEP-0045 with these feature requests related to things like configuration and room management. See XEP-0050 and XEP-0133 for examples. > As already written, my prefered way to implement timed affiliations > would be > > ---- > <item nick='pistol' affiliation='outcast' until='2011-08-22T23:59:59Z'> > ---- > > and the possible use of an attribute 'until' would be indicated through > a feature 'muc#timed-affiliations' in service discovery. Again, I think ad-hoc commands is a cleaner way to move forward. First, Room Admin Requests to Ban a User... <iq from='[email protected]/globe' id='foobar123' to='[email protected]' type='set'> <command xmlns='http://jabber.org/protocol/commands' action='execute' node='urn:xmpp:muc-commands:ban-user'/> </iq> Second, Service Returns Add User Form to Admin... <iq from='[email protected]' id='foobar123' to='[email protected]/globe' type='result'> <command xmlns='http://jabber.org/protocol/commands' node='urn:xmpp:muc-commands:ban-user' sessionid='ban-user:20040408T0337Z' status='executing'> <x xmlns='jabber:x:data' type='form'> <title>Banning a User</title> <instructions>Fill out this form to ban a user.</instructions> <field type='hidden' var='FORM_TYPE'> <value>urn:xmpp:muc-commands</value> </field> <field label='The Jabber ID for the user to be ban' type='jid-single' var='userjid'> <required/> </field> <field label='How long the ban will last' type='list-single' var='ban-length'> <option label='1 hour'><value>1</value></option> <option label='1 day'><value>24</value></option> <option label='1 week'><value>168</value></option> <option label='1 month'><value>168</value></option> <option label='1 year'><value>8736</value></option> <option label='10 years'><value>87360</value></option> </field> </x> </command> </iq> Third, Admin Submits Ban User Form to Service... <iq from='[email protected]/globe' id='foobar234' to='[email protected]' type='set'> <command xmlns='http://jabber.org/protocol/commands' node='urn:xmpp:muc-commands:ban-user' sessionid='ban-user:20040408T0337Z' status='executing'> <x xmlns='jabber:x:data' type='form'> <title>Banning a User</title> <instructions>Fill out this form to ban a user.</instructions> <field type='hidden' var='FORM_TYPE'> <value>urn:xmpp:muc-commands</value> </field> <field var='userjid'> <value>[email protected]</value> </field> <field var='ban-length'> <value>87360</value> </field> </x> </command> </iq> Fourth, Service Informs Admin of Completion... <iq from='chat.shakespeare.lit' id='foobar234' to='[email protected]/globe' type='result'> <command xmlns='http://jabber.org/protocol/commands' node='urn:xmpp:muc-commands:ban-user' sessionid='ban-user:20040408T0337Z' status='completed'/> </iq> Yes, this looks more complicated, but it's more flexible and doesn't force us to update the XEP every time someone comes up with an idea for a new feature. Peter -- Peter Saint-Andre https://stpeter.im/
