Agent-TCLI

 view release on metacpan or  search on metacpan

lib/Agent/TCLI/Package/XMPP.pm  view on Meta::CPAN


  	$args->{'session'} = POE::Session->create(
      object_states => [
          $self => [qw(
          	_start
          	_stop
          	_shutdown
          	_default

			change
			establish_context
			peer
			show
			shutdown
			)],
      ],
  	);

  	$args->{'opt_args'} = [qw( group_mode group_prefix verbose )];

}

sub _init :Init {
	my $self = shift;

	$self->Verbose("init: loading parameters and commands" );

	$self->LoadYaml(<<'...');
---
Agent::TCLI::Parameter:
  name: peers
  help: list the peers
  manual: >
    This debugging parameter can be used to list the peers currently
    loaded in a transport.
  type: Switch
---
Agent::TCLI::Parameter:
  name: controls
  help: list the controls
  manual: >
    This debugging parameter can be used to list the controls currently
    loaded in a transport.
  type: Switch
---
Agent::TCLI::Parameter:
  name: xmpp_verbose
  aliases: verbose|v
  constraints:
    - UINT
  help: an integer for verbosity
  manual: >
    This debugging parameter can be used to adjust the verbose setting
    for the XMPP transport.
  type: Counter
---
Agent::TCLI::Parameter:
  name: group_mode
  constraints:
    - ASCII
  help: sets how the control processes group chats
  manual: |
    The group_mode tells the control how to determine if a group chat
    message is directed at itself. The possible settings are:
        all - treat everything from others as a command
        log - ignore everything from others, only use chatroom for logging
        named - only accept commands prefixed by the name followed by a colon
        prefixed - only accept commands prefixed by the group_prefix,
          by default a colon
  type: Param
---
Agent::TCLI::Parameter:
  name: group_prefix
  constraints:
    - ASCII
  help: sets the prefix used in group chats
  manual: >
    The group_prefix sets the prefix used by the group_mode prefixed option.
    By default, it is a colon.
  type: Param
---
Agent::TCLI::Parameter:
  name: id
  constraints:
    - ASCII
  help: the user id
  manual: >
    ID of user in a form acceptable to the protocol.
    XMPP/Jabber IDs MUST not include resource information.
  type: Param
---
Agent::TCLI::Parameter:
  name: auth
  constraints:
    - ASCII
  help: Authorization level of user.
  manual: |
    Authorization level of user. MUST be one of these values:
      reader - has read access
      writer - has write access
      master - has root access
      logger - receives copies of all messages, can't do anything

    Note that commands must choose from the above to determine if a user can
    do anything. Not very robust, but hey, it's not even 1.0 yet.

    Every user should be defined with an B<auth>, but currently this is not
    being checked anywhere.
  type: Param
---
Agent::TCLI::Parameter:
  name: protocol
  constraints:
    - ASCII
  help: Protocol that user is allowed access on.
  manual: >
    Protocol that user is allowed access on. Currently only xmpp and
    xmpp-groupchat are supported by Transport::XMPP. If the protocol
    is xmpp-groupchat, the Transport will automatically join the
    conference room when the user is added.
  type: Param



( run in 1.138 second using v1.01-cache-2.11-cpan-39bf76dae61 )