You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.8 KiB
47 lines
1.8 KiB
diff --git a/src/libs/InputHandler.js b/src/libs/InputHandler.js
|
|
index 0f18b283..7dd54602 100644
|
|
--- a/src/libs/InputHandler.js
|
|
+++ b/src/libs/InputHandler.js
|
|
@@ -199,31 +199,6 @@ inputCommands.action = function inputCommandMsg(event, command, line) {
|
|
inputCommands.notice = function inputCommandMsg(event, command, line) {
|
|
handleMessage.call(this, 'notice', event, command, line);
|
|
};
|
|
-inputCommands.dice = function inputCommandDice(event, command, line) {
|
|
- // /dice 100
|
|
-
|
|
- event.handled = true;
|
|
- let buffer = this.state.getActiveBuffer();
|
|
- let network = this.state.getActiveNetwork();
|
|
-
|
|
- let sides = line.replace(/\D/g, '');
|
|
- sides = parseInt(sides || '0', 10);
|
|
- if (sides <= 0) {
|
|
- sides = 6;
|
|
- }
|
|
- let rndNumber = Math.floor(Math.random() * sides) + 1;
|
|
-
|
|
- let msg = TextFormatting.t('dice_roll', {
|
|
- sides: TextFormatting.formatNumber(sides),
|
|
- number: TextFormatting.formatNumber(rndNumber),
|
|
- });
|
|
- network.ircClient.action(buffer.name, msg);
|
|
- this.state.addMessage(buffer, {
|
|
- nick: network.nick,
|
|
- message: msg,
|
|
- type: 'action',
|
|
- });
|
|
-};
|
|
|
|
inputCommands.ctcp = function inputCommandCtcp(event, command, line) {
|
|
event.handled = true;
|
|
diff --git a/src/res/autocompleteCommands.js b/src/res/autocompleteCommands.js
|
|
index 64111754..0113af40 100644
|
|
--- a/src/res/autocompleteCommands.js
|
|
+++ b/src/res/autocompleteCommands.js
|
|
@@ -27,5 +27,5 @@ export default [
|
|
{ command: 'encoding', alias: [], description: 'locale_id_command_encoding' },
|
|
{ command: 'ignore', alias: [], description: 'locale_id_command_ignore' },
|
|
{ command: 'unignore', alias: [], description: 'locale_id_command_unignore' },
|
|
- { command: 'dice', alias: [], description: 'locale_id_command_dice' },
|
|
+
|
|
];
|
|
|