mod_admin_extra, feature request: user_status

Hi everybody,

i've a small idea and feature request. I like the mod_admin_extra but missing a small option. First of all a small example for what i'm looking for:

$ ejabberdctl user_status [user] [host]
$ ejabberdctl user_status max.power example.com
max.power        away       AutoAway msg or on party....

Example help page:

  Command Name: user_status

  Arguments: user::string
                        host::string
            
  Returns: user::[ userstatus::{ user::string,
                                  status::string,
                                  statustext::string } ]

  Tags: session

  Description: List status of an user

This option is useful to show me the current status of the user and could also be useful to call it via external script or something.

If you require some more information please feel free to contact me.
Thanks a lot, drscream

Implemented in SVN

I've improved an existing command in that module, and committed it to SVN. See:

$ ejabberdctl help user_sessions_info

  Command Name: user_sessions_info

  Arguments: user::string
             host::string

  Returns: sessions_info::[ session::{ connection::string,
                                       ip::string,
                                       port::integer,
                                       priority::integer,
                                       node::string,
                                       uptime::integer,
                                       status::string,
                                       resource::string,
                                       statustext::string } ]

  Tags: session

  Description: Get information about all sessions of a user

$ ejabberdctl user_sessions_info badlop localhost
c2s     127.0.0.1       60415   8       ejabberd@localhost      127     away    work laptop     away for lunch
c2s     127.0.0.1       60414   15      ejabberd@localhost      141     dnd     Home    testing this

Thanks a lot

Thanks a lot :) It's working successfully

doesn't work for me, command not known

Hi badlop, we have ejabberd installed on our CentOS server that we installed through yum. mod_admin_extra is enabled by default on the package. However, when I run user_sessions_info it says:

command "user_sessions_info" not known.

Other commands such as connect_users_vhost, connected_users_info also doesn't work. On the other hand, other mod_admin_extra commands such as add_rosteritem, get_roster, status_num etc are working.

Edit: Fixed it. The CentOS package was not updated with the latest mod_admin_extra file. Compiled it from source and replaced the default mod_admin_extra.beam file, and it worked. Thanks for this module. :)

Syndicate content