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.2KB

6 years ago
2 years ago
5 years ago
4 years ago
6 years ago
4 years ago
4 years ago
6 years ago
5 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
5 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
5 years ago
2 years ago
  1. uirc3
  2. =====
  3. :compact-option:
  4. The [line-through]#unethical# edgy IRC trinity. This project consists of an
  5. experimental IRC client, daemon, and bot. It's all you're ever going to need
  6. for chatting, as long as you can make do with minimalist software.
  7. All of them have these potentially interesting properties:
  8. - 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. - very 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. This program has been https://git.janouch.name/p/haven/src/branch/master/hid[
  44. ported to Go], and development continues over there.
  45. ZyklonB
  46. -------
  47. The IRC bot. It builds upon the concept of my other VitaminA IRC bot. The main
  48. characteristic of these two bots is that they run plugins as coprocesses, which
  49. allows for enhanced reliability and programming language freedom.
  50. While originally intended to be a simple rewrite of the original AWK bot in C,
  51. it fairly quickly became a playground, and it eventually got me into writing
  52. the rest of the package.
  53. It survives crashes, server disconnects and timeouts, and also has native SOCKS
  54. support (even though socksify can add that easily to any program).
  55. Packages
  56. --------
  57. Regular releases are sporadic. git master should be stable enough. You can get
  58. a package with the latest development version from Archlinux's AUR.
  59. Building
  60. --------
  61. Build dependencies: CMake, pkg-config, help2man, awk, sh, liberty (included) +
  62. Runtime dependencies: openssl +
  63. Additionally for degesch: curses, libffi, lua >= 5.3 (optional),
  64. readline >= 6.0 or libedit >= 2013-07-12
  65. $ git clone --recursive https://git.janouch.name/p/uirc3.git
  66. $ mkdir uirc3/build
  67. $ cd uirc3/build
  68. $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug \
  70. $ make
  71. To install the application, you can do either the usual:
  72. # make install
  73. Or you can try telling CMake to make a package for you. For Debian it is:
  74. $ cpack -G DEB
  75. # dpkg -i uirc3-*.deb
  76. Usage
  77. -----
  78. 'degesch' has in-program configuration. Just run it and read the instructions.
  79. For the rest you might want to generate a configuration file:
  80. $ zyklonb --write-default-config
  81. $ kike --write-default-config
  82. After making any necessary edits to the file (there are comments to aid you in
  83. doing that), simply run the appropriate program with no arguments:
  84. $ zyklonb
  85. $ kike
  86. 'ZyklonB' stays running in the foreground, therefore I recommend launching it
  87. inside a Screen or tmux session.
  88. 'kike', on the other hand, immediately forks into the background. Use the PID
  89. file or something like `killall` if you want to terminate it. You can run it
  90. as a `forking` type systemd user service.
  91. Client Certificates
  92. -------------------
  93. 'kike' uses SHA1 fingerprints of TLS client certificates to authenticate users.
  94. To get the fingerprint from a certificate file in the required form, use:
  95. $ openssl x509 -in public.pem -outform DER | sha1sum
  96. Custom Key Bindings in degesch
  97. ------------------------------
  98. The default and preferred frontend used in 'degesch' is GNU Readline. This
  99. means that you can change your bindings by editing '~/.inputrc'. For example:
  100. ....
  101. # Preload with system-wide settings
  102. $include /etc/inputrc
  103. # Make M-left and M-right reorder buffers
  104. $if degesch
  105. "\e\e[C": move-buffer-right
  106. "\e\e[D": move-buffer-left
  107. $endif
  108. ....
  109. Consult the source code and the GNU Readline manual for a list of available
  110. functions. Also refer to the latter for the exact syntax of this file.
  111. Beware that you can easily break the program if you're not careful.
  112. How do I make degesch look like the screenshot?
  113. -----------------------------------------------
  114. First of all, you must build it with Lua support. With the defaults, degesch
  115. doesn't look very fancy because some things are rather hackish, and I also don't
  116. want to depend on UTF-8 or 256color terminals in the code. In addition to that,
  117. I appear to be one of the few people who use black on white terminals.
  118. /set behaviour.date_change_line = "%a %e %b %Y"
  119. /set behaviour.plugin_autoload += "fancy-prompt.lua,thin-cursor.lua"
  120. /set behaviour.backlog_helper = "LESSSECURE=1 less -R +Gb -Ps'Backlog ?ltlines %lt-%lb?L/%L. .?e(END):?pB%pB\\%..'"
  121. /set behaviour.backlog_helper_strip_formatting = off
  122. /set attributes.reset = "\x1b[0m"
  123. /set attributes.userhost = "\x1b[38;5;109m"
  124. /set attributes.join = "\x1b[38;5;108m"
  125. /set attributes.part = "\x1b[38;5;138m"
  126. /set attributes.external = "\x1b[38;5;248m"
  127. /set attributes.timestamp = "\x1b[48;5;255m\x1b[38;5;250m"
  128. Configuration profiles
  129. ----------------------
  130. Even though the applications don't directly support configuration profiles,
  131. they conform to the XDG standard, and thus you can change the location they
  132. load configuration from via XDG_CONFIG_HOME (normally '~/.config') and the
  133. location where store their data via XDG_DATA_HOME (normally '~/.local/share').
  134. It would be relatively easy to make the applications assume whatever name you
  135. run them under (for example by using symbolic links), and load different
  136. configurations accordingly, but I consider it rather messy and unnecessary.
  137. Contributing and Support
  138. ------------------------
  139. Use https://git.janouch.name/p/uirc3 to report any bugs, request features,
  140. or submit pull requests. `git send-email` is tolerated. If you want to discuss
  141. the project, feel free to join me at ircs://irc.janouch.name, channel #dev.
  142. Bitcoin donations are accepted at: 12r5uEWEgcHC46xd64tt3hHt9EUvYYDHe9
  143. License
  144. -------
  145. This software is released under the terms of the 0BSD license, the text of which
  146. is included within the package along with the list of authors.
  147. Note that 'degesch' technically becomes GPL-licensed when you statically link it
  148. against GNU Readline, but that is not a concern of this source package.