Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Hilights (or 'passive searching')
- # This code will monitor all channel messages for string matches based on the contents of
- # the %hilights[] array. You can add more/replace search items in the array, just add another
- # line, increment the index number and enter your search string simlar to the default ones.
- # When a message appears (usually from a bot) that matches one of your hilights, a line
- # will be output to a 'hilights' window. Written by default for #moviegods.
- %hilights[0] = "*tosh*s06e09*720*"
- %hilights[1] = "*game*thrones*s04e03*720*"
- %hilights[2] = "*marvels*agents*s01e19*720*"
- # title of the hilights window. change to whatever you like it to be called
- %hlWin = "hilights"
- # do you want to use SSL DCC by default? set below to either ssend or send for SSL or not
- %sendStyle = "ssend"
- # which channel do you want to monitor?
- %watchChannel = "#moviegods"
- #echo HL-DEBUG: $chan.name()
- if ($chan.name() == %watchChannel)
- {
- foreach (%searchTerm, %hilights[])
- {
- if ($str.grep(%searchTerm, $3, w))
- {
- if ($window.exists($window(%hlWin)) == 0)
- {
- $window.open("im", %hlWin, $context)
- }
- else
- {
- %trimmedMessage = $str.rightfromfirst($3, "#")
- if (%trimmedMessage != "")
- echo -w=$window(%hlWin) HL-%watchChannel: /msg $0 xdcc %sendStyle %trimmedMessage
- else
- echo -w=$window(%hlWin) HL-DEBUG: /msg $0 xdcc %sendStyle %trimmedMessage
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement