summaryrefslogtreecommitdiff
path: root/commands.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands.js')
-rw-r--r--commands.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/commands.js b/commands.js
index 138c55f..1847b74 100644
--- a/commands.js
+++ b/commands.js
@@ -5,14 +5,14 @@ module.exports.init = function(myClient) {
client = myClient
}
-function sendMsg(message, channel) {
+module.exports.sendMsg = function(message, channel) {
client.say(channel, message);
var chanTab = $("[data-tab='"+ channel +"'].chat");
- chanTab.append("<p class='chat-line'>&lt;" + myNick + "&gt; " + message +"</p>");
+ chanTab.append("<p class='chat-line'>&lt;" + globals.myNick + "&gt; " + message +"</p>");
chanTab.scrollTop(chanTab.prop("scrollHeight"));
}
-function sendPm(message, nick) {
+module.exports.sendPm = function(message, nick) {
var chanTab = $("[data-tab="+nick+"].tab");
$(".active").removeClass("active");
@@ -31,7 +31,7 @@ function sendPm(message, nick) {
var chatTab = $("[data-tab="+nick+"].chat");
console.log(nick + ': ' + message);
client.say(nick, message);
- chatTab.append("<p class='chat-line'>&lt;" + myNick + "&gt; " + message +"</p>");
+ chatTab.append("<p class='chat-line'>&lt;" + globals.myNick + "&gt; " + message +"</p>");
chatTab.scrollTop(chanTab.prop("scrollHeight"));
}