annotate MIGRATING.md @ 796:1a6152af0866

misc: use ipv4 as option rather than family Now, all sections and JSON options that require a IP family will take ipv4 and ipv6 boolean options for convenience. It reduces parsing complexity and is more convenient for the user. Examples: # IPv6 server only [server] name = example port = 6667 hostname = example.org ipv4 = false ipv6 = true # IPv4 transport only [transport] type = ip ipv4 = true ipv6 = false port = 3320 If both options are defined (default everywhere), both protocols will be tried or bound.
author David Demelier <markand@malikania.fr>
date Sun, 11 Nov 2018 14:56:04 +0100
parents 3c090c1ff4f0
children d55a64c6586b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
486
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
1 IRC Client Daemon MIGRATING
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 ===========================
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
3
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 This document is a small guide to help you migrating to a next major version.
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
5
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 Migrating from 2.x to 3.x
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 -------------------------
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
8
788
3c090c1ff4f0 irccd: support IPv4, IPv6 in IRC servers, closes #945 @2h
David Demelier <markand@malikania.fr>
parents: 785
diff changeset
9 ### Irccd
3c090c1ff4f0 irccd: support IPv4, IPv6 in IRC servers, closes #945 @2h
David Demelier <markand@malikania.fr>
parents: 785
diff changeset
10
3c090c1ff4f0 irccd: support IPv4, IPv6 in IRC servers, closes #945 @2h
David Demelier <markand@malikania.fr>
parents: 785
diff changeset
11 - The option `reconnect-tries` has been removed from `[server]` section, use
3c090c1ff4f0 irccd: support IPv4, IPv6 in IRC servers, closes #945 @2h
David Demelier <markand@malikania.fr>
parents: 785
diff changeset
12 `auto-reconnect` boolean option instead,
3c090c1ff4f0 irccd: support IPv4, IPv6 in IRC servers, closes #945 @2h
David Demelier <markand@malikania.fr>
parents: 785
diff changeset
13 - The option `reconnect-timeout` has been renamed to `auto-reconnect-delay`.
3c090c1ff4f0 irccd: support IPv4, IPv6 in IRC servers, closes #945 @2h
David Demelier <markand@malikania.fr>
parents: 785
diff changeset
14 - The section `[identity]` has been removed, instead move those values inside
3c090c1ff4f0 irccd: support IPv4, IPv6 in IRC servers, closes #945 @2h
David Demelier <markand@malikania.fr>
parents: 785
diff changeset
15 each server in their `[server]` section.
3c090c1ff4f0 irccd: support IPv4, IPv6 in IRC servers, closes #945 @2h
David Demelier <markand@malikania.fr>
parents: 785
diff changeset
16
574
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
17 ### Irccdctl
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
18
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
19 - The functions `server-cnotice` and `server-cmode` have been removed, use
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
20 `server-notice` and `server-mode` instead,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
21 - The option `connect.host` has been renamed to `connect.hostname`,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
22 - The option `--host` has been renamed to `--hostname`.
574
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
23
577
3d0dbc0bee7d Irccd: update references to onChannel(Mode|Notice), onMode
David Demelier <markand@malikania.fr>
parents: 574
diff changeset
24 ### Plugins
3d0dbc0bee7d Irccd: update references to onChannel(Mode|Notice), onMode
David Demelier <markand@malikania.fr>
parents: 574
diff changeset
25
3d0dbc0bee7d Irccd: update references to onChannel(Mode|Notice), onMode
David Demelier <markand@malikania.fr>
parents: 574
diff changeset
26 #### Logger
3d0dbc0bee7d Irccd: update references to onChannel(Mode|Notice), onMode
David Demelier <markand@malikania.fr>
parents: 574
diff changeset
27
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
28 - The keyword `source` has been removed and replaced by `channel`,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
29 - The keyword `origin` has been added,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
30 - Formats `cnotice`, `cmode`, `query` have been removed.
577
3d0dbc0bee7d Irccd: update references to onChannel(Mode|Notice), onMode
David Demelier <markand@malikania.fr>
parents: 574
diff changeset
31
574
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
32 ### Network API
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
33
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
34 - The requests `server-cnotice` and `server-cmode` have been removed, use
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
35 `server-notice` and `server-mode` instead,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
36 - The request `server-mode` command requires a new argument `channel`.
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
37 - The property `host` in request `server-connect` has been renamed to
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
38 `hostname`,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
39 - The request `server-info` sends `hostname` property instead of `host`,
788
3c090c1ff4f0 irccd: support IPv4, IPv6 in IRC servers, closes #945 @2h
David Demelier <markand@malikania.fr>
parents: 785
diff changeset
40 - The event `onWhois` sends `hostname` property instead of `host`,
574
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
41
486
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
42 ### CMake options
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
43
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
44 - All options are now starting with `IRCCD_` for better compatibility with
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
45 external projects,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
46 - CMake now use GNUInstallDirs module to specify installation paths, all
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
47 IRCCD\_WITH\_ options have been replaced by CMAKE\_INSTALL\_ equivalents.
486
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
48
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
49 ### Paths
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
50
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
51 - The default plugins path has been changed from **share/irccd/plugins** to
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
52 **lib64/irccd**.
486
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
53
574
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
54 ### Javascript API
486
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
55
574
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
56 #### Events
486
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
57
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
58 - The events `onChannelMode` and `onChannelNotice` have been removed, plugins
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
59 must use `Server.isSelf(target)` to determine a channel/private message,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
60 - The event `onNotice` takes a new `channel` argument,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
61 - The event `onMode` takes new `channel`, `limit`, `user`, `mask` arguments,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
62 - The object information in `onWhois` event now has `hostname` property instead
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
63 of `host`.
486
0b156b82b8c1 Irccd: rework of paths, closes #611
David Demelier <markand@malikania.fr>
parents:
diff changeset
64
574
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
65 #### Module Server
489
349fe29d86d5 Tests: switch to Boost, closes #680
David Demelier <markand@malikania.fr>
parents: 486
diff changeset
66
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
67 - The methods `Server.cmode` and `Server.cnotice` have been removed, use
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
68 `Server.mode` and `Server.notice` instead,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
69 - The method `Server.mode` requires a new argument `channel`,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
70 - The object returned in the method `Server.info` now has a `hostname` property
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
71 instead of `host`.
788
3c090c1ff4f0 irccd: support IPv4, IPv6 in IRC servers, closes #945 @2h
David Demelier <markand@malikania.fr>
parents: 785
diff changeset
72 - The property `host` in constructor `Server` has been renamed to
796
1a6152af0866 misc: use ipv4 as option rather than family
David Demelier <markand@malikania.fr>
parents: 788
diff changeset
73 `hostname`.
489
349fe29d86d5 Tests: switch to Boost, closes #680
David Demelier <markand@malikania.fr>
parents: 486
diff changeset
74
349fe29d86d5 Tests: switch to Boost, closes #680
David Demelier <markand@malikania.fr>
parents: 486
diff changeset
75 #### Module ElapsedTimer
349fe29d86d5 Tests: switch to Boost, closes #680
David Demelier <markand@malikania.fr>
parents: 486
diff changeset
76
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
77 - The method ElapsedTimer.reset has been removed, just use `start` instead
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
78 when you want to accumulate time.
514
16b9ebfd3f08 Irccd: get rid of fs.hpp, closes #594
David Demelier <markand@malikania.fr>
parents: 489
diff changeset
79
16b9ebfd3f08 Irccd: get rid of fs.hpp, closes #594
David Demelier <markand@malikania.fr>
parents: 489
diff changeset
80 #### Module Directory
16b9ebfd3f08 Irccd: get rid of fs.hpp, closes #594
David Demelier <markand@malikania.fr>
parents: 489
diff changeset
81
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
82 - The property `Directory.count` has been removed.
574
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
83
700
91bc29e87399 Irccd: use Boost.Predef, closes #805 @1h
David Demelier <markand@malikania.fr>
parents: 696
diff changeset
84 #### Module Plugin
574
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
85
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
86 The following properties in `Irccd.Plugin` has been renamed:
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
87
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
88 - **cachePath** renamed to **paths.cache**,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
89 - **configPath** renamed to **paths.config**,
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
90 - **dataPath** renamed to **paths.data**.
574
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
91
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
92 Note: these paths are no more automatically detected and set with the new
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
93 `[paths]` and `[paths.<name>]` sections.
18e80ec38ac7 Irccd: get rid of user/channel separation, closes #734
David Demelier <markand@malikania.fr>
parents: 514
diff changeset
94
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
95 #### Module Server
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
96
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
97 - The property `host` in the function `Irccd.Server` has been renamed to
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
98 `hostname`.
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
99
700
91bc29e87399 Irccd: use Boost.Predef, closes #805 @1h
David Demelier <markand@malikania.fr>
parents: 696
diff changeset
100 #### Module System
91bc29e87399 Irccd: use Boost.Predef, closes #805 @1h
David Demelier <markand@malikania.fr>
parents: 696
diff changeset
101
785
7145a3df4cb7 misc: rename host to hostname, closes #941 @2h
David Demelier <markand@malikania.fr>
parents: 780
diff changeset
102 - The function `Irccd.System.name` has now well defined return value.