0

現在、ejabberd をチャット サーバーとして使用しています。そして、チャットして新しいユーザーを登録するクライアントを書いています。現在、次のコマンドを送信して新しいユーザーを登録するなど、新しいアカウントを登録するためのプロトコルの一部を知っています。

<iq type="set"><query xmlns="jabber:iq:register"><username>wfwfewegwegwewefg</username><password>wfwefwefwefwef</password></query></iq>

私の質問は、サーバーと通信するためのコマンド/プロトコルをもっと学びたいということです。では、どこで詳細を確認できますか? たとえば、ユーザー名が存在するかどうかをサーバーに問い合わせるにはどうすればよいですか。サーバーにユーザーの登録を解除するように依頼するにはどうすればよいですか。

検索すべきキーワードは何ですか?Jabber XMPP プロトコルを検索する必要がありますか?

4

3 に答える 3

1

ejabberd を使用する場合ejabberdctl、疑問を解決するコマンド ライン ユーティリティがあります。

user@server:~$ sudo /opt/ejabberd-2.1.8/bin/ejabberdctl 
Usage: ejabberdctl [--node nodename] [--auth user host password] command [options]

Available commands in this ejabberd node:
  backup file                                                         Store the database to backup file 
  connected_users                                                     List all established sessions 
  connected_users_number                                              Get the number of established sessions 
  delete_expired_messages                                             Delete expired offline messages from database 
  delete_old_messages days                                            Delete offline messages older than DAYS 
  dump file                                                           Dump the database to text file 
  dump_table file table                                               Dump a table to text file 
  export_piefxis dir                                                  Export data of all users in the server to PIEFXIS 
                                                                      files (XEP-0227) 
  export_piefxis_host dir host                                        Export data of users in a host to PIEFXIS files 
                                                                      (XEP-0227) 
  get_loglevel                                                        Get the current loglevel 
  help [--tags [tag] | com?*]                                         Show help (try: ejabberdctl help help) 
  import_dir file                                                     Import users data from jabberd14 spool dir 
  import_file file                                                    Import user data from jabberd14 spool file 
  import_piefxis file                                                 Import users data from a PIEFXIS file (XEP-0227) 
  incoming_s2s_number                                                 Number of incoming s2s connections on the node 
  install_fallback file                                               Install the database from a fallback file 
  load file                                                           Restore the database from text file 
  mnesia [info]                                                       show information of Mnesia system 
  mnesia_change_nodename oldnodename newnodename oldbackup newbackup  Change the erlang node name in a backup file 
  outgoing_s2s_number                                                 Number of outgoing s2s connections on the node 
  register user host password                                         Register a user 
  registered_users host                                               List all registered users in HOST 
  rename_default_nodeplugin                                           Update PubSub table from old ejabberd trunk SVN to 
                                                                      2.1.0 
  reopen_log                                                          Reopen the log files 
  restart                                                             Restart ejabberd 
  restore file                                                        Restore the database from backup file 
  set_master nodename                                                 Set master node of the clustered Mnesia tables 
  status                                                              Get ejabberd status 
  stop                                                                Stop ejabberd 
  stop_kindly delay announcement                                      Inform users and rooms, wait, and stop the server 
  unregister user host                                                Unregister a user 
  update module                                                       Update the given module, or use the keyword: all 
  update_list                                                         List modified modules that can be updated 
  user_resources user host                                            List user's connected resources 

Examples:
  ejabberdctl restart
  ejabberdctl --node ejabberd@host restart

Commands to start an ejabberd node:
  start  Start an ejabberd node in server mode
  debug  Attach an interactive Erlang shell to a running ejabberd node
  live   Start an ejabberd node in live (interactive) mode
于 2011-07-04T18:22:38.660 に答える
1

プロトコルとその用語の概要を理解するには、 「XMPP: The Definitive Guide」という本が役立ちます。その後、XEP はリファレンスとして適しています。

于 2013-10-30T15:18:15.853 に答える
1

これらのことを行うために管理者アカウントからクエリを送信している場合は、XEP-0050: Ad-hoc commands に基づくXEP-0133: Service Administrationを参照してください。

一般的なユーザーの観点から言えば、通常、ユーザー アカウントが存在するかどうかを確認することはできません (これにより、スパマーがディレクトリ ハーベスティングに使用するドアが開いたままになります)、アカウントを所有している場合は、アカウントの登録を解除できます。詳細については、XEP-0077: インバンド登録を参照してください。

http://xmpp.org/extensions/には、あらゆる種類の標準拡張機能が他にも多数あります。開発中のものもあれば、完成済みで安定しているものもあります。

于 2010-06-27T02:04:48.287 に答える