Guest User

Untitled

a guest
Jul 8th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. registerPlugin({
  2. name: 'RegisterBOT',
  3. version: '1.0',
  4. description: 'Automicaly register bot',
  5. author: 'Sebak17',
  6. vars: {
  7. channel: {
  8. title: 'Channel:',
  9. type: 'channel'
  10. },
  11. gman: {
  12. title: 'The ServerGroupID - Man',
  13. type: 'number'
  14. },
  15. gwomen: {
  16. title: 'The ServerGroupID - Women',
  17. type: 'number'
  18. },
  19. msg1: {
  20. title: 'Message(Without rang)',
  21. type: 'string'
  22. placeholder: "Message 1"
  23. },
  24. msg2: {
  25. title: 'Message(With rang)',
  26. type: 'string'
  27. placeholder: "Message 2"
  28. }
  29. }
  30.  
  31. }, function (sinusbot, config, info) {
  32.  
  33. var channel = config.channel;
  34. var message1 = config.msg1;
  35. var message2 = config.msg2;
  36. var gm = config.gm;
  37. var gw = config.gw;
  38. var clientgroups = JSON.stringify(ev.clientServerGroups);
  39.  
  40.  
  41. sinusbot.on('clientMove', function(ev){
  42. if (ev.newChannel == channel){
  43. if (clientgroups.indexOf(gm) > -1){
  44. //YES
  45. if (clientgroups.indexOf(gw) > -1){
  46. //YES
  47. sinusbot.chatPrivate(ev.clientId, message2);
  48. }else{
  49. //NO
  50. sinusbot.chatPrivate(ev.clientId, message2);
  51. }
  52. }else{
  53. //NO
  54. if (clientgroups.indexOf(gw) > -1){
  55. //YES
  56. sinusbot.chatPrivate(ev.clientId, message2);
  57. }else{
  58. //NO
  59. sinusbot.chatPrivate(ev.clientId, message1);
  60. }
  61. }
  62. }
  63. });
  64.  
  65. sinusbot.on('chat', function(ev) {
  66. if(ev.msg == '!man') {
  67.  
  68. }
  69. if(ev.msg == '!women') {
  70.  
  71. }
  72. });
  73. });
Advertisement
Add Comment
Please, Sign In to add comment