view MIGRATING.md @ 780:560b62f6b0a7

Core: rework socket layer, closes #939 @6h Rework the ip_connector and ip_acceptor to be more easy to use. Also, ip_connector will now use a resolver to find appropriate endpoints. Bring back full support for IPv6/IPv4 with all possible combinations. The tls_stream class now owns a shared ssl::context that is copied from the acceptor or the connector. The tls_connector and tls_acceptor wraps basic ones for convenience and simplicity. Irccd and irccdctl now support local SSL sockets.
author David Demelier <markand@malikania.fr>
date Sun, 04 Nov 2018 17:26:05 +0100
parents 317c66a131be
children 7145a3df4cb7
line wrap: on
line source

IRC Client Daemon MIGRATING
===========================

This document is a small guide to help you migrating to a next major version.

Migrating from 2.x to 3.x
-------------------------

### Irccdctl

  - The functions `server-cnotice` and `server-cmode` have been removed, use
    `server-notice` and `server-mode` instead,
  - The option `connect.host` has been renamed to `connect.hostname` (#941).

### Plugins

#### Logger

  - The keyword `source` has been removed and replaced by `channel`,
  - The keyword `origin` has been added,
  - Formats `cnotice`, `cmode`, `query` have been removed.

### Network API

  - The requests `server-cnotice` and `server-cmode` have been removed, use
    `server-notice` and `server-mode` instead,
  - The request `server-mode` command requires a new argument `channel`.

### CMake options

  - All options are now starting with `IRCCD_` for better compatibility with
    external projects,
  - CMake now use GNUInstallDirs module to specify installation paths, all
    IRCCD_WITH_ options have been replaced by CMAKE_INSTALL_ equivalents.

### Paths

  - The default plugins path has been changed from **share/irccd/plugins** to
    **lib64/irccd**.

### Javascript API

#### Events

  - The events `onChannelMode` and `onChannelNotice` have been removed, plugins
    must use `Server.isSelf(target)` to determine a channel/private message,
  - The event `onNotice` takes a new `channel` argument,
  - The event `onMode` takes new `channel`, `limit`, `user`, `mask` arguments.

#### Module Server

  - The methods `Server.cmode` and `Server.cnotice` have been removed, use
    `Server.mode` and `Server.notice` instead,
  - The method `Server.mode` requires a new argument `channel`.

#### Module ElapsedTimer

  - The method ElapsedTimer.reset has been removed, just use `start` instead
    when you want to accumulate time.

#### Module Directory

  - The property `Directory.count` has been removed.

#### Module Plugin

The following properties in `Irccd.Plugin` has been renamed:

  - **cachePath** renamed to **paths.cache**,
  - **configPath** renamed to **paths.config**,
  - **dataPath renamed** to **paths.data**.

Note: these paths are no more automatically detected and set with the new
      `[paths]` and `[paths.<name>]` sections.

#### Module System

  - The function `Irccd.System.name` has now well defined return value.

### Irccd

#### Configuration

- The option `reconnect-tries` has been removed from `[server]` section, use
  `auto-reconnect` boolean option instead.
- The option `reconnect-timeout` has been renamed to `auto-reconnect-delay`.
- The section `[identity]` has been removed, instead move those values inside
  each server in their `[server]` section.