Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- registerPlugin({
- name: 'Info Channel',
- version: '1.0',
- description: 'Info Channel',
- author: 'Henry_Vorragend aka Red_Romeo',
- engines: '>= 0.9.16',
- vars: [
- {
- name: 'infoUsers',
- title: 'Support Server Groups',
- type: 'array',
- vars: [
- {name: 'uid',title: 'User UID',type: 'string'},
- {name: 'name',title: 'User Name',type: 'string'},
- {
- name: 'infoChannels',
- title: 'Support Channels',
- type: 'array',
- vars: [
- {name: 'id',title: 'Channel',type: 'channel'}
- ]
- }
- ]
- }
- ]
- }, function(sinusbot, config) {
- var event = require('event');
- var backend = require('backend');
- event.on('clientMove', function(ev) {
- if(ev.toChannel != null){
- if(config.infoUsers != null){
- config.infoUsers.forEach(function(infoUser) {
- var client = backend.getClientByUID(infoUser.uid);
- if(client != null && infoUser.infoChannels != null){
- infoUser.infoChannels.forEach(function(infoChannel) {
- if(ev.toChannel.id() == infoChannel.id){
- client.chat("[b][color=blue][InfoChannel][/color] [color=green]" + client.name() + "[/color] wartet in [color=green]" + ev.toChannel.name() + "[/color][/b]");
- }
- });
- }
- });
- }
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement