Added MOTD messages

This commit is contained in:
Mattias Erming 2014-09-11 10:24:32 -07:00
parent b1217aa416
commit 666f21cd66
6 changed files with 25 additions and 16 deletions

File diff suppressed because one or more lines are too long

View File

@ -514,9 +514,10 @@ button {
color: #f00; color: #f00;
} }
#chat.hide-join .join span, #chat.hide-join .join span,
#chat.hide-mode .mode span,
#chat.hide-motd .motd span,
#chat.hide-nick .nick span, #chat.hide-nick .nick span,
#chat.hide-part .part span, #chat.hide-part .part span,
#chat.hide-mode .mode span,
#chat.hide-quit .quit span { #chat.hide-quit .quit span {
display: none !important; display: none !important;
} }

View File

@ -135,6 +135,12 @@
Show joins Show joins
</label> </label>
</div> </div>
<div class="col-sm-6">
<label class="opt">
<input type="checkbox" name="motd">
Show motd
</label>
</div>
<div class="col-sm-6"> <div class="col-sm-6">
<label class="opt"> <label class="opt">
<input type="checkbox" name="nick"> <input type="checkbox" name="nick">

View File

@ -250,6 +250,7 @@ $(function() {
var options = $.extend({ var options = $.extend({
join: true, join: true,
mode: true, mode: true,
motd: false,
nick: true, nick: true,
notification: true, notification: true,
part: true, part: true,
@ -269,9 +270,10 @@ $(function() {
$.cookie("settings", options); $.cookie("settings", options);
if ([ if ([
"join", "join",
"mode",
"motd",
"nick", "nick",
"part", "part",
"mode",
"quit", "quit",
].indexOf(name) !== -1) { ].indexOf(name) !== -1) {
chat.toggleClass("hide-" + name, !self.prop("checked")); chat.toggleClass("hide-" + name, !self.prop("checked"));

View File

@ -1,7 +1,7 @@
{ {
"name": "shout", "name": "shout",
"description": "A web IRC client", "description": "A web IRC client",
"version": "0.23.2", "version": "0.23.3",
"author": "Mattias Erming", "author": "Mattias Erming",
"preferGlobal": true, "preferGlobal": true,
"bin": { "bin": {

View File

@ -3,17 +3,17 @@ var Msg = require("../../models/msg");
module.exports = function(irc, network) { module.exports = function(irc, network) {
var client = this; var client = this;
irc.on("motd", function(data) { irc.on("motd", function(data) {
//var lobby = network.channels[0]; var lobby = network.channels[0];
//data.motd.forEach(function(text) { data.motd.forEach(function(text) {
// var msg = new Msg({ var msg = new Msg({
// type: Msg.Type.MOTD, type: Msg.Type.MOTD,
// text: text text: text
// }); });
// lobby.messages.push(msg); lobby.messages.push(msg);
// client.emit("msg", { client.emit("msg", {
// chan: lobby.id, chan: lobby.id,
// msg: msg msg: msg
// }); });
//}); });
}); });
}; };