forked from an/flokati
Removed banner prefix from all module ouput.
This commit is contained in:
parent
0b07b44aea
commit
1e218af790
|
@ -47,7 +47,7 @@ func PollFeed(uri string, timeout int, cr xmlx.CharsetFunc) {
|
||||||
log.Printf("Polling feed: %s", uri)
|
log.Printf("Polling feed: %s", uri)
|
||||||
if err := feed.Fetch(uri, cr); err != nil {
|
if err := feed.Fetch(uri, cr); err != nil {
|
||||||
log.Printf("[e] %s: %s", "*", uri, err)
|
log.Printf("[e] %s: %s", "*", uri, err)
|
||||||
sayCh <- fmt.Sprintf("%s\n*** [RSS] Error %s: %s", "*", uri, err)
|
sayCh <- fmt.Sprintf("%s\n[RSS] Error %s: %s", "*", uri, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
<-time.After(time.Duration(feed.SecondsTillUpdate() * 1e9))
|
<-time.After(time.Duration(feed.SecondsTillUpdate() * 1e9))
|
||||||
|
@ -55,7 +55,7 @@ func PollFeed(uri string, timeout int, cr xmlx.CharsetFunc) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func chanHandler(feed *gorss.Feed, newchannels []*gorss.Channel) {
|
func chanHandler(feed *gorss.Feed, newchannels []*gorss.Channel) {
|
||||||
sayCh <- fmt.Sprintf("%s\n*** [RSS] %d new channel(s) in %s", "*", len(newchannels), feed.Url)
|
sayCh <- fmt.Sprintf("%s\n[RSS] %d new channel(s) in %s", "*", len(newchannels), feed.Url)
|
||||||
}
|
}
|
||||||
|
|
||||||
func itemHandler(feed *gorss.Feed, ch *gorss.Channel, newitems []*gorss.Item) {
|
func itemHandler(feed *gorss.Feed, ch *gorss.Channel, newitems []*gorss.Item) {
|
||||||
|
@ -63,7 +63,7 @@ func itemHandler(feed *gorss.Feed, ch *gorss.Channel, newitems []*gorss.Item) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, ni := range newitems {
|
for _, ni := range newitems {
|
||||||
sayCh <- fmt.Sprintf("%s\n*** [RSS] %v - %v", "*", ni.Title, ni.Links[0].Href)
|
sayCh <- fmt.Sprintf("%s\n[RSS] %v - %v", "*", ni.Title, ni.Links[0].Href)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,13 +127,13 @@ func scraper() {
|
||||||
nextFunds := ((funds / FUNDS_INT) * FUNDS_INT) + FUNDS_INT
|
nextFunds := ((funds / FUNDS_INT) * FUNDS_INT) + FUNDS_INT
|
||||||
|
|
||||||
if curFans >= nextFans {
|
if curFans >= nextFans {
|
||||||
sayCh <- "*\n*** [SC] Star Citizens: " + util.NumberToString(curFans, '.')
|
sayCh <- "*\n[SC] Star Citizens: " + util.NumberToString(curFans, '.')
|
||||||
}
|
}
|
||||||
if curFleet >= nextFleet {
|
if curFleet >= nextFleet {
|
||||||
sayCh <- "*\n*** [SC] The UEE Fleet: " + util.NumberToString(curFleet, '.')
|
sayCh <- "*\n[SC] The UEE Fleet: " + util.NumberToString(curFleet, '.')
|
||||||
}
|
}
|
||||||
if curFunds >= nextFunds {
|
if curFunds >= nextFunds {
|
||||||
sayCh <- "*\n*** [SC] Funds raised: " + util.NumberToString(curFunds, '.')
|
sayCh <- "*\n[SC] Funds raised: " + util.NumberToString(curFunds, '.')
|
||||||
}
|
}
|
||||||
|
|
||||||
fans = curFans
|
fans = curFans
|
||||||
|
|
Loading…
Reference in New Issue