Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
1,892
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. # Spotify-NP
  2. # Written by Aaron Blakely <aaron@ephasic.org>
  3. # Date: 2/13/2016
  4. #
  5. # Usage:
  6. # /np - Prints current track info to channel in /me action.
  7. # Installing:
  8. # Put np.pl and spotify-np.sh in ~/.xchat2/scripts
  9. # In XChat run /load ~/.xchat2/scripts/np.pl
  10.  
  11. use strict;
  12. use warnings;
  13.  
  14. IRC::register("Spotify-NP", "0.0.1", "Spotify Now-Playing Script", "Spotify Now-Playing Script");
  15. IRC::add_command_handler("np", "do_spotnp");
  16.  
  17. sub do_spotnp {
  18. my $np = `bash /home/$USER/.xchat2/scripts/spotify-np.sh`;
  19. chomp $np;
  20.  
  21. IRC::command("/me is listening to $np");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement