OK, turing.

<- leave blank

Thu Dec 13 10:48:22 EST 2018

diff --git a/grid/gridorc b/grid/gridorc
--- a/grid/gridorc
+++ b/grid/gridorc
@@ -2,7 +2,7 @@
 # user facing grid orchestration helper

 rfork
-griduser=()
+griduser=$user
 while (~ $1 -*){
	switch($1){
	case -u


Thu Dec 13 10:48:02 EST 2018
diff --git a/grid/gridorc b/grid/gridorc
--- a/grid/gridorc
+++ b/grid/gridorc
@@ -2,7 +2,7 @@
 # user facing grid orchestration helper

 rfork
-griduser=()
+griduser=$user
 while (~ $1 -*){
	switch($1){
	case -u


Thu Dec 13 10:47:39 EST 2018
diff --git a/grid/gridorc b/grid/gridorc
--- a/grid/gridorc
+++ b/grid/gridorc
@@ -2,7 +2,7 @@
 # user facing grid orchestration helper

 rfork
-griduser=()
+griduser=$user
 while (~ $1 -*){
	switch($1){
	case -u


Thu Dec 13 06:46:52 EST 2018
hello

Thu Dec 13 06:37:06 EST 2018


Wed Dec 12 22:20:15 EST 2018
diff -r b8994b5bf91c helper.go
--- a/helper.go Sat Nov 17 01:01:45 2018 -0600
+++ b/helper.go Wed Dec 12 22:19:39 2018 -0700
@@ -1,9 +1,11 @@
 package main

 import (
+ "io"
	"log"
	"os"
	"os/exec"
+ "runtime"
	"strings"
	"time"
	"fmt"
@@ -67,6 +69,9 @@

 //Notify uses Notify-Send from libnotify to send a notification when a mention
 arrives.
 func Notify(m *discordgo.Message) {
+ if *enableNotify == false {
+ return
+ }
	Channel, err := State.Session.DiscordGo.Channel(m.ChannelID)
	if err != nil {
		Msg(ErrorMsg, "(NOT) Channel Error: %s\n", err)
@@ -76,24 +81,43 @@
		Msg(ErrorMsg, "(NOT) Guild Error: %s\n", err)
	}
	Title := "@" + m.Author.Username + " : " + Guild.Name + "/" + Channel.Name
- cmd := exec.Command("notify-send", Title, m.ContentWithMentionsReplaced())
- err = cmd.Start()
- if err != nil {
- Msg(ErrorMsg, "(NOT) Check if libnotify is installed, or disable
notifications.\n")
+ switch runtime.GOOS {
+ case "plan9":
+ pr, pw := io.Pipe()
+ cmd := exec.Command("/bin/aux/statusmsg", "-k", *notifyFlag, Title)
+ cmd.Stdin = pr
+ go func() {
+ defer pw.Close()
+ fmt.Fprintf(pw, "%s\n", m.ContentWithMentionsReplaced())
+ cmd.Wait()
+ }()
+ err = cmd.Start()
+ if err != nil {
+ Msg(ErrorMsg, "%s\n", err)
+ }
+
+ default:
+ cmd := exec.Command("notify-send", Title, m.ContentWithMentionsReplaced())
+ err = cmd.Start()
+ if err != nil {
+ Msg(ErrorMsg, "(NOT) Check if libnotify is installed, or disable
notifications.\n")
+ }
	}

+
 }

 //MessagePrint prints one correctly formatted Message to stdout
 func MessagePrint(Time, Username, Content string) {
	//var Color color.Attribute
	log.SetFlags(0)
- if *timeStamp {
+ if *hideTimeStamp {
+ log.Printf("%s > %s\n", Username, Content)
+ } else {
		TimeStamp, _ := time.Parse(time.RFC3339, Time)
		LocalTime := TimeStamp.Local().Format("2006/01/02 15:04:05")
		log.Printf("%s > %s > %s\n", LocalTime, Username, Content)
- } else {
- log.Printf("%s > %s\n", Username, Content)
+
	}
	log.SetFlags(log.LstdFlags)
 }
diff -r b8994b5bf91c main.go
--- a/main.go Sat Nov 17 01:01:45 2018 -0600
+++ b/main.go Wed Dec 12 22:19:39 2018 -0700
@@ -34,7 +34,9 @@
 //MsgType is a string containing global message type
 type MsgType string

-var timeStamp = flag.Bool("t", true, "Hide timestamps in channel log")
+var hideTimeStamp = flag.Bool("t", false, "Hide timestamps in channel log")
+var enableNotify = flag.Bool("n", false, "Enable notifications")
+var notifyFlag = flag.String("w", "10,10,260,90", "Dimensions to pass through to
statusmsg")

 func main() {

@@ -43,6 +45,9 @@
		flag.Usage()
		os.Exit(1)
	}
+ if flag.Lookup("w") != nil {
+ *notifyFlag = fmt.Sprintf("-w %s", *notifyFlag)
+ }
	//Initialize Config
	GetConfig()
	CheckState()


Wed Dec 12 09:48:55 EST 2018
no.  why do you ask.

Wed Dec 12 03:28:50 EST 2018
is this here

Wed Dec 12 00:05:10 EST 2018
diff -r 0c163a8589a6 sys/src/cmd/upas/fs/fs.c
--- a/sys/src/cmd/upas/fs/fs.c Mon Dec 10 05:18:05 2018 +0000
+++ b/sys/src/cmd/upas/fs/fs.c Tue Dec 11 21:05:10 2018 -0800
@@ -679,12 +679,14 @@
	case Qraw:
		cacheheaders(mb, m);
		p = m->start;
+ if(p)
		if(strncmp(m->start, "From ", 5) == 0)
		if(e = strchr(p, '\n'))
			p = e + 1;
		d->name = dirtab[t];
- d->length = m->size - (p - m->start);
- putcache(mb, m);
+ d->length = p ? m->size - (p - m->start) : 0;
+ if(p)
+ putcache(mb, m);
		break;
	case Qrawbody:
		d->name = dirtab[t];


Wed Dec 12 00:04:53 EST 2018
diff -r 0c163a8589a6 sys/src/cmd/upas/fs/fs.c
--- a/sys/src/cmd/upas/fs/fs.c Mon Dec 10 05:18:05 2018 +0000
+++ b/sys/src/cmd/upas/fs/fs.c Tue Dec 11 21:04:53 2018 -0800
@@ -679,11 +679,12 @@
	case Qraw:
		cacheheaders(mb, m);
		p = m->start;
+ if(p)
		if(strncmp(m->start, "From ", 5) == 0)
		if(e = strchr(p, '\n'))
			p = e + 1;
		d->name = dirtab[t];
- d->length = m->size - (p - m->start);
+ d->length = p ? m->size - (p - m->start) : 0;
		putcache(mb, m);
		break;
	case Qrawbody:


Wed Dec 12 00:03:57 EST 2018
diff -r 0c163a8589a6 sys/src/cmd/upas/fs/fs.c
--- a/sys/src/cmd/upas/fs/fs.c Mon Dec 10 05:18:05 2018 +0000
+++ b/sys/src/cmd/upas/fs/fs.c Tue Dec 11 21:03:55 2018 -0800
@@ -679,11 +679,12 @@
	case Qraw:
		cacheheaders(mb, m);
		p = m->start;
+ if(p)
		if(strncmp(m->start, "From ", 5) == 0)
		if(e = strchr(p, '\n'))
			p = e + 1;
		d->name = dirtab[t];
- d->length = m->size - (p - m->start);
+ d->length = p ? m->size - (p - m->start) : 0;
		putcache(mb, m);
		break;
	case Qrawbody:


prev | next