Translations update
[KiwiIRC.git] / server_modules / example.js
1 var kiwiModules = require('../server/modules');
2
3 var module = new kiwiModules.Module('Example Module');
4
5
6 // A web client is connected
7 module.on('client created', function(event, data) {
8 console.log('[client connection]', data);
9 });
10
11
12 // The Client recieves a IRC PRIVMSG command
13 module.on('irc message', function(event, data) {
14 console.log('[MESSAGE]', data.irc_event);
15 });
16
17 // The Client recieves a IRC USER NOTICE command
18 module.on('irc user notice', function(event, data) {
19 console.log('[NOTICE]', data.irc_event);
20 });
21
22 // The client recieves an IRC JOIN command
23 module.on('irc channel join', function(event, data) {
24 console.log('[JOIN]', data.irc_event);
25 });
26
27
28 // A command has been sent from the client
29 module.on('client command', function(event, data) {
30 var client_method = data.command.method;
31 var client_args = data.command.args;
32
33 console.log('[CLIENT COMMAND]', client_method);
34 console.log(' ', client_args);
35 });