Add rainbownotice command

This commit is contained in:
Tulir Asokan 2022-02-16 19:38:10 +02:00
parent 172d18470f
commit 6525f9ec66
2 changed files with 7 additions and 0 deletions

View File

@ -92,6 +92,7 @@ func NewCommandProcessor(parent *MainView) *CommandProcessor {
"mstate": {"msetstate"},
"rb": {"rainbow"},
"rbme": {"rainbowme"},
"rbn": {"rainbownotice"},
"myroomnick": {"roomnick"},
"createroom": {"create"},
"dm": {"pm"},
@ -166,6 +167,8 @@ func NewCommandProcessor(parent *MainView) *CommandProcessor {
"cprof": cmdCPUProfile,
"trace": cmdTrace,
"rainbownotice": cmdRainbowNotice,
"fingerprint": cmdFingerprint,
"devices": cmdDevices,
"verify-device": cmdVerifyDevice,

View File

@ -113,6 +113,10 @@ func cmdRainbowMe(cmd *Command) {
makeRainbow(cmd, event.MsgEmote)
}
func cmdRainbowNotice(cmd *Command) {
makeRainbow(cmd, event.MsgNotice)
}
func cmdNotice(cmd *Command) {
go cmd.Room.SendMessage(event.MsgNotice, strings.Join(cmd.Args, " "))
}