Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnewhall committed Sep 15, 2019
1 parent df47842 commit d6ac99a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
1 change: 0 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions chat/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,40 @@ func (c *Chat) NonAdminCommands() *CommandMap {
Title: "User",
Level: 1,
Map: map[string]Command{
"cams": Command{
"cams": {
Description: "Displays all available cameras by name.",
Run: c.cmdCams,
Save: false,
},
"events": Command{
"events": {
Description: "Displays all available events.",
Run: c.cmdEvents,
Save: false,
},
"subs": Command{
"subs": {
Description: "Shows your subscriptions.",
Run: c.cmdSubs,
Save: false,
},
"sub": Command{
"sub": {
Usage: "<camera|event>",
Description: "Enables notifications from <camera> or <event>.",
Run: c.cmdSub,
Save: true,
},
"unsub": Command{
"unsub": {
Usage: "<cam|event>",
Description: "Stops notifications from <cam>, or <event> or everything if '*' is passed.",
Run: c.cmdUnsub,
Save: true,
},
"stop": Command{
"stop": {
Usage: "[mins] [camera]",
Description: "Stops all motion notifications for 10 minutes or [mins] on all cameras or [camera].",
Run: c.cmdStop,
Save: true,
},
"pics": Command{
"pics": {
Usage: "[camera]",
Description: "Sends pictures from all cameras, or from [camera].",
Run: c.cmdPics,
Expand Down
14 changes: 7 additions & 7 deletions chat/commands_admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,41 @@ func (c *Chat) AdminCommands() *CommandMap {
Title: "Admin",
Level: 10,
Map: map[string]Command{
"subs": Command{
"subs": {
Usage: "[subscriber]",
Description: "Displays all subscribers.",
Run: c.cmdAdminSubs,
Save: false,
},
"ignores": Command{
"ignores": {
Description: "Displays all ignored subscribers.",
Run: c.cmdAdminIgnores,
Save: false,
},
"ignore": Command{
"ignore": {
Usage: "<subscriber>",
Description: "Ignores a subscriber.",
Run: c.cmdAdminIgnore,
Save: true,
},
"unignore": Command{
"unignore": {
Usage: "<subscriber>",
Description: "Removes a subscriber's ignore.",
Run: c.cmdAdminUnignore,
Save: true,
},
"admins": Command{
"admins": {
Description: "Displays all administrative subscribers.",
Run: c.cmdAdminAdmins,
Save: false,
},
"admin": Command{
"admin": {
Usage: "<subscriber>",
Description: "Gives a subscriber administrative access.",
Run: c.cmdAdminAdmin,
Save: true,
},
"unadmin": Command{
"unadmin": {
Usage: "<subscriber>",
Description: "Removes a subscriber's administrative access.",
Run: c.cmdAdminUnadmin,
Expand Down
3 changes: 2 additions & 1 deletion cli/imessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ func (m *Motifini) recviMessageHandler(msg imessage.Incoming) {
Text: strings.Fields(msg.Text),
From: msg.From,
}
m.MReq.Printf("[%s] iMessage Received from %s (admin:%v, ignored:%v), size: %d, cmd: %s", h.ID, msg.From, sub.Admin, sub.Ignored, len(msg.Text), h.Text[0])
m.MReq.Printf("[%s] iMessage Received from %s (admin:%v, ignored:%v), size: %d, cmd: %s",
h.ID, msg.From, sub.Admin, sub.Ignored, len(msg.Text), h.Text[0])
resp := m.Chat.HandleCommand(h)
// Send the reply as files and/or text.
if resp.Reply != "" {
Expand Down

0 comments on commit d6ac99a

Please sign in to comment.