Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- API.on(API.CHAT, (function (data) {
- console.log(data);
- if (/!woot/i.test(data.message)) { $("#woot").click(); }
- if (/!meh/i.test(data.message)) { $("#meh").click(); }
- /*if(/!curate/i.test(data.message)) { $("#curate").click(); }*/
- if (/!ping/i.test(data.message)) { API.sendChat('@' + data.from + ' Pong!'); };
- if (/!hide/i.test(data.message)) {
- $("#chat-messages").children().each(function () {
- var id = /cid-([\w\d]*)/.match($(this).attr("class"))[1];
- if ($(this).find(".from").text().indexOf("Gumm") != -1) {
- API.moderateDeleteChat(id);
- }
- });
- }
- if (/!clear/i.test(data.message)) {
- $("#chat-messages").children().each(function () {
- var id = /cid-([\w\d]*)/.match($(this).attr("class"))[1];
- if ($(this).find(".from").text().indexOf("") != -1) {
- API.moderateDeleteChat(id);
- }
- });
- }
- }))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement