Advertisement
Guest User

kvIRC - Hilights Script v 0.1

a guest
Apr 16th, 2014
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. # Hilights (or 'passive searching')
  2. # This code will monitor all channel messages for string matches based on the contents of
  3. # the %hilights[] array. You can add more/replace search items in the array, just add another
  4. # line, increment the index number and enter your search string simlar to the default ones.
  5.  
  6. # When a message appears (usually from a bot) that matches one of your hilights, a line
  7. # will be output to a 'hilights' window. Written by default for #moviegods.
  8.  
  9. %hilights[0] = "*tosh*s06e09*720*"
  10. %hilights[1] = "*game*thrones*s04e03*720*"
  11. %hilights[2] = "*marvels*agents*s01e19*720*"
  12.  
  13. # title of the hilights window. change to whatever you like it to be called
  14. %hlWin = "hilights"
  15. # do you want to use SSL DCC by default? set below to either ssend or send for SSL or not
  16. %sendStyle = "ssend"
  17. # which channel do you want to monitor?
  18. %watchChannel = "#moviegods"
  19.  
  20. #echo HL-DEBUG: $chan.name()
  21.  
  22. if ($chan.name() == %watchChannel)
  23. {
  24. foreach (%searchTerm, %hilights[])
  25. {
  26. if ($str.grep(%searchTerm, $3, w))
  27. {
  28. if ($window.exists($window(%hlWin)) == 0)
  29. {
  30. $window.open("im", %hlWin, $context)
  31. }
  32. else
  33. {
  34. %trimmedMessage = $str.rightfromfirst($3, "#")
  35. if (%trimmedMessage != "")
  36. echo -w=$window(%hlWin) HL-%watchChannel: /msg $0 xdcc %sendStyle %trimmedMessage
  37. else
  38. echo -w=$window(%hlWin) HL-DEBUG: /msg $0 xdcc %sendStyle %trimmedMessage
  39. }
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement