Merge branch 'promise' of https://github.com/M2Ys4U/KiwiIRC into M2Ys4U-promise
[KiwiIRC.git] / server_modules / example.js
index d880c1914423709e6d9dbcb469d2eeae5e328ce6..a12f8ddb62b119de689b45502e2282d789e413a5 100644 (file)
@@ -6,22 +6,26 @@ var module = new kiwiModules.Module('Example Module');
 // A web client is connected
 module.on('client created', function(event, data) {
     console.log('[client connection]', data);
+    event.callback();
 });
 
 
 // The Client recieves a IRC PRIVMSG command
 module.on('irc message', function(event, data) {
        console.log('[MESSAGE]', data.irc_event);
+    event.callback();
 });
 
 // The Client recieves a IRC USER NOTICE command
 module.on('irc user notice', function(event, data) {
        console.log('[NOTICE]', data.irc_event);
+    event.callback();
 });
 
 // The client recieves an IRC JOIN command
 module.on('irc channel join', function(event, data) {
        console.log('[JOIN]', data.irc_event);
+    event.callback();
 });
 
 
@@ -32,4 +36,5 @@ module.on('client command', function(event, data) {
 
        console.log('[CLIENT COMMAND]', client_method);
        console.log('    ', client_args);
+    event.callback();
 });