|
@@ -42,14 +42,13 @@ FORGET deletes all history messages sent by an account.`,
|
42
|
42
|
},
|
43
|
43
|
"delete": {
|
44
|
44
|
handler: histservDeleteHandler,
|
45
|
|
- help: `Syntax: $bDELETE [target] <msgid>$b
|
|
45
|
+ help: `Syntax: $bDELETE <target> <msgid>$b
|
46
|
46
|
|
47
|
|
-DELETE deletes an individual message by its msgid. The target is a channel
|
48
|
|
-name or nickname; depending on the history implementation, this may or may not
|
49
|
|
-be necessary to locate the message.`,
|
50
|
|
- helpShort: `$bDELETE$b deletes an individual message by its msgid.`,
|
|
47
|
+DELETE deletes an individual message by its msgid. The target is the channel
|
|
48
|
+name. The msgid is the ID as can be found in the tags of that message.`,
|
|
49
|
+ helpShort: `$bDELETE$b deletes an individual message by its target and msgid.`,
|
51
|
50
|
enabled: histservEnabled,
|
52
|
|
- minParams: 1,
|
|
51
|
+ minParams: 2,
|
53
|
52
|
maxParams: 2,
|
54
|
53
|
},
|
55
|
54
|
"export": {
|
|
@@ -94,12 +93,7 @@ func histservForgetHandler(service *ircService, server *Server, client *Client,
|
94
|
93
|
}
|
95
|
94
|
|
96
|
95
|
func histservDeleteHandler(service *ircService, server *Server, client *Client, command string, params []string, rb *ResponseBuffer) {
|
97
|
|
- var target, msgid string
|
98
|
|
- if len(params) == 1 {
|
99
|
|
- msgid = params[0]
|
100
|
|
- } else {
|
101
|
|
- target, msgid = params[0], params[1]
|
102
|
|
- }
|
|
96
|
+ target, msgid := params[0], params[1] // Fix #1881 2 params are required
|
103
|
97
|
|
104
|
98
|
// operators can delete; if individual delete is allowed, a chanop or
|
105
|
99
|
// the message author can delete
|