var module = new kiwiModules.Module('Example Module');
-module.on('client:connected', function(event, data) {
- console.log('Client connection:', data);
+// A web client is connected
+module.on('client created', function(event, data) {
+ console.log('[client connection]', data);
+ event.callback();
});
-module.on('client:commands:msg', function(event, data) {
- console.log('Client msg:', data.args.target, ': ', data.args.msg);
- data.args.msg += ' - modified!';
-});
\ No newline at end of file
+// 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();
+});
+
+
+// A command has been sent from the client
+module.on('client command', function(event, data) {
+ var client_method = data.command.method;
+ var client_args = data.command.args;
+
+ console.log('[CLIENT COMMAND]', client_method);
+ console.log(' ', client_args);
+ event.callback();
+});