A plugin for leader1 to like tracks when people say TTTTTUUUUUUUUNNNNNNNNNEEEEEE or a variant thereof
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RegisterCallback("PRIVMSG", "TUUUUUUUUNE", function() { | |
var msg = this.event.message, | |
args = msg.split(" "), | |
source = this.event.args[0], | |
nick = this.event.nick, | |
me = IRC.GetNick(), | |
stats = UTILS.GetShoutcastStats(), | |
cfg = GetConfig(); | |
if(nick != me && msg.match(/T(U+)(N+)E/) && !msg.match(/^!/)) { | |
if(UTILS.LikeTrack(nick, stats.SongTitle)) { | |
IRC.Privmsg(source, nick+": thanks, you liked `"+stats.SongTitle+"`"); | |
IRC.Privmsg(cfg.Irc.StaffChannel, "LIKE: "+nick+" liked `"+stats.SongTitle+"`"); | |
} else { | |
IRC.Privmsg(cfg.Irc.StaffChannel, "LIKE: "+nick+" liked `"+args.join(" ")+"` (database insert failed)"); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment