1 var kiwiModules
= require('../server/modules');
3 var module
= new kiwiModules
.Module('Example Module');
6 // A web client is connected
7 module
.on('client created', function(event
, data
) {
8 console
.log('[client connection]', data
);
12 // The Client recieves a IRC PRIVMSG command
13 module
.on('irc message', function(event
, data
) {
14 console
.log('[MESSAGE]', data
.irc_event
);
18 // The client recieves an IRC JOIN command
19 module
.on('irc channel join', function(event
, data
) {
20 console
.log('[JOIN]', data
.irc_event
);
24 // A command has been sent from the client
25 module
.on('client command', function(event
, data
) {
26 var client_method
= data
.command
.method
;
27 var client_args
= data
.command
.args
;
29 console
.log('[CLIENT COMMAND]', client_method
);
30 console
.log(' ', client_args
);