Merge pull request #345 from maxpoulin64/no-blank
Don't send completely empty messages
This commit is contained in:
commit
11465577c0
@ -604,11 +604,18 @@ $(function() {
|
||||
form.on("submit", function(e) {
|
||||
e.preventDefault();
|
||||
var text = input.val();
|
||||
|
||||
if (text.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
input.val("");
|
||||
|
||||
if (text.indexOf("/clear") === 0) {
|
||||
clear();
|
||||
return;
|
||||
}
|
||||
|
||||
socket.emit("input", {
|
||||
target: chat.data("id"),
|
||||
text: text
|
||||
|
@ -9,6 +9,11 @@ exports.input = function(network, chan, cmd, args) {
|
||||
}
|
||||
|
||||
var msg = args.join(" ");
|
||||
|
||||
if (msg.length === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
irc.say(target, msg);
|
||||
|
||||
if (!network.irc.network.cap.isEnabled("echo-message")) {
|
||||
|
Loading…
Reference in New Issue
Block a user