registerPlugin({
name: 'Channel Move',
version: '1.0',
description: 'Simple move client script',
author: 'kanalumaddela ([email protected])',
vars: {
channelone: {
title: 'Channel to trigger moving client',
type: 'channel'
},
channeltwo: {
title: 'channel to move client to',
type: 'channel'
}
}
}, function(sinusbot, config) {
sinusbot.log('Channel Move - Loading...');
sinusbot.log('Channel Move - Channel to move from: ' + config.channelone);
sinusbot.log('Channel Move - Channel to move client to: ' + config.channeltwo);
sinusbot.on('clientMove', function(ev) {
if (ev.newChannel == config.channelone) {
sinusbot.move(ev.clientId, config.channeltwo);
return;
}
});
sinusbot.log('Channel Move - Loaded!.');
});