mirror of
https://github.com/jech/galene.git
synced 2024-11-10 02:35: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,
|
||||
};
|
||||
|
||||
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() {
|
||||
let input = /** @type {HTMLTextAreaElement} */
|
||||
(document.getElementById('input'));
|
||||
|
|
Loading…
Reference in a new issue