hirc

[archived] IRC client
git clone https://hhvn.uk/hirc
git clone git://hhvn.uk/hirc
Log | Files | Refs

hirc.1.header (4304B)


      1 .\" vim: set syntax=nroff :
      2 .Dd COMMIT
      3 .Dt hirc 1
      4 .Os
      5 .Sh NAME
      6 .Nm hirc
      7 .Nd hhvn's IRC client
      8 .Sh SYNOPSIS
      9 .Nm
     10 .Op Fl d
     11 .Op Ar configfile
     12 .Sh OPTIONS
     13 .Bl -tag -width "-d"
     14 .It Fl d
     15 dump documentation data and exit
     16 .El
     17 .Sh DESCRIPTION
     18 .Nm
     19 is the result of a love/hate relationship with irssi.
     20 It is an attempt to majorly simplify irssi whilst keeping
     21 a lot of configurability and integrating some things only
     22 possible with perl plugins. That said,
     23 .Nm
     24 does not share any code with irssi.
     25 
     26 See also
     27 .Xr hirc.conf 5
     28 for configuring hirc.
     29 .Ss Formats
     30 Previously a custom parser was used, but now one generated by
     31 .Xr yacc 1
     32 is used. This means that formats are now checked for syntax errors on /set or /format,
     33 although I tried to make it as lenient as possible to mimic the old parser.
     34 
     35 The following styling may be used (variables and other styles may be passed as arguments):
     36 .Bl -tag -compact -width "%{split:n,c,s}"
     37 .It %{b}
     38 Set/reset boldness.
     39 .It %{c:fg[,bg]}
     40 Set foreground/background colours.
     41 Background optional.
     42 .It %{i}
     43 Set/reset italics.
     44 .It %{o}
     45 Reset all stylistic formatting including colour.
     46 .It %{r}
     47 Reverse foreground/background.
     48 .It %{u}
     49 Set/reset underline.
     50 .It %{=}
     51 Place divider here. If disabled, acts like space.
     52 .It %{nick:s}
     53 Set foreground colour to the string's hashed colour.
     54 .It %{pad:n,s}
     55 Pad string s to n length, using
     56 .Xr printf 3
     57 formats.
     58 .It %{split:n,c,s}
     59 Split string s using character c, and print nth element.
     60 .It %{time:f,s}
     61 If string s is a unix timestamp, format it by passing f to
     62 .Xr strftime 3 "."
     63 .It %{rdate:s}
     64 Get relative date from unix timestamp s.
     65 This behaviour is dictated by rdate.* namespaced settings.
     66 For a better understanding, see strrdate() in src/main.c.
     67 .El
     68 
     69 Certain variables may also be used in formats:
     70 .Bl -tag -compact -width "${channel}"
     71 .It ${raw}
     72 Raw message.
     73 .It ${cmd}
     74 The command of a message.
     75 .It ${nick}
     76 Nickname that sent the message.
     77 Since this is only the raw nick, this is commonly used with %{nick:...}
     78 .It ${priv}
     79 Character indicating channel priviledge of user. Empty if none.
     80 .It ${ident}
     81 Ident of the nick that sent the message.
     82 .It ${host}
     83 Host of the nick that sent the message.
     84 .It ${channel}
     85 Selected channel, or channel of the message.
     86 .It ${topic}
     87 Topic of the selected channel, or from the message.
     88 .It ${server}
     89 Selected server, or server the message was from.
     90 .It ${n}
     91 Where n is a non-zero positive integer.
     92 This selects a parameter of a message.
     93 .It ${n-}
     94 Where n is a non-zero positive integer.
     95 This selects all parameters following n.
     96 .It ${time}
     97 Unix timestamp of a message in string form.
     98 Should most likely be used with the %{time:f,s} styling.
     99 .El
    100 
    101 For example, the message:
    102 .D1 :hhvn!Fanatic@hhvn.uk PRIVMSG #test :hello world
    103 becomes:
    104 .Bd -offset indent -compact
    105 .Bl -tag -compact -width "${ident}"
    106 .It ${nick}
    107 hhvn
    108 .It ${ident}
    109 Fanatic
    110 .It ${host}
    111 hhvn.uk
    112 .It ${cmd}
    113 PRIVMSG
    114 .It ${1}
    115 #test
    116 .It ${2}
    117 hello world
    118 .El
    119 .Ed
    120 
    121 If a variable does not exist, it will be printed verbatim.
    122 If a variable does exist, but is empty, nothing is printed.
    123 
    124 Symbols may be escaped by placing a '\e' before them.
    125 This includes '$' and '%' starting variables and styling, respectively,
    126 as well as ':' and ',' seperating arguments to stylings.
    127 
    128 These characters do not always have to be escaped.
    129 For example "$a" prints "$a" as it is not followed by a brace,
    130 and any attempt to escape a character that does not need to be escaped will result in a backslash being printed.
    131 .Ss CTCP
    132 CTCP control characters are automatically stripped when using ${n} and ${n-} formats.
    133 
    134 ACTION ctcps will be stripped further, such that "ACTION " is stripped along with the control characters.
    135 
    136 .Nm
    137 does not support replying to CTCP requests.
    138 .Ss The divider
    139 The divider is inspired by weechat's feature where it creates a bar seperating two elements of a line.
    140 If divider.toggle is set to 1, the divider will appear in all messages in channels.
    141 The left hand side of the divider will be padded out to the length specified in divider.margin,
    142 and divider.string is inserted between the left and right hand side elements.
    143 There is no whitespace added before or after divider.string - this is done intentionally;
    144 if you wish to add it, add spaces to the value using /format.
    145 .Ss Variables
    146 The following variables can be set using the /set command: