var client module.exports.init = function(myClient) { client = myClient } module.exports.setTopic = function(channel, topic) { client.raw("TOPIC", channel, topic); } module.exports.joinChannel = function (channel, sendJoin) { var channelObj = client.channel(channel); if (sendJoin) { channelObj.join(); channelObj.say("beep"); } chanId = $(".active.chat").attr("data-id") $(".active").removeClass("active"); $(".ui.menu").append(""+channel+""); $("#chan-container").append("
"); var chanTab = $("[data-tab='"+ channel +"'].tab"); chanTab.append("
"); chanTab.append("
"); chanTab.append("
"); $('.menu .item').tab({history:false}); numChans++; }