Skip to content

Commit

Permalink
bump socket.io
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearace committed Mar 3, 2015
1 parent 695b92c commit 9e7d67a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var forever = require("forever-monitor")
var fs = require("fs")

var child = new(forever.Monitor)("./lib/start.js", {
var child = new (forever.Monitor)("./lib/start.js", {
max: 21,
silent: false,
minUptime: 5000,
Expand Down Expand Up @@ -30,4 +30,4 @@ child.on("restart", function() {
})

child.start()
writeTimes()
writeTimes()
18 changes: 9 additions & 9 deletions lib/cytubebot.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ CytubeBot.prototype.blockVideo = function() {
// Returns true or false depending if they have that perm
// username - The user we're looking up
// rank - The rank the user should have
// permission - The permission to look up
// permission - The permission to look up
// callback - The callback function
CytubeBot.prototype.checkPermission = function(username, rank, permission, callback) {
var permData = {
Expand All @@ -312,7 +312,7 @@ CytubeBot.prototype.checkPermission = function(username, rank, permission, callb
};

// Checks if users have too many items on the playlist
// And if so, delete them
// And if so, delete them
CytubeBot.prototype.checkPlaylist = function() {
var bot = this
if (!this.stats["userLimit"])
Expand Down Expand Up @@ -460,10 +460,10 @@ CytubeBot.prototype.getQuote = function(nick) {
};

// Gets the Cytube socketIO port
// server - The input from config.json
// server - The input from config.json
CytubeBot.prototype.getSocketURL = function(server) {
var bot = this
var defaultReg = new RegExp("(https?:\/\/)?(.*:\d*)")
var defaultReg = /(https?:\/\/)?(.*:\d*)/

if (server.match(defaultReg)) {
this.logger.syslog.log("!~~~! Found socketIO info in config")
Expand Down Expand Up @@ -592,7 +592,7 @@ CytubeBot.prototype.handleChangeMedia = function(data) {
// Handles chatMsg frames from the server
// If the first character of the msg is $, we interpet it as a command.
// We ignore chat from before the bot was started, in order to avoid old
// commands.
// commands.
CytubeBot.prototype.handleChatMsg = function(data, pm) {
var bot = this
var username = data["username"]
Expand Down Expand Up @@ -685,7 +685,7 @@ CytubeBot.prototype.handleEmoteUpdate = function(emote) {
// Handles a change in hybridMods or calls sendHybridModPermissions if no permission
// is given.
// permission - The permission we are changing, or undefined if there is none
// name - name of the user we want to change permissions for, or look up
// name - name of the user we want to change permissions for, or look up
CytubeBot.prototype.handleHybridModPermissionChange = function(permission, name) {
var permData = {
permission: permission,
Expand Down Expand Up @@ -721,7 +721,7 @@ CytubeBot.prototype.handleLogin = function(data) {

// Handles mediaUpdate frames from the server
// If we are managing and the playlist only has one item
// and the video is about to end, we add a random video
// and the video is about to end, we add a random video
CytubeBot.prototype.handleMediaUpdate = function(data) {
console.log("#~~~# Current video time: " + data["currentTime"] + " Paused: " + data["paused"])

Expand Down Expand Up @@ -917,7 +917,7 @@ CytubeBot.prototype.listBlockedUsers = function() {

// Reads the persistent settings or has the callback write the defaults
// callback - callback function, used to write the persistent settings
// if they don't exist
// if they don't exist
CytubeBot.prototype.readPersistentSettings = function(callback) {
var bot = this
fs.readFile("persistent.json", function(err, data) {
Expand Down Expand Up @@ -1250,4 +1250,4 @@ CytubeBot.prototype.writePersistentSettings = function() {
process.exit(1)
}
})
};
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
},
"dependencies": {
"async": "~0.9.0",
"socket.io-client": "^1.3.3",
"socket.io-client": "^1.3.5",
"libxmljs": "~0.13.0",
"sqlite3": "~3.0.5",
"cleverbot-node": "",
"mstranslator": "",
"express": "~4.4.1",
"socket.io": "^1.3.3",
"socket.io": "^1.3.5",
"jade": "~1.3.1",
"forever-monitor": "~1.2.3",
"irc": "~0.3.9",
Expand Down
3 changes: 1 addition & 2 deletions www/js/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ google.setOnLoadCallback(function() {
pieSliceBorderColor: "#404040"
}


socket.on("roomStats", function(data) {
console.log(data)
$("h1").text(data["room"] + " Statistics")
Expand Down Expand Up @@ -116,4 +115,4 @@ google.setOnLoadCallback(function() {
})
socket.disconnect()
})
})
})

0 comments on commit 9e7d67a

Please sign in to comment.