By | fr33domlover |
At | 2016-01-20 |
Title | Give add-* and remove-* commands short X+ and X- names |
Description |
Edit file src/FunBot/Commands/Feeds.hs 33188 → 33188
63 63 else failBack mchan nick $ OtherFail "This label already exists."
64 64 respondAddFeed mchan nick args _send =
65 65 failBack mchan nick $ WrongNumArgsN (Just $ length args) (Just 2)
66 66 67 67 cmdAddFeed = Command
- 68 { cmdNames = cmds ["add-feed"]
+ 68 { cmdNames = cmds ["feed+", "add-feed"]
69 69 , cmdRespond = respondAddFeed
70 70 , cmdHelp =
- 71 "‘add-feed <label> <url>’ - add a news feed to watch and announce its \
+ 71 "‘feed+ <label> <url>’ - add a news feed to watch and announce its \
72 72 \new items to IRC channels. By default the list of IRC channels is \
73 73 \empty; use the settings system (!set) to set one or more channels to \
74 74 \which items will be announced."
75 75 , cmdExamples =
- 76 [ "add-feed freepost http://freepo.st/rss/freepost"
+ 76 [ "feed+ freepost http://freepo.st/rss/freepost"
77 77 ]
78 78 }
79 79 80 80 respondDeleteFeed
81 81 :: Maybe Channel
… … … … 90 90 else failBack mchan nick $ OtherFail "No such label found."
91 91 respondDeleteFeed mchan nick args _send =
92 92 failBack mchan nick $ WrongNumArgsN (Just $ length args) (Just 1)
93 93 94 94 cmdDeleteFeed = Command
- 95 { cmdNames = cmds ["delete-feed"]
+ 95 { cmdNames = cmds ["feed-", "delete-feed"]
96 96 , cmdRespond = respondDeleteFeed
97 97 , cmdHelp =
- 98 "‘delete-feed <label>’ - stop announcing items of the given news feed \
+ 98 "‘feed- <label>’ - stop announcing items of the given news feed \
99 99 \and remove its settings. If you just want to disable the feed, \
100 100 \without deleting the settings, use the settings system to deactivate \
101 101 \it."
102 102 , cmdExamples =
- 103 [ "delete-feed freepost"
+ 103 [ "feed- freepost"
104 104 ]
105 105 }
… … … … Edit file src/FunBot/Commands/Repos.hs 33188 → 33188
70 70 else failBack mchan nick $ OtherFail "Repo not found."
71 71 respondAddSpec mchan nick args _send =
72 72 failBack mchan nick $ WrongNumArgsN (Just $ length args) (Just 4)
73 73 74 74 cmdAddSpec = Command
- 75 { cmdNames = cmds ["add-spec"]
+ 75 { cmdNames = cmds ["spec+", "add-spec"]
76 76 , cmdRespond = respondAddSpec
77 77 , cmdHelp =
- 78 "‘add-spec <host> <space> <repo> <channel>’ - add a channel to which \
+ 78 "‘spec+ <host> <space> <repo> <channel>’ - add a channel to which \
79 79 \git repo events will be announced, with default settings"
80 80 , cmdExamples =
- 81 [ "add-spec notabug fr33domlover funbot #freepost"
+ 81 [ "spec+ notabug fr33domlover funbot #freepost"
82 82 ]
83 83 }
84 84 85 85 respondDeleteSpec
86 86 :: Maybe Channel
… … … … 115 115 _ -> failBack mchan nick $ InvalidArg (Just 3) (Just num)
116 116 respondDeleteSpec mchan nick args _send =
117 117 failBack mchan nick $ WrongNumArgsN (Just $ length args) (Just 3)
118 118 119 119 cmdDeleteSpec = Command
- 120 { cmdNames = cmds ["delete-spec"]
+ 120 { cmdNames = cmds ["spec-", "delete-spec"]
121 121 , cmdRespond = respondDeleteSpec
122 122 , cmdHelp =
- 123 "‘delete-spec <host> <space> <repo> <num>’ - remove a git event \
+ 123 "‘spec- <host> <space> <repo> <num>’ - remove a git event \
124 124 \announcement specification with the given index number (as found in \
125 125 \the settings tree, i.e. starting from 1) from the given repo."
126 126 , cmdExamples =
- 127 [ "delete-spec notabug fr33domlover oldstuff 1"
+ 127 [ "spec- notabug fr33domlover oldstuff 1"
128 128 ]
129 129 }
130 130 131 131 invalid :: Text -> Bool
132 132 invalid t = T.null t || T.any (== '/') t
… … … … 159 159 OtherFail "This repo is already registered."
160 160 respondAddRepo mchan nick args _send =
161 161 failBack mchan nick $ WrongNumArgsN (Just $ length args) (Just 4)
162 162 163 163 cmdAddRepo = Command
- 164 { cmdNames = cmds ["add-repo"]
+ 164 { cmdNames = cmds ["repo+", "add-repo"]
165 165 , cmdRespond = respondAddRepo
166 166 , cmdHelp =
- 167 "‘add-repo <host> <space> <repo> <channel>’ - add a repo to announce \
- 168 \its events in the given channel, with default settings."
+ 167 "‘repo+ <host> <space> <repo> <channel>’ - add a repo to announce its \
+ 168 \events in the given channel, with default settings."
169 169 , cmdExamples =
- 170 [ "add-repo notabug fr33domlover funbot #freepost"
+ 170 [ "repo+ notabug fr33domlover funbot #freepost"
171 171 ]
172 172 }
173 173 174 174 respondDeleteRepo
175 175 :: Maybe Channel
… … … … 188 188 else failBack mchan nick $ OtherFail "No such repo/owner pair found."
189 189 respondDeleteRepo mchan nick args _send =
190 190 failBack mchan nick $ WrongNumArgsN (Just $ length args) (Just 3)
191 191 192 192 cmdDeleteRepo = Command
- 193 { cmdNames = cmds ["delete-repo"]
+ 193 { cmdNames = cmds ["repo-", "delete-repo"]
194 194 , cmdRespond = respondDeleteRepo
195 195 , cmdHelp =
- 196 "‘delete-repo <host> <space> <repo>’ - stop announcing events for the \
- 197 \given repo and remove its settings."
+ 196 "‘repo- <host> <space> <repo>’ - stop announcing events for the given \
+ 197 \repo and remove its settings."
198 198 , cmdExamples =
- 199 [ "delete-repo notabug fr33domlover oldstuff"
+ 199 [ "repo- notabug fr33domlover oldstuff"
200 200 ]
201 201 }
… … … … Edit file src/FunBot/Commands/Shortcuts.hs 33188 → 33188
67 67 else send $ notchan $ Channel chan
68 68 respondAddShortcut mchan nick args _send =
69 69 failBack mchan nick $ WrongNumArgsN (Just $ length args) (Just 2)
70 70 71 71 cmdAddShortcut = Command
- 72 { cmdNames = cmds ["add-shortcut"]
+ 72 { cmdNames = cmds ["shortcut+", "add-shortcut"]
73 73 , cmdRespond = respondAddShortcut
74 74 , cmdHelp =
- 75 "‘add-shortcut <label> <channel>’ - add a shortcut to apply in the \
+ 75 "‘shortcut+ <label> <channel>’ - add a shortcut to apply in the \
76 76 \given channel, with default dummy settings. The label is just for \
77 77 \convenient reference; pick a short meaningful one."
78 78 , cmdExamples =
- 79 [ "add-shortcut issue #snowdrift"
+ 79 [ "shortcut+ issue #snowdrift"
80 80 ]
81 81 }
82 82 83 83 respondDeleteShortcut
84 84 :: Maybe Channel
… … … … 93 93 else failBack mchan nick $ OtherFail "No such shortcut found."
94 94 respondDeleteShortcut mchan nick args _send =
95 95 failBack mchan nick $ WrongNumArgsN (Just $ length args) (Just 1)
96 96 97 97 cmdDeleteShortcut = Command
- 98 { cmdNames = cmds ["delete-shortcut"]
+ 98 { cmdNames = cmds ["shortcut-", "delete-shortcut"]
99 99 , cmdRespond = respondDeleteShortcut
100 100 , cmdHelp =
- 101 "‘delete-shortcut <label>’ - remove the shortcut with the given label \
+ 101 "‘shortcut- <label>’ - remove the shortcut with the given label \
102 102 \completely. If you just want to change the channels in which it \
103 103 \applies, see the “shortcuts.<label>.channels” settings option."
104 104 , cmdExamples =
- 105 [ "delete-shortcut issue"
+ 105 [ "shortcut- issue"
106 106 ]
107 107 }
… … … … Edit file src/FunBot/Commands/UserOptions.hs 33188 → 33188
106 106 else send $ notchan $ Channel chan
107 107 respondHistory _enable Nothing nick args _send =
108 108 failToUser nick $ WrongNumArgsN (Just $ length args) (Just 1)
109 109 110 110 cmdEnableHistory = Command
- 111 { cmdNames = cmds ["enable-history"]
+ 111 { cmdNames = cmds ["history+", "enable-history"]
112 112 , cmdRespond = respondHistory True
113 113 , cmdHelp =
- 114 "‘enable-history <channel>’ - enable automatic history private \
- 115 \display for the given channel."
+ 114 "‘history+ <channel>’ - enable automatic history private display for \
+ 115 \the given channel."
116 116 , cmdExamples =
- 117 [ "enable-history #snowdrift"
+ 117 [ "history+ #snowdrift"
118 118 ]
119 119 }
120 120 121 121 cmdDisableHistory = Command
- 122 { cmdNames = cmds ["disable-history"]
+ 122 { cmdNames = cmds ["history-", "disable-history"]
123 123 , cmdRespond = respondHistory False
124 124 , cmdHelp =
- 125 "‘disable-history <channel>’ - disable automatic history private \
- 126 \display for the given channel."
+ 125 "‘history- <channel>’ - disable automatic history private display for \
+ 126 \the given channel."
127 127 , cmdExamples =
- 128 [ "disable-history #snowdrift-test"
+ 128 [ "history- #snowdrift-test"
129 129 ]
130 130 }
131 131 132 132 respondSetLines
133 133 :: Maybe Channel
… … … …