diff --git a/repl/set.go b/repl/set.go index ae87712fd86a922f1a036c3a758d832a0d96cdd7..b41e963ac23063c024828bce5dbb416afd6af0fc 100644 --- a/repl/set.go +++ b/repl/set.go @@ -69,6 +69,9 @@ func ActionSetNobrief(_ *dclish.Command) error { // ActionSetDefaultExpire handles the `SET DEFAULT_EXPIRE` command. func ActionSetDefaultExpire(cmd *dclish.Command) error { + if this.User.Admin == 0 { + return errors.New("You are not an admin") + } value, err := strconv.ParseInt(cmd.Args[0], 10, 64) if err != nil { return err @@ -79,7 +82,9 @@ func ActionSetDefaultExpire(cmd *dclish.Command) error { // ActionSetExpireLimit handles the `SET EXPIRE_LIMIT` command. func ActionSetExpireLimit(cmd *dclish.Command) error { - fmt.Println("TODO: implement ActionSetExpireLimit.") + if this.User.Admin == 0 { + return errors.New("You are not an admin") + } value, err := strconv.ParseInt(cmd.Args[0], 10, 64) if err != nil { return err