Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- registerPlugin({
- name: 'RegisterBOT',
- version: '1.0',
- description: 'Automicaly register bot',
- author: 'Sebak17',
- vars: {
- channel: {
- title: 'Channel:',
- type: 'channel'
- },
- gman: {
- title: 'The ServerGroupID - Man',
- type: 'number'
- },
- gwomen: {
- title: 'The ServerGroupID - Women',
- type: 'number'
- },
- msg1: {
- title: 'Message(Without rang)',
- type: 'string'
- placeholder: "Message 1"
- },
- msg2: {
- title: 'Message(With rang)',
- type: 'string'
- placeholder: "Message 2"
- }
- }
- }, function (sinusbot, config, info) {
- var channel = config.channel;
- var message1 = config.msg1;
- var message2 = config.msg2;
- var gm = config.gm;
- var gw = config.gw;
- var clientgroups = JSON.stringify(ev.clientServerGroups);
- sinusbot.on('clientMove', function(ev){
- if (ev.newChannel == channel){
- if (clientgroups.indexOf(gm) > -1){
- //YES
- if (clientgroups.indexOf(gw) > -1){
- //YES
- sinusbot.chatPrivate(ev.clientId, message2);
- }else{
- //NO
- sinusbot.chatPrivate(ev.clientId, message2);
- }
- }else{
- //NO
- if (clientgroups.indexOf(gw) > -1){
- //YES
- sinusbot.chatPrivate(ev.clientId, message2);
- }else{
- //NO
- sinusbot.chatPrivate(ev.clientId, message1);
- }
- }
- }
- });
- sinusbot.on('chat', function(ev) {
- if(ev.msg == '!man') {
- }
- if(ev.msg == '!women') {
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment