Experimental IRC client, daemon and bot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.adoc 7.5KB

4 years ago
5 years ago
4 years ago
4 years ago
4 years ago
5 years ago
4 years ago
4 years ago
5 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
2 years ago
4 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. uirc3
  2. =====
  3. :compact-option:
  4. The unethical IRC trinity. This project consists of an experimental IRC client,
  5. daemon, and bot. It's all you're ever going to need for chatting, as long as
  6. you can make do with minimalist software.
  7. All of them have these potentially interesting properties:
  8. - full IPv6 support
  9. - TLS support, including client certificates
  10. - lean on dependencies (with the exception of 'degesch')
  11. - compact and arguably easy to hack on
  12. - permissive license
  13. degesch
  14. -------
  15. The IRC client. It is largely defined by being built on top of GNU Readline
  16. that has been hacked to death. Its interface should feel somewhat familiar for
  17. weechat or irssi users.
  18. image::degesch.png[align="center"]
  19. This is the largest application within the project. It has most of the stuff
  20. you'd expect of an IRC client, such as being able to set up multiple servers,
  21. a powerful configuration system, integrated help, text formatting, CTCP queries,
  22. automatic splitting of overlong messages, autocomplete, logging to file,
  23. auto-away, command aliases and basic support for Lua scripting.
  24. kike
  25. ----
  26. The IRC daemon. It is designed to be used as a regular user application rather
  27. than a system-wide daemon. If all you want is a decent, minimal IRCd for
  28. testing purposes or a small network of respectful users (or bots), this one will
  29. do it just fine.
  30. Notable features:
  31. - TLS autodetection (why doesn't everyone have this?), using secure defaults
  32. - IRCop authentication via TLS client certificates
  33. - epoll/kqueue support; this means that it should be able to handle quite
  34. a number of concurrent user connections
  35. - partial IRCv3 support
  36. Not supported:
  37. - server linking (which also means no services); I consider existing protocols
  38. for this purpose ugly and tricky to implement correctly; I've also found no
  39. use for this feature yet
  40. - online changes to configuration; the configuration system from degesch could
  41. be used to implement this feature if needed
  42. - limits of almost any kind, just connections and mode `+l`
  43. ZyklonB
  44. -------
  45. The IRC bot. It builds upon the concept of my other VitaminA IRC bot. The main
  46. characteristic of these two bots is that they run plugins as coprocesses, which
  47. allows for enhanced reliability and programming language freedom.
  48. While originally intended to be a simple rewrite of the original AWK bot in C,
  49. it fairly quickly became a playground, and it eventually got me into writing
  50. the rest of the package.
  51. It survives crashes, server disconnects and timeouts, and also has native SOCKS
  52. support (even though socksify can add that easily to any program).
  53. Packages
  54. --------
  55. Regular releases are sporadic. git master should be stable enough. You can get
  56. a package with the latest development version from Archlinux's AUR, or from
  57. openSUSE Build Service for the rest of mainstream distributions. Consult the
  58. list of repositories and their respective links at:
  59. https://build.opensuse.org/project/repositories/home:pjanouch:git
  60. Building
  61. --------
  62. Build dependencies: CMake, pkg-config, help2man, awk, sh, liberty (included) +
  63. Runtime dependencies: openssl +
  64. Additionally for degesch: curses, libffi, lua >= 5.3 (optional),
  65. readline >= 6.0 or libedit >= 2013-07-12
  66. $ git clone --recursive https://git.janouch.name/p/uirc3.git
  67. $ mkdir uirc3/build
  68. $ cd uirc3/build
  69. $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug \
  70. -DWANT_READLINE=ON -DWANT_LIBEDIT=OFF -DWANT_LUA=ON
  71. $ make
  72. To install the application, you can do either the usual:
  73. # make install
  74. Or you can try telling CMake to make a package for you. For Debian it is:
  75. $ cpack -G DEB
  76. # dpkg -i uirc3-*.deb
  77. Usage
  78. -----
  79. 'degesch' has in-program configuration. Just run it and read the instructions.
  80. For the rest you might want to generate a configuration file:
  81. $ zyklonb --write-default-config
  82. $ kike --write-default-config
  83. After making any necessary edits to the file (there are comments to aid you in
  84. doing that), simply run the appropriate program with no arguments:
  85. $ zyklonb
  86. $ kike
  87. 'ZyklonB' stays running in the foreground, therefore I recommend launching it
  88. inside a Screen or tmux session.
  89. 'kike', on the other hand, immediately forks into the background. Use the PID
  90. file or something like `killall` if you want to terminate it. You can run it
  91. as a `forking` type systemd user service.
  92. Client Certificates
  93. -------------------
  94. 'kike' uses SHA1 fingerprints of TLS client certificates to authenticate users.
  95. To get the fingerprint from a certificate file in the required form, use:
  96. $ openssl x509 -in public.pem -outform DER | sha1sum
  97. Custom Key Bindings in degesch
  98. ------------------------------
  99. The default and preferred frontend used in 'degesch' is GNU Readline. This
  100. means that you can change your bindings by editing '~/.inputrc'. For example:
  101. ....
  102. # Preload with system-wide settings
  103. $include /etc/inputrc
  104. # Make M-left and M-right reorder buffers
  105. $if degesch
  106. "\e\e[C": move-buffer-right
  107. "\e\e[D": move-buffer-left
  108. $endif
  109. ....
  110. Consult the source code and the GNU Readline manual for a list of available
  111. functions. Also refer to the latter for the exact syntax of this file.
  112. Beware that you can easily break the program if you're not careful.
  113. How do I make degesch look like the screenshot?
  114. -----------------------------------------------
  115. First of all, you must build it with Lua support. With the defaults, degesch
  116. doesn't look very fancy because some things are rather hackish, and I also don't
  117. want to depend on UTF-8 or 256color terminals in the code. In addition to that,
  118. I appear to be one of the few people who use black on white terminals.
  119. /set behaviour.date_change_line = "%a %e %b %Y"
  120. /set behaviour.plugin_autoload += "fancy-prompt.lua,thin-cursor.lua"
  121. /set behaviour.backlog_helper = "LESSSECURE=1 less -R +Gb -Ps'Backlog ?ltlines %lt-%lb?L/%L. .?e(END):?pB%pB\\%..'"
  122. /set behaviour.backlog_helper_strip_formatting = off
  123. /set attributes.reset = "\x1b[0m"
  124. /set attributes.userhost = "\x1b[38;5;109m"
  125. /set attributes.join = "\x1b[38;5;108m"
  126. /set attributes.part = "\x1b[38;5;138m"
  127. /set attributes.external = "\x1b[38;5;248m"
  128. /set attributes.timestamp = "\x1b[48;5;255m\x1b[38;5;250m"
  129. Configuration profiles
  130. ----------------------
  131. Even though the applications don't directly support configuration profiles,
  132. they conform to the XDG standard, and thus you can change the location they
  133. load configuration from via XDG_CONFIG_HOME (normally '~/.config') and the
  134. location where store their data via XDG_DATA_HOME (normally '~/.local/share').
  135. It would be relatively easy to make the applications assume whatever name you
  136. run them under (for example by using symbolic links), and load different
  137. configurations accordingly, but I consider it rather messy and unnecessary.
  138. Contributing and Support
  139. ------------------------
  140. Use https://git.janouch.name/p/uirc3 to report bugs, request features, or submit
  141. pull requests. If you want to discuss this project, or maybe just hang out with
  142. the developer, feel free to join me at irc://irc.janouch.name, channel #dev.
  143. Bitcoin donations: 12r5uEWEgcHC46xd64tt3hHt9EUvYYDHe9
  144. License
  145. -------
  146. 'uirc3' is written by Přemysl Janouch <p.janouch@gmail.com>.
  147. You may use the software under the terms of the ISC license, the text of which
  148. is included within the package, or, at your option, you may relicense the work
  149. under the MIT or the Modified BSD License, as listed at the following site:
  150. http://www.gnu.org/licenses/license-list.html
  151. Note that 'degesch' technically becomes GPL-licensed when you statically link it
  152. against GNU Readline, but that is not a concern of this source package.