Browse Source

dem +fixes

Sorunome 10 years ago
parent
commit
b332adae22
2 changed files with 5 additions and 6 deletions
  1. 1 2
      app/OmnomIRC.js
  2. 4 4
      app/www/data/plugins/test/script.js

+ 1 - 2
app/OmnomIRC.js

@@ -103,8 +103,8 @@ var fs = require('fs'),
 			if(options.origins[i][1] == name){
 				return i;
 			}
-			return 0;
 		}
+		return 0;
 	};
 if(typeof fs.existsSync == 'undefined') fs.existsSync = path.existsSync; // legacy support
 if(cluster.isMaster){
@@ -426,7 +426,6 @@ if(cluster.isMaster){
 				}
 			},
 			message = function(room,from,message,origin,socket){
-				console.log('sending');
 				if(typeof socket == 'undefined'){
 					socket = io.sockets.in(room);
 				}

+ 4 - 4
app/www/data/plugins/test/script.js

@@ -1,12 +1,12 @@
-hook('message',function(msg,from,room,source){
+hook('message',function(msg,from,room,origin){
 	if(msg =='funny'){
 		$o.event('test','yay');
-		$o.chat.send(source,room);
+		$o.chat.send(origin,room);
 	}
 });
-hook('send',function(msg,room){
+/*hook('send',function(msg,room){
 	return msg.toLowerCase()!='the game';
-});
+});*/
 hook('start',function(){
 	$('body').show();
 });