forked from x/icebergs
opt some
This commit is contained in:
parent
7e958b03fb
commit
1810041116
@ -151,8 +151,7 @@ func init() {
|
|||||||
func Opens(m *ice.Message, arg ...string) {
|
func Opens(m *ice.Message, arg ...string) {
|
||||||
if !tcp.IsLocalHost(m, m.Option(ice.MSG_USERIP)) {
|
if !tcp.IsLocalHost(m, m.Option(ice.MSG_USERIP)) {
|
||||||
return
|
return
|
||||||
}
|
} else if len(arg) == 0 || arg[0] == "" {
|
||||||
if len(arg) == 0 || arg[0] == "" {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
@ -173,11 +172,10 @@ func Opens(m *ice.Message, arg ...string) {
|
|||||||
func OpenCmds(m *ice.Message, arg ...string) *ice.Message {
|
func OpenCmds(m *ice.Message, arg ...string) *ice.Message {
|
||||||
if !tcp.IsLocalHost(m, m.Option(ice.MSG_USERIP)) {
|
if !tcp.IsLocalHost(m, m.Option(ice.MSG_USERIP)) {
|
||||||
return m
|
return m
|
||||||
}
|
} else if len(arg) == 0 || arg[0] == "" {
|
||||||
if len(arg) == 0 || arg[0] == "" {
|
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
TellApp(m, "Terminal", kit.Format(`do script %s`, strings.Join(arg, "; ")), "activate")
|
TellApp(m, "Terminal", kit.Format(`do script %q`, strings.Join(arg, "; ")), "activate")
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
func TellApp(m *ice.Message, app string, arg ...string) {
|
func TellApp(m *ice.Message, app string, arg ...string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user