|
@@ -1398,6 +1398,11 @@ func nsCertHandler(service *ircService, server *Server, client *Client, command
|
1398
|
1398
|
case "add", "del":
|
1399
|
1399
|
if 2 <= len(params) {
|
1400
|
1400
|
target, certfp = params[0], params[1]
|
|
1401
|
+ if cftarget, err := CasefoldName(target); err == nil && client.Account() == cftarget {
|
|
1402
|
+ // If the target is equal to the account, then the user accidentally invoked operator
|
|
1403
|
+ // syntax (cert add mynick <fp>) instead of self syntax (cert add <fp>).
|
|
1404
|
+ target = ""
|
|
1405
|
+ }
|
1401
|
1406
|
} else if len(params) == 1 {
|
1402
|
1407
|
certfp = params[0]
|
1403
|
1408
|
} else if len(params) == 0 && verb == "add" && rb.session.certfp != "" {
|