Commit | Line | Data |
---|---|---|
ae64bf07 | 1 | var kiwiModules = require('../server/modules'); |
1920a38e | 2 | |
ae64bf07 | 3 | var module = new kiwiModules.Module('Example Module'); |
1920a38e D |
4 | |
5 | ||
6c7b2006 D |
6 | // A web client is connected |
7 | module.on('client created', function(event, data) { | |
8 | console.log('[client connection]', data); | |
1920a38e D |
9 | }); |
10 | ||
11 | ||
6c7b2006 D |
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 | ||
ba710c22 K |
17 | // The Client recieves a IRC USER NOTICE command |
18 | module.on('irc user notice', function(event, data) { | |
01fe2bfa K |
19 | console.log('[NOTICE]', data.irc_event); |
20 | }); | |
6c7b2006 D |
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 | }); |