ikxbot/ikx

Ikx IRC Bot

维护者

详细信息

gitlab.com/ikxbot/ikx

源代码

问题

安装: 12

依赖: 0

建议: 0

安全性: 0

星星: 0

分支: 0

类型:项目

1.1.3 2019-02-19 18:14 UTC

This package is auto-updated.

Last update: 2024-09-20 07:42:42 UTC


README

要求

Ikx IRC Bot 需要以下要求

  • PHP 7.2 或更高版本
  • MongoDB v3.6 或更高版本
  • 启用 cURL 扩展
  • 启用 MongoDB 扩展

在 Windows 上运行 Ikx

由于 PHP 的 pcntl 扩展限制,目前不支持在 Windows 上运行 Ikx。请在 OSX 或 Linux 上运行 Ikx。

安装

安装很简单:只需使用 composer 创建一个项目,所有内容将自动安装。运行以下命令安装 Ikx IRC Bot

composer create-project ikxbot/ikx ikx-irc-bot

Ikx IRC Bot 将安装到 ikx-irc-bot 文件夹。

配置

Ikx IRC Bot 使用 YAML 格式的配置文件。有关配置示例,请参阅 app/config.example.yml。您也可以使用此文件为您的 IRC Bot 创建配置文件。

配置示例

defaults:
  # Defaults-block
  # ---------
  # Defines default settings for the bot, which will be shared throughout all networks
  # All settings in defaults can me overridden on network level
  me:
    # Me-block
    # ---------
    # Identifies the bot on the server
    #
    # nickname: the bot's nickname(s) (separate with spaces to select a random nickname when connecting)
    # altnick: the bot's alternative nickname(s) (separate with spaces to select a random nickname when the nickname is taken)
    # username: the bot's username (ident)
    # gecos: the bot's gecos (realname)
    nickname: "Ikx"
    altnick: "Ikx` Ikx_"
    username: "IkxBot"
    gecos: "IkxBot"
  options:
    # Options-block
    # ---------
    # Specify several options for the bot
    #
    # prefix: Command prefix character
    prefix: "-"
networks:
  # Networks-block
  # ---------
  # Specify networks to connect on
  # The networks-block is an array, with every item allowing having serveral requirements
  #
  # identifier: The network identifier
  # address: an array of addresses available for this server
  #          in the format of: <ip>:<+port> <password>
  #          prefix the port with a plus (+) sign to connect using SSL
  #
  # Every network also supports a me-block and an options-block, which allows to override the default settings above.
  # Only the specified settings in these blocks will be overridden.

  - identifier: "Hunter (Dev)"
    address:
      - "hunter.jrv.cc:+6697"
#  - identifier: "DevIRC"
#    address:
#      - "transip.devirc.net:6667"
#    options:
#      prefix: ":"

运行机器人

配置好机器人后,您可能希望让它连接到您的 IRC 服务器。Ikx IRC Bot 提供了一个简单的控制台命令,允许运行机器人

php Ikx run