Minor changes

This commit is contained in:
Mattias Erming 2014-05-29 18:01:20 -07:00
parent f33670954d
commit acdd7bcbcb
3 changed files with 16 additions and 4 deletions

View File

@ -213,7 +213,13 @@ button {
#chat .row span { #chat .row span {
display: table-cell; display: table-cell;
padding-top: 2px; padding-top: 2px;
padding-bottom: 3px; padding-bottom: 2px;
}
#chat .row:first-child span {
padding-top: 6px;
}
#chat .row:last-child span {
padding-bottom: 6px;
} }
#chat .row:hover .time { #chat .row:hover .time {
color: #aaa; color: #aaa;

View File

@ -55,7 +55,6 @@ $(function() {
function event(e, data) { function event(e, data) {
switch (e) { switch (e) {
case "join": case "join":
console.log(render("windows", {windows: [data.chan]}));
chat.append(render("windows", {windows: [data.chan]})) chat.append(render("windows", {windows: [data.chan]}))
.find(".window") .find(".window")
.last() .last()

View File

@ -405,10 +405,17 @@ function event(e, data) {
case "mode": case "mode":
var chan = _.findWhere(channels, {name: data.target}); var chan = _.findWhere(channels, {name: data.target});
if (typeof chan !== "undefined") { if (typeof chan !== "undefined") {
this.client.write("NAMES " + data.target); clearTimeout(this.timer);
this.timer = setTimeout((function() {
this.client.write("NAMES " + data.target);
}).bind(this), 200);
var nick = data.nick;
if (nick.indexOf(".") !== -1) {
nick = data.target;
}
var msg = new Msg({ var msg = new Msg({
type: "mode", type: "mode",
from: data.nick, from: nick,
text: data.mode + " " + data.client, text: data.mode + " " + data.client,
}); });
chan.messages.push(msg); chan.messages.push(msg);