Archived
1
0

Compare commits

..

No commits in common. "f92f68c3cdce4b7ce6d4121ca4356b36ebcd933f" and "15ccb7ad50363c3d1a7cfbc23c55f42dcaecdbd1" have entirely different histories.

10 changed files with 12 additions and 23 deletions

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015-2020 Jeff Becker
Copyright (c) 2015-2018 Jeff Becker
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1240,14 +1240,10 @@ func (self *nntpConnection) handleLine(daemon *NNTPDaemon, code int, line string
log.Println(self.name, "got reply to", reference, "but we don't have it")
go daemon.askForArticle(reference)
} else {
// get rootiest post
ref := reference
var h textproto.MIMEHeader
for ref != "" {
h = daemon.store.GetMIMEHeader(ref)
ref = strings.Trim(h.Get("References"), " ")
h := daemon.store.GetMIMEHeader(reference)
if strings.Trim(h.Get("References"), " ") == "" {
hdr.Set("References", getMessageID(h))
}
hdr.Set("References", getMessageID(h))
}
} else if reference != "" {
// bad message id

View File

@ -204,7 +204,7 @@ func (self *PostgresDatabase) prepareStatements() {
GetMessageIDByHash: "SELECT message_id, message_newsgroup FROM Articles WHERE message_id_hash = $1 LIMIT 1",
CheckEncIPBanned: "SELECT 1 FROM EncIPBans WHERE encaddr = $1",
GetFirstAndLastForGroup: "WITH x(min_no, max_no) AS ( SELECT MIN(message_no) AS min_no, MAX(message_no) AS max_no FROM ArticleNumbers WHERE newsgroup = $1) SELECT CASE WHEN min_no IS NULL THEN 0 ELSE min_no END AS min_no FROM x UNION SELECT CASE WHEN max_no IS NULL THEN 1 ELSE max_no END AS max_no FROM x",
GetNewsgroupList: "SELECT newsgroup, min(message_no), max(message_no) FROM ArticleNumbers WHERE newsgroup NOT IN ( SELECT newsgroup FROM bannedgroups ) GROUP BY newsgroup ORDER BY newsgroup",
GetNewsgroupList: "SELECT newsgroup, min(message_no), max(message_no) FROM ArticleNumbers GROUP BY newsgroup ORDER BY newsgroup",
GetMessageIDForNNTPID: "SELECT message_id FROM ArticleNumbers WHERE newsgroup = $1 AND message_no = $2 LIMIT 1",
GetNNTPIDForMessageID: "SELECT message_no FROM ArticleNumbers WHERE newsgroup = $1 AND message_id = $2 LIMIT 1",
IsExpired: "WITH x(msgid) AS ( SELECT message_id FROM Articles WHERE message_id = $1 INTERSECT ( SELECT message_id FROM ArticlePosts WHERE message_id = $1 ) ) SELECT COUNT(*) FROM x",

View File

@ -42,7 +42,6 @@ func HandleStartTLS(conn net.Conn, config *tls.Config) (econn *textproto.Conn, s
econn = textproto.NewConn(tconn)
return
} else {
log.Println("tls handshake error: ", err.Error())
certs := state.PeerCertificates
if len(certs) == 0 {
log.Println("starttls failed, no peer certs provided")
@ -54,7 +53,6 @@ func HandleStartTLS(conn net.Conn, config *tls.Config) (econn *textproto.Conn, s
}
}
tconn.Close()
conn.Close()
}
}
}

View File

@ -555,7 +555,3 @@ background-repeat: repeat;
font-size: 24pt;
float: right;
}
.spam-button {
display: none;
}

View File

@ -76,6 +76,10 @@ var nntpchan_mod_action = function(mod_action, elem) {
// http error
elem.innerHTML = "error: HTTP "+status;
}
// clear input
if (input) {
input.value = "";
}
}
}
if (mod_action.name) {

View File

@ -853,8 +853,3 @@ th > label {
:target {
background-color: #493769;
}
.mod {
display: none;
}

View File

@ -38,7 +38,7 @@
<b>Most of the rest of the wild west.</b>
</div>
<center><b>{{board.Name}}</b></center>
<center><button class="spam-button" onclick="nntpchan_mod_commit_spam(this)">Moderate</button></center>
<center><button onclick="nntpchan_mod_commit_spam(this)">Moderate</button></center>
<br />
{{{form}}}
{{#board.Threads}}

View File

@ -48,7 +48,7 @@
<b>Most of the rest of the wild west.</b>
</div>
<center><b><a href="{{thread.BoardURL}}">{{thread.Board}}</a></b></center>
<center><button class="spam-button" onclick="nntpchan_mod_commit_spam(this)">Moderate</button></center>
<center><button onclick="nntpchan_mod_commit_spam(this)">Moderate</button></center>
<br />
{{{form}}}
{{#thread.BumpLock}}

View File

@ -31,7 +31,7 @@
<div class="sitetitle">
<h2><a href="#">CHANGOLIA</a></h2>
<b>Most of the rest of the wild west.</b>
<center><button class="spam-button" onclick="nntpchan_mod_commit_spam(this)">Moderate</button></center>
<center><button onclick="nntpchan_mod_commit_spam(this)">Moderate</button></center>
</div>
<div id="paginator">
{{#prev}}