Forward irc errors to the client, improve command validation and feedback, handle topic changes
This commit is contained in:
parent
993d29242e
commit
aa59e71745
17 changed files with 328 additions and 96 deletions
|
@ -223,20 +223,24 @@ export function broadcast(message, server, channels) {
|
|||
})), server);
|
||||
}
|
||||
|
||||
export function inform(message, server, channel) {
|
||||
export function print(message, server, channel, type) {
|
||||
if (Array.isArray(message)) {
|
||||
return addMessages(message.map(line => ({
|
||||
content: line,
|
||||
type: 'info'
|
||||
type
|
||||
})), server, channel);
|
||||
}
|
||||
|
||||
return addMessage({
|
||||
content: message,
|
||||
type: 'info'
|
||||
type
|
||||
}, server, channel);
|
||||
}
|
||||
|
||||
export function inform(message, server, channel) {
|
||||
return print(message, server, channel, 'info');
|
||||
}
|
||||
|
||||
export function runCommand(command, channel, server) {
|
||||
return {
|
||||
type: actions.COMMAND,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue