~kris/9p

disco

69b08b0a81594d6353a756ee19789740c52421cd — Sean Hinchee 9 years ago 921f786
adding debug
2 files changed, 9 insertions(+), 13 deletions(-)

M config.go
M helper.go
M config.go => config.go +9 -2
@@ 77,11 77,18 @@ func CreateConfig() {
	password := "";
	
	if plan9 {
		password = GetPass()
		
		cons, err := os.OpenFile("/dev/cons", os.O_RDWR, 0600)
		if err != nil {
			fmt.Println("Failed to open /dev/cons")
		}
		consScan := bufio.NewScanner(cons)
		consScan.Scan()
		password = consScan.Text()
	
		err = RawOff()
		if err != nil {
			fmt.Println("Failed to set rawoff")
			fmt.Print(err, "\n")
		}
	} else {
		/* Maybe put linux terminal raw mode in here one day */

M helper.go => helper.go +0 -11
@@ 8,7 8,6 @@ import (
	"time"
	"fmt"
	"bitbucket.org/henesy/disco/DiscordGo"
	"bufio"
)

//HexColor is a struct gives RGB values


@@ 129,13 128,3 @@ func RawOff() error {
	
	return nil
}

func GetPass() string {
	cons, err := os.OpenFile("/dev/cons", os.O_RDWR, 0600)
	if err != nil {
		fmt.Println("Failed to open /dev/cons")
	}
	consScan := bufio.NewScanner(cons)
	consScan.Scan()
	return consScan.Text()
}