mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +01:00
Implement commands /warn and /wall.
This commit is contained in:
parent
ed531cefc2
commit
d98c9b95b2
1 changed files with 20 additions and 0 deletions
|
@ -1828,6 +1828,26 @@ commands.mute = {
|
||||||
f: userMessage,
|
f: userMessage,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
commands.warn = {
|
||||||
|
parameters: 'user message',
|
||||||
|
description: 'send a warning to a user',
|
||||||
|
predicate: operatorPredicate,
|
||||||
|
f: (c, r) => {
|
||||||
|
userMessage('warning', r);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
commands.wall = {
|
||||||
|
parameters: 'message',
|
||||||
|
description: 'send a warning to all users',
|
||||||
|
predicate: operatorPredicate,
|
||||||
|
f: (c, r) => {
|
||||||
|
if(!r)
|
||||||
|
throw new Error('empty message');
|
||||||
|
serverConnection.userMessage(getUsername(), 'warning', '', r);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
function handleInput() {
|
function handleInput() {
|
||||||
let input = /** @type {HTMLTextAreaElement} */
|
let input = /** @type {HTMLTextAreaElement} */
|
||||||
(document.getElementById('input'));
|
(document.getElementById('input'));
|
||||||
|
|
Loading…
Reference in a new issue