AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 1010775
Accepted
saxad
saxad
Asked: 2020-04-04 08:47:45 +0800 CST2020-04-04 08:47:45 +0800 CST 2020-04-04 08:47:45 +0800 CST

ejabberdctl process_rosteritems 命令中的多个参数

  • 772

伙计们,尤其是 Badlop :) 我需要你的帮助并有疑问。如何在我拥有的 process_rosteritems 命令中添加更多参数,例如,这样的命令:

ejabberdctl process_rosteritems list none out any [email protected]

我需要 2 个同时匹配,例如 [email protected] 和 [email protected] 类似的东西:

ejabberdctl process_rosteritems list none out any [email protected]&[email protected]

如何修改命令,使其匹配 2 个 arg(同时匹配)?

ejabberd
  • 1 1 个回答
  • 55 Views

1 个回答

  • Voted
  1. Best Answer
    Badlop
    2020-04-07T03:55:27+08:002020-04-07T03:55:27+08:00

    如果您对 mod_roster 使用 mnesia,则可以使用某些参数(SUBS、ASKS、USERS 和 CONTACTS)。分隔几个元素的字符是:。使用 SQL 存储是不可能的……但在这种情况下,您可能仍然可以使用一些 SQL 查询。

    例如,要获取具有联系人 user1 或 user2 的用户:

    $ ejabberdctl process_rosteritems list any any any user1@localhost:user2@localhost
    user3@localhost user1@localhost
    user1@localhost user2@localhost
    user2@localhost user1@localhost
    

    如命令文档中所述:

    $ ejabberdctl help process_rosteritems
    
      Command Name: process_rosteritems
    
      Arguments: action::string
                 subs::string
                 asks::string
                 users::string
                 contacts::string
    
      Returns: response::[ pairs::{ user::string,
                                    contact::string } ]
    
      Tags:  roster
    
      Description:  List/delete rosteritems that match filter
    
     Explanation of each argument:
     - action: what to do with each rosteritem that matches all the filtering options
     - subs: subscription type
     - asks: pending subscription
     - users: the JIDs of the local user
     - contacts: the JIDs of the contact in the roster
    
     *** Mnesia: 
    
    Allowed values in the arguments:
     ACTION = list | delete
     SUBS = SUB[:SUB]* | any
     SUB = none | from | to | both
     ASKS = ASK[:ASK]* | any
     ASK = none | out | in
     USERS = JID[:JID]* | any
     CONTACTS = JID[:JID]* | any
     JID = characters valid in a JID, and can use the globs: *, ?, ! and [...]
    
    This example will list roster items with subscription 'none', 'from' or 'to' that have any ask property, of local users
    which JID is in the virtual host 'example.org' and that the contact JID is either a bare server name (without user part)
    or that has a user part and the server part contains the word 'icq':
     list none:from:to any *@example.org *:*@*icq*
    
     *** SQL:
    
    Allowed values in the arguments:
     ACTION = list | delete
     SUBS = any | none | from | to | both
     ASKS = any | none | out | in
     USERS = JID
     CONTACTS = JID
     JID = characters valid in a JID, and can use the globs: _ and %
    
    This example will list roster items with subscription 'to' that have any ask property, of local users which JID is in the
    virtual host 'example.org' and that the contact JID's server part contains the word 'icq':
     list to any %@example.org %@%icq%
    
    • 1

相关问题

  • xmpp 在聊天中更改状态

  • xmpp / ejabberd。向所有其他用户显示用户的存在

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve