smooshie

Plug.dj repeat check (untested)

Jul 6th, 2012
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var historylist=Models.history.data;
  2. var historylength=historylist.length;
  3.  
  4. API.addEventListener(API.DJ_UPDATE, repeatcheck);
  5.  
  6. function repeatcheck(user) {
  7. var historylist=Models.history.data;
  8. var historylength=historylist.length;
  9. var currentID=Models.room.data.media.cid;
  10.  
  11. for(var j=0; j<historylength;j++) {
  12.  
  13. if (historylist[j].media.cid == currentID) {
  14. API.sendChat("repeat detected");
  15. }
  16.  
  17. }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment