From b1b831ff87c54c74bb084263005521115ead14d5 Mon Sep 17 00:00:00 2001 From: fumiama Date: Thu, 3 Jun 2021 20:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A5=E5=85=A5=E5=8F=82=E5=BD=A2=E5=BC=8F?= =?UTF-8?q?=E6=8C=87=E5=AE=9Asuperusers=E9=81=BF=E5=85=8D=E5=8F=8D?= =?UTF-8?q?=E5=A4=8D=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_mips.sh | 4 +++- main.go | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build_mips.sh b/build_mips.sh index df3fc57f..bf39b1e5 100644 --- a/build_mips.sh +++ b/build_mips.sh @@ -3,4 +3,6 @@ mips-linux-musl-gcc -v go env -w GOPROXY=https://goproxy.cn,direct go env -w GO111MODULE=auto go mod tidy -GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=1 CC=mips-linux-musl-gcc CXX=mips-linux-musl-g++ go build -ldflags "-s -w" -o zerobot \ No newline at end of file +export CCBIN=~/openwrt_with_lean_packages/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/bin/mips-openwrt-linux-musl-gcc +export CXXBIN=~/openwrt_with_lean_packages/staging_dir/toolchain-mips_24kc_gcc-8.4.0_musl/bin/mips-openwrt-linux-musl-g++ +GOOS=linux GOARCH=mips GOMIPS=softfloat CGO_ENABLED=1 CC=${CCBIN} CXX=${CXXBIN} go build -ldflags "-s -w" -o zerobot \ No newline at end of file diff --git a/main.go b/main.go index 84919165..716ff478 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "os" log "github.com/sirupsen/logrus" easy "github.com/t-tomalak/logrus-easy-formatter" @@ -47,7 +48,7 @@ func main() { zero.Run(zero.Config{ NickName: []string{"椛椛", "ATRI", "atri", "亚托莉", "アトリ"}, CommandPrefix: "/", - SuperUsers: []string{"825111790", "213864964"}, // 必须修改,否则无权限 + SuperUsers: os.Args[1:], // 必须修改,否则无权限 Driver: []zero.Driver{ driver.NewWebSocketClient("127.0.0.1", "6700", ""), },