more
This commit is contained in:
parent
1a18d20a1a
commit
31b6f814d4
@ -903,21 +903,21 @@ func (self *NNTPDaemon) processMessage(msgid string) {
|
|||||||
if self.expire != nil {
|
if self.expire != nil {
|
||||||
// expire posts
|
// expire posts
|
||||||
log.Println("expire", group, "for", rollover, "threads")
|
log.Println("expire", group, "for", rollover, "threads")
|
||||||
self.expire.ExpireGroup(group, rollover)
|
go self.expire.ExpireGroup(group, rollover)
|
||||||
}
|
}
|
||||||
// send to mod panel
|
// send to mod panel
|
||||||
if group == "ctl" {
|
if group == "ctl" {
|
||||||
log.Println("process mod message", msgid)
|
log.Println("process mod message", msgid)
|
||||||
self.mod.HandleMessage(msgid)
|
go self.mod.HandleMessage(msgid)
|
||||||
}
|
}
|
||||||
// inform callback hooks
|
// inform callback hooks
|
||||||
go self.informHooks(group, msgid, ref)
|
go self.informHooks(group, msgid, ref)
|
||||||
// federate
|
// federate
|
||||||
self.sendAllFeeds(ArticleEntry{msgid, group})
|
go self.sendAllFeeds(ArticleEntry{msgid, group})
|
||||||
// send to frontend
|
// send to frontend
|
||||||
if self.frontend != nil {
|
if self.frontend != nil {
|
||||||
if self.frontend.AllowNewsgroup(group) {
|
if self.frontend.AllowNewsgroup(group) {
|
||||||
self.frontend.HandleNewPost(frontendPost{msgid, ref, group})
|
go self.frontend.HandleNewPost(frontendPost{msgid, ref, group})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ func (lc *liveChan) SendBanned() {
|
|||||||
msg, _ := json.Marshal(map[string]string{
|
msg, _ := json.Marshal(map[string]string{
|
||||||
"Type": "ban",
|
"Type": "ban",
|
||||||
// TODO: real ban message
|
// TODO: real ban message
|
||||||
"Reason": "your an faget, your IP was: " + lc.IP,
|
"Reason": "your an fagt, your IP was: " + lc.IP,
|
||||||
})
|
})
|
||||||
if lc.datachnl != nil {
|
if lc.datachnl != nil {
|
||||||
lc.datachnl <- msg
|
lc.datachnl <- msg
|
||||||
@ -324,10 +324,10 @@ func (self *httpFrontend) poll_liveui() {
|
|||||||
th := threads[c-idx-1]
|
th := threads[c-idx-1]
|
||||||
th.Update(self.daemon.database)
|
th.Update(self.daemon.database)
|
||||||
// send root post
|
// send root post
|
||||||
live.Inform(th.OP())
|
go live.Inform(th.OP())
|
||||||
// send replies
|
// send replies
|
||||||
for _, post := range th.Replies() {
|
for _, post := range th.Replies() {
|
||||||
live.Inform(post)
|
go live.Inform(post)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -392,6 +392,7 @@ func (self *httpFrontend) HandleNewPost(nntp frontendPost) {
|
|||||||
if len(ref) > 0 {
|
if len(ref) > 0 {
|
||||||
msgid = ref
|
msgid = ref
|
||||||
}
|
}
|
||||||
|
go func() {
|
||||||
entry := ArticleEntry{msgid, group}
|
entry := ArticleEntry{msgid, group}
|
||||||
// regnerate thread
|
// regnerate thread
|
||||||
self.Regen(entry)
|
self.Regen(entry)
|
||||||
@ -401,6 +402,7 @@ func (self *httpFrontend) HandleNewPost(nntp frontendPost) {
|
|||||||
}
|
}
|
||||||
// regen front page
|
// regen front page
|
||||||
self.RegenFrontPage()
|
self.RegenFrontPage()
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
// create a new captcha, return as json object
|
// create a new captcha, return as json object
|
||||||
|
Reference in New Issue
Block a user