mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-14 16:17:17 +03:00
/help: Improve help for /ignore and /theme
This commit is contained in:
parent
635a21d754
commit
981376f018
@ -179,8 +179,8 @@ func InitCommands(c *Commands) {
|
|||||||
|
|
||||||
c.Add(Command{
|
c.Add(Command{
|
||||||
Prefix: "/theme",
|
Prefix: "/theme",
|
||||||
PrefixHelp: "[mono|colors]",
|
PrefixHelp: "[colors|...]",
|
||||||
Help: "Set your color theme. (More themes: solarized, hacker)",
|
Help: "Set your color theme. (More themes: solarized, mono, hacker)",
|
||||||
Handler: func(room *Room, msg message.CommandMsg) error {
|
Handler: func(room *Room, msg message.CommandMsg) error {
|
||||||
user := msg.From()
|
user := msg.From()
|
||||||
args := msg.Args()
|
args := msg.Args()
|
||||||
@ -245,7 +245,7 @@ func InitCommands(c *Commands) {
|
|||||||
c.Add(Command{
|
c.Add(Command{
|
||||||
Prefix: "/ignore",
|
Prefix: "/ignore",
|
||||||
PrefixHelp: "[USER]",
|
PrefixHelp: "[USER]",
|
||||||
Help: "Ignore messages from USER, list ignored users without parameters.",
|
Help: "Hide messages from USER, /unignore USER to stop hiding.",
|
||||||
Handler: func(room *Room, msg message.CommandMsg) error {
|
Handler: func(room *Room, msg message.CommandMsg) error {
|
||||||
id := strings.TrimSpace(strings.TrimLeft(msg.Body(), "/ignore"))
|
id := strings.TrimSpace(strings.TrimLeft(msg.Body(), "/ignore"))
|
||||||
if id == "" {
|
if id == "" {
|
||||||
@ -282,12 +282,11 @@ func InitCommands(c *Commands) {
|
|||||||
|
|
||||||
c.Add(Command{
|
c.Add(Command{
|
||||||
Prefix: "/unignore",
|
Prefix: "/unignore",
|
||||||
PrefixHelp: "[USER]",
|
PrefixHelp: "USER",
|
||||||
Help: "Stop ignoring USER.",
|
|
||||||
Handler: func(room *Room, msg message.CommandMsg) error {
|
Handler: func(room *Room, msg message.CommandMsg) error {
|
||||||
id := strings.TrimSpace(strings.TrimLeft(msg.Body(), "/unignore"))
|
id := strings.TrimSpace(strings.TrimLeft(msg.Body(), "/unignore"))
|
||||||
if id == "" {
|
if id == "" {
|
||||||
return errors.New("missing user id")
|
return errors.New("must specify user")
|
||||||
}
|
}
|
||||||
|
|
||||||
err := msg.From().Unignore(id)
|
err := msg.From().Unignore(id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user