Update documentation, clean up
This commit is contained in:
parent
f891e5ca63
commit
5863040f93
2
NEWS
2
NEWS
|
@ -29,6 +29,8 @@
|
|||
|
||||
* Added a web frontend for xC called xP
|
||||
|
||||
* Added a Go port of xD called xS
|
||||
|
||||
|
||||
1.5.0 (2021-12-21) "The Show Must Go On"
|
||||
|
||||
|
|
|
@ -47,8 +47,9 @@ What it notably doesn't support is online changes to configuration, any limits
|
|||
besides the total number of connections and mode `+l`, or server linking
|
||||
(which also means no services).
|
||||
|
||||
This program has been https://git.janouch.name/p/haven/src/branch/master/hid[
|
||||
ported to Go] in a different project, and development continues over there.
|
||||
xS
|
||||
--
|
||||
The IRC daemon again, this time ported to Go, additionally supporting WEBIRC.
|
||||
|
||||
xB
|
||||
--
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
BEGIN {
|
||||
# The message catalog is a by-product
|
||||
msg = "xD.msg"
|
||||
print "$quote \"" > msg;
|
||||
print "$set 1" > msg;
|
||||
print "$quote \"" > msg
|
||||
print "$set 1" > msg
|
||||
}
|
||||
|
||||
/^[0-9]+ *IRC_(ERR|RPL)_[A-Z]+ *".*"$/ {
|
||||
match($0, /".*"/);
|
||||
ids[$1] = $2;
|
||||
texts[$2] = substr($0, RSTART, RLENGTH);
|
||||
match($0, /".*"/)
|
||||
ids[$1] = $2
|
||||
texts[$2] = substr($0, RSTART, RLENGTH)
|
||||
print $1 " " texts[$2] > msg
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
.POSIX:
|
||||
.SUFFIXES:
|
||||
AWK = env LC_ALL=C awk
|
||||
|
||||
outputs = xP proto.go public/proto.js public/mithril.js
|
||||
all: $(outputs) public/ircfmt.woff2
|
||||
|
@ -7,11 +8,11 @@ all: $(outputs) public/ircfmt.woff2
|
|||
xP: xP.go proto.go
|
||||
go build -o $@
|
||||
proto.go: ../xC-gen-proto.awk ../xC-gen-proto-go.awk ../xC-proto
|
||||
awk -f ../xC-gen-proto.awk -f ../xC-gen-proto-go.awk ../xC-proto > $@
|
||||
$(AWK) -f ../xC-gen-proto.awk -f ../xC-gen-proto-go.awk ../xC-proto > $@
|
||||
public/proto.js: ../xC-gen-proto.awk ../xC-gen-proto-js.awk ../xC-proto
|
||||
awk -f ../xC-gen-proto.awk -f ../xC-gen-proto-js.awk ../xC-proto > $@
|
||||
$(AWK) -f ../xC-gen-proto.awk -f ../xC-gen-proto-js.awk ../xC-proto > $@
|
||||
public/ircfmt.woff2: gen-ircfmt.awk
|
||||
awk -v Output=$@ -f gen-ircfmt.awk
|
||||
$(AWK) -v Output=$@ -f gen-ircfmt.awk
|
||||
public/mithril.js:
|
||||
curl -Lo $@ https://unpkg.com/mithril/mithril.js
|
||||
clean:
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
/xS
|
||||
/xS-replies.go
|
|
@ -0,0 +1,13 @@
|
|||
.POSIX:
|
||||
.SUFFIXES:
|
||||
AWK = env LC_ALL=C awk
|
||||
|
||||
outputs = xS xS-replies.go
|
||||
all: $(outputs)
|
||||
|
||||
xS: xS.go xS-replies.go
|
||||
go build -o $@
|
||||
xS-replies.go: xS-gen-replies.awk xS-replies
|
||||
$(AWK) -f xS-gen-replies.awk xS-replies > $@
|
||||
clean:
|
||||
rm -f $(outputs)
|
|
@ -1,15 +1,19 @@
|
|||
#!/usr/bin/awk -f
|
||||
/^[0-9]+ *(ERR|RPL)_[A-Z]+ *".*"$/ {
|
||||
match($0, /".*"/);
|
||||
ids[$1] = $2;
|
||||
texts[$2] = substr($0, RSTART, RLENGTH);
|
||||
match($0, /".*"/)
|
||||
ids[$1] = $2
|
||||
texts[$2] = substr($0, RSTART, RLENGTH)
|
||||
}
|
||||
|
||||
END {
|
||||
print "package " ENVIRON["GOPACKAGE"] "\n\nconst ("
|
||||
print "package main"
|
||||
print ""
|
||||
print "const ("
|
||||
for (i in ids)
|
||||
printf("\t%s = %s\n", ids[i], i)
|
||||
print ")\n\nvar defaultReplies = map[int]string{"
|
||||
print ")"
|
||||
print ""
|
||||
print "var defaultReplies = map[int]string{"
|
||||
for (i in ids)
|
||||
print "\t" ids[i] ": " texts[ids[i]] ","
|
||||
print "}"
|
||||
|
|
|
@ -460,8 +460,6 @@ func (fd *floodDetector) check() bool {
|
|||
|
||||
// --- IRC protocol ------------------------------------------------------------
|
||||
|
||||
//go:generate sh -c "LC_ALL=C awk -f xS-gen-replies.awk > xS-replies.go < xS-replies"
|
||||
|
||||
func ircToLower(c byte) byte {
|
||||
switch c {
|
||||
case '[':
|
Loading…
Reference in New Issue