A highlight script that alerts you when your nick (or one of your customized triggers) is spoken/channel status changed. When mIRC isn't the active application, a window appears in the bottom right corner notifying you (I made this script before $tip was released, that's why I don't use it). Has the ability to log highlights and add Users and Service Bots to an exceptions list, so you're not highlighted on them. Also has the ability to enable spam protection which ignores users if they spam your highlights. I've been updating the script a lot lately and to my knowledge there are no bugs. If you should find one you can post back here or email me at not_thebest@hotmail.com
I've been developing a queue system for the highlight window, so that it will show all the highlights that happen instead of closing the already opened highlight to display the newest one. The next update of the script will include the queue system.
This code was written in mIRC version 6.34
Some aliases in this code were NOT written by me, but proper credit is given in the script where needed.
Update: 11/21/08 - I've re-coded all the events and added an option to notify users that you're running a full-screen application (if you actually are, of course). I've also changed it so you can have highlight notices OFF but still log the highlight. I'm still developing the queue system, so that'll be here soon.
Update: 8/07/09 - Recoded events - added if idle time > X mins notice user, allowed for regex matches in triggers, recoded the exceptions list & now works for multiple networks with seperate lists, changed highlight ignore system to just ignore highlights instead of /ignoring people. Has been bug tested, none found. If any are found post back here/e-mail me @ not_thebest@hotmail.com
Update 8/17/09 - Added option to flash and beep when highlighted and option to get highlighted on actions. re did trigger tab in dialog.
Update: 12/24/10 - Redone events again, uses $tip for display now. Other various bug fixes
; Written by Arbiter (not_thebest@hotmail.com) with help from various people. Credit is given where needed.
; Written in mIRC version 6.34 and may malfunction in older versions.
; Script version: 2.4
alias hversion return 2.4
on *:DEOP:#:{
if ($chan == $active) && ($appactive == $true) { halt }
if ($nochan($chan,$network) == yes) halt
if ($opnick == $me) {
if ($isbot($nick,$network) == $false) {
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT]) $+($nick,/,$chan,/,$network,:) You lost OP status. }
if (%highlight.yeah == on) {
if ($appactive == $false) {
noop $tip(Highlight,Highlight - $chan,$+($chr(2),$nick,$chr(2)) took your $+($chr(2),OP,$chr(2)) status in $+($chr(2),$chan,$chr(2)) on $+($chr(2),$network,$chr(2)),5,,window -a $chan,)
}
else {
echo -at $c.(*** Highlight: $nick took your OP status in $chan on $network)
}
}
}
}
}
on *:DEHELP:#:{
if ($chan == $active) && ($appactive == $true) { halt }
if ($nochan($chan,$network) == yes) halt
if ($hnick == $me) {
if ($isbot($nick,$network) == $false) {
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT]) $+($nick,/,$chan,/,$network,:) You lost HALFOP status. }
if (%highlight.yeah == on) {
if ($appactive == $false) {
noop $tip(Highlight,Highlight - $chan,$+($chr(2),$nick,$chr(2)) took your $+($chr(2),HALFOP,$chr(2)) status in $+($chr(2),$chan,$chr(2)) on $+($chr(2),$network,$chr(2)),5,,window -a $chan,)
}
else {
echo -at $c.(*** Highlight: $nick took your HALFOP status in $chan on $network)
}
}
}
}
}
on *:DEVOICE:#:{
if ($chan == $active) && ($appactive == $true) { halt }
if ($nochan($chan,$network) == yes) halt
if ($vnick == $me) {
if ($isbot($nick,$network) == $false) {
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT]) $+($nick,/,$chan,/,$network,:) You lost VOICE status. }
if (%highlight.yeah == on) {
if ($appactive == $false) {
noop $tip(Highlight,Highlight - $chan,$+($chr(2),$nick,$chr(2)) took your $+($chr(2),VOICE,$chr(2)) status in $+($chr(2),$chan,$chr(2)) on $+($chr(2),$network,$chr(2)),5,,window -a $chan,)
}
else {
echo -at $c.(*** Highlight: $nick took your VOICE status in $chan on $network)
}
}
}
}
}
on *:VOICE:#:{
if ($chan == $active) && ($appactive == $true) { halt }
if ($nochan($chan,$network) == yes) halt
if ($vnick == $me) {
if ($isbot($nick,$network) == $false) {
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT]) $+($nick,/,$chan,/,$network,:) You recived VOICE status. }
if (%highlight.yeah == on) {
if ($appactive == $false) {
noop $tip(Highlight,Highlight - $chan,$+($chr(2),$nick,$chr(2)) gave you $+($chr(2),VOICE,$chr(2)) status in $+($chr(2),$chan,$chr(2)) on $+($chr(2),$network,$chr(2)),5,,window -a $chan,)
}
else {
echo -at $c.(*** Highlight: $nick gave you VOICE status in $chan on $network)
}
}
}
}
}
on *:HELP:#:{
if ($chan == $active) && ($appactive == $true) { halt }
if ($nochan($chan,$network) == yes) halt
if ($hnick == $me) {
if ($isbot($nick,$network) == $false) {
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT]) $+($nick,/,$chan,/,$network,:) You recived HALFOP status. }
if (%highlight.yeah == on) {
if ($appactive == $false) {
noop $tip(Highlight,Highlight - $chan,$+($chr(2),$nick,$chr(2)) gave you $+($chr(2),HALFOP,$chr(2)) status in $+($chr(2),$chan,$chr(2)) on $+($chr(2),$network,$chr(2)),5,,window -a $chan,)
}
else {
echo -at $c.(*** Highlight: $nick gave you HALFOP status in $chan on $network)
}
}
}
}
}
on *:OP:#:{
if ($chan == $active) && ($appactive == $true) { halt }
if ($nochan($chan,$network) == yes) halt
if ($opnick == $me) {
if ($isbot($nick,$network) == $false) {
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT]) $+($nick,/,$chan,/,$network,:) You recived OP status. }
if (%highlight.yeah == on) {
if ($appactive == $false) {
noop $tip(Highlight,Highlight - $chan,$+($chr(2),$nick,$chr(2)) gave you $+($chr(2),OP,$chr(2)) status in $+($chr(2),$chan,$chr(2)) on $+($chr(2),$network,$chr(2)),5,,window -a $chan,)
}
else {
echo -at $c.(*** Highlight: $nick gave you OP status in $chan on $network)
}
}
}
}
}
on *:NOTICE:*:?:{
if ($chan == $active) && ($appactive == $true) { halt }
if ($highlighttrig($1-) == yes) || ($+(*,$me,*) iswm $1-) {
if ($isbot($nick,$network) == $false) {
if (!$hget(highlight.ignore,$address($nick,2))) {
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT]) $+($nick,/,NOTICE,/,$network,:) $replace($strip($1-),$chr(34),$chr(39)) }
if (%highlight.yeah == on) {
if ($idle >= $calc(%highlight.mins * 60)) {
if (%highlight.idle == on) {
.notice $nick %highlight.msg
hadd -m highlight.ignore $address($nick,2) ignored
halt
}
}
if ($fullscreen == 0) {
if ($hget(saidnicks)) { hfree saidnicks }
if ($($+(%,highlightspam.,$address($nick,2)),2) >= %highlight.times) {
hadd -mu60 highlight.ignore $address($nick,2) ignore
if ($appactive == $false) {
noop $tip(Highlight,Highlight Protection,$+($chr(2),$nick,$chr(2)) triggerd your highlight spam protection! Ignoring user for 60 seconds.,5,,,,)
}
else { echo -at $c.(*** $nick triggerd your highlight spam protection! Ignoring user for 60 seconds.) }
unset $+(%,highlightspam.,$address($nick,2))
halt
}
if ($appactive == $false) {
if (%highlightprot.status == on) { inc -u $+ %highlight.secs $+(%,highlightspam.,$address($nick,2)) }
noop $tip(Highlight,Highlight - NOTICE,$+($chr(2),$nick,$chr(2)) said $strip($qt($1-)) in $+($chr(2),NOTICE,$chr(2)) on $+($chr(2),$network,$chr(2)),5,,,)
if (%highlight.beep == on) .beep 1 | if (%highlight.flash == on) flash Highlight: $+(NOTICE,/,$nick)
}
else {
echo -at $c.(*** Highlight: $nick highlighted you in notice on $network saying $strip($qt($1-)))
if (%highlightprot.status == on) { inc -u $+ %highlight.secs $+(%,highlightspam.,$address($nick,2)) }
}
}
else {
if !$hget(saidnicks,$nick) && %highlight.notice == on {
.notice $nick I currently have a full-screen application running and may not respond to $&
to your highlight for some time. Your highlight message has been logged.
hadd -m saidnicks $nick nohighlight
}
}
}
}
}
}
}
on *:ACTION:*:#:{
if ($chan == $active) && ($appactive == $true) { halt }
if ($nochan($chan,$network) == yes) halt
if ($highlighttrig($1-,$chan) == yes) {
if (%highlight.actions == on) {
if ($isbot($nick,$network) == $false) {
if (!$hget(highlight.ignore,$address($nick,2))) {
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT]) $+($nick,/,$chan,/,$network,:) $replace($strip($1-),$chr(34),$chr(39)) }
if (%highlight.yeah == on) {
if ($idle >= $calc(%highlight.mins * 60)) {
if (%highlight.idle == on) {
.notice $nick %highlight.msg
hadd -m highlight.ignore $address($nick,2) ignored
halt
}
}
if ($fullscreen == 0) {
if ($hget(saidnicks)) { hfree saidnicks }
if ($($+(%,highlightspam.,$address($nick,2)),2) >= %highlight.times) {
hadd -mu60 highlight.ignore $address($nick,2) ignore
if ($appactive == $false) {
noop $tip(Highlight,Highlight Protection,$+($chr(2),$nick,$chr(2)) triggerd your highlight spam protection! Ignoring user for 60 seconds.,5,,,,)
}
else { echo -at $c.(*** $nick triggerd your highlight spam protection! Ignoring user for 60 seconds.) }
unset $+(%,highlightspam.,$address($nick,2))
halt
}
if ($appactive == $false) {
if (%highlightprot.status == on) { inc -u $+ %highlight.secs $+(%,highlightspam.,$address($nick,2)) }
noop $tip(Highlight,Highlight - $chan,$+($chr(2),$nick,$chr(2)) said $strip($qt($1-)) in $+($chr(2),$chan,$chr(2)) on $+($chr(2),$network,$chr(2)),5,,window -a $chan,)
if (%highlight.beep == on) .beep 1 | if (%highlight.flash == on) flash Highlight: $+($chan,/,$nick)
}
else {
echo -at $c.(*** Highlight: $nick highlighted you in $chan on $network saying $strip($qt($1-)))
if (%highlightprot.status == on) { inc -u $+ %highlight.secs $+(%,highlightspam.,$address($nick,2)) }
}
}
else {
if !$hget(saidnicks,$nick) && %highlight.notice == on {
.notice $nick I currently have a full-screen application running and may not respond to $&
to your highlight for some time. Your highlight message has been logged.
hadd -m saidnicks $nick nohighlight
}
}
}
}
}
}
}
}
on *:ACTION:*:?:{
if ($chan == $active) && ($appactive == $true) { halt }
if (%highlight.actions == on) {
if ($highlighttrig($1-) == yes) || ($+(*,$me,*) iswm $1-) {
if ($isbot($nick,$network) == $false) {
if (!$hget(highlight.ignore,$address($nick,2))) {
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT]) $+($nick,/,QUERY,/,$network,:) $replace($strip($1-),$chr(34),$chr(39)) }
if (%highlight.yeah == on) {
if ($idle >= $calc(%highlight.mins * 60)) {
if (%highlight.idle == on) {
.notice $nick %highlight.msg
hadd -m highlight.ignore $address($nick,2) ignored
halt
}
}
if ($fullscreen == 0) {
if ($hget(saidnicks)) { hfree saidnicks }
if ($($+(%,highlightspam.,$address($nick,2)),2) >= %highlight.times) {
hadd -mu60 highlight.ignore $address($nick,2) ignore
if ($appactive == $false) {
noop $tip(Highlight,Highlight Protection,$+($chr(2),$nick,$chr(2)) triggerd your highlight spam protection! Ignoring user for 60 seconds.,5,,,,)
}
else { echo -at $c.(*** $nick triggerd your highlight spam protection! Ignoring user for 60 seconds.) }
unset $+(%,highlightspam.,$address($nick,2))
halt
}
if ($appactive == $false) {
if (%highlightprot.status == on) { inc -u $+ %highlight.secs $+(%,highlightspam.,$address($nick,2)) }
noop $tip(Highlight,Highlight - QUERY,$+($chr(2),$nick,$chr(2)) said $strip($qt($1-)) in $+($chr(2),QUERY,$chr(2)) on $+($chr(2),$network,$chr(2)),5,,window -a $nick,)
if (%highlight.beep == on) .beep 1 | if (%highlight.flash == on) flash Highlight: $+(QUERY,/,$nick)
}
else {
echo -at $c.(*** Highlight: $nick highlighted you in $chan on $network saying $strip($qt($1-)))
if (%highlightprot.status == on) { inc -u $+ %highlight.secs $+(%,highlightspam.,$address($nick,2)) }
}
}
else {
if !$hget(saidnicks,$nick) && %highlight.notice == on {
.notice $nick I currently have a full-screen application running and may not respond to $&
to your highlight for some time. Your highlight message has been logged.
hadd -m saidnicks $nick nohighlight
}
}
}
}
}
}
}
}
on *:TEXT:*:#:{
if ($chan == $active) && ($appactive == $true) { halt }
if ($nochan($chan,$network) == yes) halt
if ($highlighttrig($1-,$chan) == yes) {
if ($isbot($nick,$network) == $false) {
if (!$hget(highlight.ignore,$address($nick,2))) {
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT]) $+($nick,/,$chan,/,$network,:) $replace($strip($1-),$chr(34),$chr(39)) }
if (%highlight.yeah == on) {
if ($idle >= $calc(%highlight.mins * 60)) {
if (%highlight.idle == on) {
.notice $nick %highlight.msg
hadd -m highlight.ignore $address($nick,2) ignored
halt
}
}
if ($fullscreen == 0) {
if ($hget(saidnicks)) { hfree saidnicks }
if ($($+(%,highlightspam.,$address($nick,2)),2) >= %highlight.times) {
hadd -mu60 highlight.ignore $address($nick,2) ignore
if ($appactive == $false) {
noop $tip(Highlight,Highlight Protection,$+($chr(2),$nick,$chr(2)) triggerd your highlight spam protection! Ignoring user for 60 seconds.,5,,,,)
}
else { echo -at $c.(*** $nick triggerd your highlight spam protection! Ignoring user for 60 seconds.) }
unset $+(%,highlightspam.,$address($nick,2))
halt
}
if ($appactive == $false) {
if (%highlightprot.status == on) { inc -u $+ %highlight.secs $+(%,highlightspam.,$address($nick,2)) }
noop $tip(Highlight,Highlight - $chan,$+($chr(2),$nick,$chr(2)) said $strip($qt($1-)) in $+($chr(2),$chan,$chr(2)) on $+($chr(2),$network,$chr(2)),5,,window -a $chan,)
if (%highlight.beep == on) .beep 1 | if (%highlight.flash == on) flash Highlight: $+($chan,/,$nick)
}
else {
echo -at $c.(*** Highlight: $nick highlighted you in $chan on $network saying $strip($qt($1-)))
if (%highlightprot.status == on) { inc -u $+ %highlight.secs $+(%,highlightspam.,$address($nick,2)) }
}
}
else {
if !$hget(saidnicks,$nick) && %highlight.notice == on {
.notice $nick I currently have a full-screen application running and may not respond to $&
to your highlight for some time. Your highlight message has been logged.
hadd -m saidnicks $nick nohighlight
}
}
}
}
}
}
}
on *:TEXT:*:?:{
if ($query($nick) == $active) && ($appactive == $true) { halt }
if ($highlighttrig($1-) == yes) || ($+(*,$me,*) iswm $1-) {
if ($isbot($nick,$network) == $false) {
if (!$hget(highlight.ignore,$address($nick,2))) {
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT]) $+($nick,/,QUERY,/,$network,:) $replace($strip($1-),$chr(34),$chr(39)) }
if (%highlight.yeah == on) {
if ($idle >= $calc(%highlight.mins * 60)) {
if (%highlight.idle == on) {
.notice $nick %highlight.msg
hadd -m highlight.ignore $address($nick,2) ignored
halt
}
}
if ($fullscreen == 0) {
if ($hget(saidnicks)) { hfree saidnicks }
if ($($+(%,highlightspam.,$address($nick,2)),2) >= %highlight.times) {
hadd -mu60 highlight.ignore $address($nick,2) ignore
if ($appactive == $false) {
noop $tip(Highlight,Highlight Protection,$+($chr(2),$nick,$chr(2)) triggerd your highlight spam protection! Ignoring user for 60 seconds.,5,,,,)
}
else { echo -at $c.(*** $nick triggerd your highlight spam protection! Ignoring user for 60 seconds.) }
unset $+(%,highlightspam.,$address($nick,2))
halt
}
if ($appactive == $false) {
if (%highlightprot.status == on) { inc -u $+ %highlight.secs $+(%,highlightspam.,$address($nick,2)) }
noop $tip(Highlight,Highlight - QUERY,$+($chr(2),$nick,$chr(2)) said $strip($qt($1-)) in $+($chr(2),QUERY,$chr(2)) on $+($chr(2),$network,$chr(2)),5,,window -a $nick,)
if (%highlight.beep == on) .beep 1 | if (%highlight.flash == on) flash Highlight: $+(QUERY,/,$nick)
}
else {
echo -at $c.(*** Highlight: $nick highlighted you in query on $network saying $strip($qt($1-)))
if (%highlightprot.status == on) { inc -u $+ %highlight.secs $+(%,highlightspam.,$address($nick,2)) }
}
}
else {
if !$hget(saidnicks,$nick) && %highlight.notice == on {
.notice $nick I currently have a full-screen application running and may not respond to $&
to your highlight for some time. Your highlight message has been logged.
hadd -m saidnicks $nick nohighlight
}
}
}
}
}
}
}
on *:CONNECT:{ set %highlight.ctime $ctime }
on *:INPUT:*:{
if (%highlight.idle == on) {
if ($calc($ctime - %highlight.ctime) >= $calc(%highlight.mins * 60)) {
var %x = 1
while ($hget(highlight.ignore,%x).item) {
if ($hget(highlight.ignore,%x).data == ignored) hdel highlight.ignore $hget(highlight.ignore,%x).item
inc %x
}
}
}
set %highlight.ctime $ctime
}
menu channel {
-
&Highlights
.&Highlight Logs:highlightlogs
.-
.$iif($ini(exceptions.ini,$network,$active),&Delete,&Add) $active $iif($ini(exceptions.ini,$network,$active),from,to) exceptions:{
if ($ini(exceptions.ini,$network,$active)) {
remini exceptions.ini $network $active
echo -at $c.(*** Deleted $qt($active) from highlight exceptions list.)
}
else {
writeini -n exceptions.ini $network $active chan
echo -at $c.(*** Added $qt($active) to highlight exceptions list.)
}
}
}
menu nicklist {
-
&Highlights
.&Highlight Logs:highlightlogs
.-
.$iif($ini(exceptions.ini,$network,$1),&Delete,&Add) $1 $iif($ini(exceptions.ini,$network,$1),from,to) exceptions:{
if ($ini(exceptions.ini,$network,$1)) {
if ($readini(exceptions.ini,n,$network,$1) != bot) {
remini exceptions.ini $network $1
echo -at $c.(*** Deleted user $qt($1) from highlight exceptions list.)
}
else echo -at $c.(*** You can't delete non-custom exceptions!)
}
else {
writeini -n exceptions.ini $network $1 user
echo -at $c.(*** Added user $qt($1) to highlight exceptions list.)
}
}
-
}
dialog highlight {
title Highlights $+(v,$hversion) $+($chr(40),$lines(highlights.txt),$chr(41))
size -1 -1 180 175
option dbu
tab "Logs", 1, 1 1 178 172
list 4, 5 25 170 77, tab 1 size extsel hsbar vsbar
box "Logs", 5, 3 17 174 88, tab 1
button "Delete", 6, 74 108 37 12, tab 1
button "Clear logs", 7, 128 108 37 12, tab 1
text "Written by Arbiter (AKA Mr_White) @ not_thebest@hotmail.com", 8, 74 155 96 14, disable tab 1
button "Close", 10, 74 124 91 12, tab 1 cancel
radio "Enable logging", 11, 8 117 50 10, group tab 1
radio "Disable logging", 12, 8 131 50 10, tab 1
radio "Enable Highlights", 17, 8 144 52 10, group tab 1
radio "Disable Highlights", 18, 8 158 53 10, tab 1
box "Switches", 19, 5 108 58 61, tab 1
button "Send selected highlights to clipboard", 31, 74 139 91 12, tab 1
tab "Triggers", 2
combo 20, 6 25 76 49, tab 2 sort size
box "Triggers", 21, 3 17 82 59, tab 2
button "Add", 22, 5 80 37 12, tab 2
button "Delete", 23, 5 96 37 12, tab 2
button "Clear", 24, 46 80 37 12, tab 2
button "Close", 25, 46 96 37 12, tab 2 cancel
text Regex is supported. If you don't know regex that well $+ $chr(44) I suggest you just input regular simple triggers. E.g: $me $+ . For more advanced users $+ $chr(44) you don't need the opening and closing / in your regex. Matches are case-insensitive., 67, 4 114 82 55, tab 2
check "Notice user", 32, 91 41 46 9, tab 2
text "When a full-screen application is running:", 38, 90 26 80 13, tab 2
check "When idle time is greater than", 50, 91 58 84 10, tab 2
edit "", 51, 92 68 14 10, tab 2 limit 3
text "mins notice user with:", 52, 109 69 57 8, tab 2
edit "", 53, 92 80 81 15, tab 2 multi autovs
box "Settings", 56, 87 17 90 154, tab 2
check "Mass highlight protection", 57, 91 103 73 10, tab 2
button "—————————————————————", 59, 90 52 84 2, disable tab 2
button "Save settings", 60, 112 157 39 11, tab 2
box "", 13, 3 74 82 37, tab 2
check "Beep when highlighted", 63, 91 119 68 10, tab 2
check "Flash when highlighted", 64, 91 129 69 10, tab 2
button "—————————————————————", 26, 90 98 84 2, disable tab 2
button "—————————————————————", 62, 90 114 84 2, disable tab 2
button "—————————————————————", 65, 90 140 84 2, disable tab 2
check "Highlight on actions", 66, 91 145 61 10, tab 2
tab "Spam protection and Exceptions", 3
radio "On", 27, 9 107 19 10, group tab 3
radio "Off", 28, 31 107 21 10, tab 3
box "Protection status", 29, 6 99 50 20, tab 3
box "Options", 33, 6 121 46 33, tab 3
text "Secs:", 34, 9 130 18 8, tab 3
text "Times:", 35, 9 142 20 8, tab 3
edit "", 36, 30 129 20 10, tab 3
edit "", 37, 30 141 20 10, tab 3
button "Save", 39, 10 157 37 12, tab 3
combo 42, 7 38 98 57, tab 3 size
box "Users and Service Bots", 41, 4 30 104 66, tab 3
button "Update service bots", 45, 57 136 37 17, tab 3 multi
button "Close", 48, 57 157 37 12, tab 3 cancel
button "Add", 43, 57 120 37 12, tab 3
button "Delete", 44, 98 120 37 12, tab 3
button "Edit:", 46, 60 103 20 12, tab 3
edit "", 47, 83 104 92 10, tab 3
text "Select an item from the listbox and edit it in the edit box. When satisfied click the 'Edit:' button to save it.", 14, 99 139 74 27, tab 3
button "Clear", 30, 139 120 37 12, tab 3
box "Channels", 40, 110 30 66 66, tab 3
combo 49, 113 38 60 57, tab 3 sort size
combo 61, 60 18 60 60, tab 3 size vsbar drop
tab "About", 15
text "This script was written in mIRC version 6.34. In this code I have used various aliases not coded by me but credit is given (if I know who the original author is) in the script where it's needed. When the script is first loaded all options are off by default. If you find any bugs or have any suggestions email me at not_thebest@hotmail.com or join #Tittyhump on SwiftIRC. (/server -m irc.SwiftIRC.net -j #Tittyhump).", 16, 6 18 169 52, tab 15 center
link "arbiter.novahost.org", 9, 3 162 59 8, tab 15
button "Check version", 54, 70 77 39 12, tab 15
text Current version: $hversion, 55, 125 162 50 8, tab 15
icon 58, 6 96 167 50, $mIRCdir $+ arbitersbannercopy.jpg, 0, tab 15
}
ctcp *:HLVERSION:*:.ctcpreply $nick HLVERSION $+(v,$hversion) | haltdef
on *:CTCPREPLY:*HLVERSION*:echo -at $nick is using Arbiters Highlight script version $2- | haltdef
on *:dialog:highlight:*:*:{
if ($devent == edit) {
if ($did == 42) { set %highlight.cclick $did }
if ($did == 49) { set %highlight.cclick $did }
}
if ($devent == init) && ($did == 0) { updateit $network | did -z highlight 4 }
if ($devent == sclick) {
if ($did == 61) {
set %current.server $did(highlight,61).seltext
reloadexceptions %current.server
}
if ($did == 31) {
if ($did(highlight,4,0).sel == 1) { clipboard $did(highlight,4).seltext }
else {
var %p = 1, %nums = $did(highlight,4,0).sel
clipboard
while (%p <= %nums) {
clipboard -na $did(highlight,4,$did(highlight,4,%p).sel)
inc %p
}
}
}
if ($did == 54) hvcheck
if ($did == 6) {
if ($did(highlight,4).seltext) {
var %f = $read(highlights.txt,nw,$+(*,$gettok($did(highlight,4).seltext,5-,32),*))
write -dw $+ $qt(%f) highlights.txt
did -d highlight 4 $did(highlight,4).sel
dialog -t highlight Highlights $+(v,$hversion) $+($chr(40),$lines(highlights.txt),$chr(41))
}
else { echo -at $c.(*** Error: You must select a highlight to delete!) }
}
if ($did == 7) { write -c highlights.txt | echo -at $c.(*** Highlight log files cleared.) | did -r highlight 4 | dialog -t highlight Highlights $+(v,$hversion) $+($chr(40),$lines(highlights.txt),$chr(41)) }
if ($did == 11) {
if (%logging.high == on) { echo -at $c.(*** Error: Highlight logging is already on!) }
else {
set %logging.high on
echo -at $c.(*** Highlight logging enabled.)
}
}
if ($did == 12) {
if (%logging.high == off) { echo -at $c.(*** Error: Highlight logging is already off!) }
else {
set %logging.high off
echo -at $c.(*** Highlight logging disabled.)
}
}
if ($did == 10) { dialog -x highlight | clearhvars }
if ($did == 17) {
if (%highlight.yeah == on) { echo -at $c.(*** Error: Highlight alerts are already on!) }
else {
set %highlight.yeah on
echo -at $c.(*** Highlight alerts are now enabled.)
}
}
if ($did == 63) {
if (%highlight.beep == on) {
set %highlight.beep off
echo -at $c.(*** Highlight beep OFF.)
}
else {
set %highlight.beep on
echo -at $c.(*** Highlight beep ON.)
}
}
if ($did == 64) {
if (%highlight.flash == on) {
set %highlight.flash off
echo -at $c.(*** Highlight flash now OFF.)
}
else {
set %highlight.flash on
echo -at $c.(*** Highlight flash now ON.)
}
}
if ($did == 66) {
if (%highlight.actions == on) {
set %highlight.actions off
echo -at $c.(*** Highlights will no longer trigger on actions.)
}
else {
set %highlight.actions on
echo -at $c.(*** Highlights will now trigger on actions.)
}
}
if ($did == 18) {
if (%highlight.yeah == off) { echo -at $c.(*** Error: Highlight alerts are already off!) }
else {
set %highlight.yeah off
echo -at $c.(*** Highlight alerts are now disabled.)
}
}
if ($did == 23) {
if ($did(highlight,20).seltext) {
var %l = $read(highlighttrigs.txt,nw,$+(*,$did(highlight,20).seltext,*))
write -dw $+ $qt(%l) highlighttrigs.txt %l
did -d highlight 20 $did(highlight,20).sel
did -d highlight 20 0
}
else { echo -at $c.(*** Error: You must select a highlight trigger to delete!) }
}
if ($did == 24) { if ($input(Are you sure you want to clear all highlight triggers?,yvuw,Clear all?) == $yes) { write -c highlighttrigs.txt | echo -at $c.(*** Highlight triggers cleared.) | did -r highlight 20 } }
if ($did == 25) { dialog -x highlight | clearhvars }
if ($did == 22) {
if ($strip($did(highlight,20).text)) {
write highlighttrigs.txt $did(highlight,20).text
did -a highlight 20 $did(highlight,20).text
did -d highlight 20 0
}
else { echo -at $c.(*** Error: You must supply a highlight trigger!) }
}
if ($did == 27) { set %highlightprot.status on | echo -at $c.(*** Highlight spam protection is now on.) | did -n highlight 36,37 }
if ($did == 28) { set %highlightprot.status off | echo -at $c.(*** Highlight spam protection is now off.) | did -m highlight 36,37 }
if ($did == 32) {
if (%highlight.notice != on) {
set %highlight.notice on
echo -at $c.(*** When a full-screen application is running and you are $&
highlighted you will now notice the user of such.)
}
else {
set %highlight.notice off
echo -at $c.(*** You will no longer inform users via notice $&
when a full-screen application is running.)
}
}
if ($did == 57) {
if (%highlight.mass != on) {
set %highlight.mass on
echo -at $c.(*** Mass highlight protection is now activated.)
}
else {
set %highlight.mass off
echo -at $c.(*** Mass highlight protection is now off.)
}
}
if ($did == 50) {
if (%highlight.idle != on) {
set %highlight.idle on
did -n highlight 51,53
}
else {
set %highlight.idle off
did -m highlight 51,53
}
}
if ($did == 60) {
if ($strip($did(highlight,51).text) != $null) {
if ($strip($did(highlight,51).text) > 60) {
echo -at $c.(*** Highlight time cannot be greater than 60 minutes. Using default idle time instead. (20 mins))
set %highlight.mins 20
did -r highlight 51
did -a highlight 51 20
}
else set %highlight.mins $did(highlight,51).text
}
else {
echo -at $c.(*** Highlight idle time cannot be empty! Using default idle time instead. (20 mins))
set %highlight.mins 20
did -a highlight 51 20
}
if ($strip($did(highlight,53).text) != $null) {
set %highlight.msg $did(highlight,53).text
}
else {
echo -at $c.(*** Highlight idle message cannot be empty! Using default message instead.)
set %highlight.msg I have been idle for more than $iif(%highlight.mins,%highlight.mins,20) minutes. This is a one-time response to your highlight.
did -a highlight 53 I have been idle for more than $iif(%highlight.mins,%highlight.mins,20) minutes. This is a one-time response to your highlight.
}
}
if ($did == 39) {
if ($did(highlight,36).text != $null) && ($did(highlight,37).text != $null) {
set %highlight.secs $did(highlight,36).text
set %highlight.times $did(highlight,37).text
echo -at $c.(*** Highlight protection will now ignore user (when activated) after $did(highlight,37).text times in $did(highlight,36).text seconds.)
}
else { echo -at $c.(*** Error: Secs/times values cannot be blank! Using defualt values instead.) | set %highlight.secs 15 | set %highlight.times 5 | did -r highlight 36,37 | did -a highlight 37 5 | did -a highlight 36 15 }
}
if ($did == 43) {
if ($strip($did(highlight,%highlight.cclick).text)) {
writeini -n exceptions.ini %current.server $did(highlight,%highlight.cclick).text $iif(%highlight.cclick == 42,user,chan)
if (%highlight.cclick == 42) {
var %uline = $didwm(highlight,42,*Service Bots*)
did -i highlight 42 %uline $did(highlight,42).text
did -d highlight 42 0
}
else {
did -a highlight %highlight.cclick $did(highlight,%highlight.cclick).text
did -d highlight %highlight.cclick 0
}
}
else { echo -at $c.(*** Error: You must supply an exception to add!) }
}
if ($did == 44) {
if (%highlight.cclick == 42) {
var %w = 1
while (%w <= $ini(exceptions.ini,%current.server,0)) {
if ($did(highlight,42).seltext === $ini(exceptions.ini,%current.server,%w)) && ($readini(exceptions.ini,n,%current.server,$ini(exceptions.ini,%current.server,%w)) == user) { var %yes = 1 | .break }
else { inc %w }
}
if ($var(%yes)) {
var %h = $ini(exceptions.ini,%current.server,%w)
remini exceptions.ini %current.server %h
var %lewl = $didwm(highlight,42,$+(*,$did(highlight,42).seltext),*))
did -d highlight 42 %lewl
did -d highlight 42 0
did -r highlight 47
}
else { echo -at $c.(*** Error: You can't delete non-custom exceptions!) }
}
else {
remini exceptions.ini %current.server $did(highlight,%highlight.cclick).seltext
var %lewl = $didwm(highlight,%highlight.cclick,$+(*,$did(highlight,%highlight.cclick).seltext),*))
did -d highlight %highlight.cclick %lewl
did -d highlight %highlight.cclick 0
did -r highlight 47
}
}
if ($did == 45) {
botlist %current.server
did -r highlight 42
if ($ini(exceptions.ini,%current.server,0) != 0) {
var %t = $ini(exceptions.ini,%current.server,0), %g = 0
did -a highlight 42 $+($str(—,6),User Nicks,$str(—,6))
while (%g <= %t) {
var %i = $ini(exceptions.ini,%current.server,%g)
if ($readini(exceptions.ini,%current.server,%i) == user) {
did -a highlight 42 %i
}
inc %g
}
}
if ($ini(exceptions.ini,%current.server,0) != 0) { did -a highlight 42 $+($str(—,6),Service Bots,$str(—,5)) }
.timerbotlist 1 1 showbots %current.server
}
if ($did == 46) {
if ($did(highlight,47).text != $null) {
var %old = $did(highlight,%highlight.cclick).seltext, %new = $did(highlight,47).text
renini exceptions.ini ? %current.server $did(highlight,%highlight.cclick).seltext $did(highlight,47).text
var %hut = $didwm(highlight,%highlight.cclick,$+(*,%old,*))
did -o highlight %highlight.cclick %hut %new
did -d highlight %highlight.cclick 0
}
else { echo -at $c.(*** Error: You must have an exception in the edit box to submit it.) }
}
if ($did == 30) {
if ($input(Are you sure you want to clear all highlight exceptions?,yvuw,Clear all?) == $yes) {
remini exceptions.ini %current.server
echo -at $c.(*** Highlight exceptions cleared.)
closeit did -f highlight 3
}
}
if ($did == 48) { clearhvars }
if ($did == 42) {
set %highlight.cclick $did
did -d highlight 49 0
did -u highlight 49
var %i = 1
while (%i <= $ini(exceptions.ini,%current.server,0)) {
if ($did(highlight,42).seltext === $ini(exceptions.ini,%current.server,%i)) && ($readini(exceptions.ini,n,%current.server,$ini(exceptions.ini,%current.server,%i)) == bot) { var %yes = 1 | .break }
else { inc %i }
}
if *———* !iswm $did(highlight,42).seltext && !$var(%yes) {
did -n highlight 47
did -e highlight 46
did -r highlight 47
did -a highlight 47 $did(highlight,42).seltext
}
else {
did -m highlight 47
did -b highlight 46
}
}
if ($did == 49) {
set %highlight.cclick $did
did -d highlight 42 0
did -n highlight 47
did -e highlight 46
did -r highlight 47
did -a highlight 47 $did(highlight,49).seltext
did -u highlight 42
}
}
}
on *:dialog:highlight:close:0:{ clearhvars }
alias reloadexceptions {
did -r highlight 42
did -r highlight 49
if ($ini(exceptions.ini,$1,0) != 0) {
var %t = $ini(exceptions.ini,$1,0), %h = 0
did -a highlight 42 $+($str(—,6),User Nicks,$str(—,6))
while (%h <= %t) {
var %i = $ini(exceptions.ini,$1,%h)
if ($readini(exceptions.ini,$1,%i) == user) {
did -a highlight 42 %i
}
inc %h
}
}
if ($ini(exceptions.ini,$1,0) != 0) {
var %o = $ini(exceptions.ini,$1,0), %k = 0
did -a highlight 42 $+($str(—,6),Service Bots,$str(—,5))
while (%k <= %o) {
var %pp = $ini(exceptions.ini,$1,%k)
if ($readini(exceptions.ini,n,$1,%pp) == bot) {
did -a highlight 42 %pp
}
inc %k
}
}
var %bo = $ini(exceptions.ini,$1,0), %q = 0
while (%q <= %bo) {
var %opp = $ini(exceptions.ini,$1,%q)
if ($readini(exceptions.ini,n,$1,%opp) == chan) {
did -a highlight 49 %opp
}
inc %q
}
}
alias showbots {
if ($ini(exceptions.ini,$1,0) != 0) {
var %o = $ini(exceptions.ini,$1,0), %k = 0
while (%k <= %o) {
var %pp = $ini(exceptions.ini,$1,%k)
if ($readini(exceptions.ini,n,$1,%pp) == bot) {
did -a highlight 42 %pp
}
inc %k
}
}
}
alias highlighttrig {
var %i = 1
while (%i <= $lines(highlighttrigs.txt)) {
if ($regex($1,/ $+ $read(highlighttrigs.txt,%i) $+ /i)) || ($+(*,$me,*) iswm $1) { var %lo = go | .break }
;($+(*,$read(highlighttrigs.txt,%i),*) iswm $1)
else inc %i
}
if (%lo) {
var %nn = 1, %lnick = 0
while (%nn <= $nick($2,0)) {
if ($+(*,$nick($2,%nn),*) iswm $1) { inc %lnick }
inc %nn
}
;$floor($calc($nick($2,0) /5*3))
if %lnick >= 5 && %highlight.mass == on { return no }
else { return yes }
}
}
alias nochan {
var %i = 1
while (%i <= $ini(exceptions.ini,$2,0)) {
if ($ini(exceptions.ini,$2,$1)) && ($readini(exceptions.ini,n,$2,$1) == chan) { return yes | .break }
else { inc %i }
}
}
alias clearhvars { unset %highlight.cclick %current.server }
alias -l updateit {
if (!$isfile(arbitersbannercopy.jpg)) dlpic
did -c highlight $iif(%logging.high == on,11,12)
did -c highlight $iif(%highlight.yeah == on,17,18)
var %i = 1
while (%i <= $lines(highlights.txt)) {
did -a highlight 4 $read(highlights.txt,n,%i)
inc %i
}
var %l = 1
while (%l <= $lines(highlighttrigs.txt)) {
did -a highlight 20 $read(highlighttrigs.txt,n,%l)
inc %l
}
if ($ini(exceptions.ini,$1,0) != 0) {
var %t = $ini(exceptions.ini,$1,0), %h = 0
did -a highlight 42 $+($str(—,6),User Nicks,$str(—,6))
while (%h <= %t) {
var %i = $ini(exceptions.ini,$1,%h)
if ($readini(exceptions.ini,$1,%i) == user) {
did -a highlight 42 %i
}
inc %h
}
}
if ($ini(exceptions.ini,$1,0) != 0) {
var %o = $ini(exceptions.ini,$1,0), %k = 0
did -a highlight 42 $+($str(—,6),Service Bots,$str(—,5))
while (%k <= %o) {
var %pp = $ini(exceptions.ini,$1,%k)
if ($readini(exceptions.ini,n,$1,%pp) == bot) {
did -a highlight 42 %pp
}
inc %k
}
}
did -c highlight $iif(%highlightprot.status == on,27,28)
if (%highlightprot.status == on) did -n highlight 36,37
else did -m highlight 36,37
did -a highlight 36 %highlight.secs
did -a highlight 37 %highlight.times
did -m highlight 47
did -b highlight 46
if (%highlight.mass == on) { did -c highlight 57 }
if (%highlight.mins) { did -a highlight 51 %highlight.mins }
if (%highlight.msg) { did -a highlight 53 %highlight.msg }
if (%highlight.idle == on) { did -n highlight 51,53 | did -c highlight 50 }
else { did -m highlight 51,53 }
if (%highlight.flash == on) { did -c highlight 64 }
if (%highlight.beep == on) { did -c highlight 63 }
if (%highlight.actions == on) { did -c highlight 66 }
if (%highlight.notice == on) { did -c highlight 32 }
var %bo = $ini(exceptions.ini,$1,0), %q = 0
while (%q <= %bo) {
var %opp = $ini(exceptions.ini,$1,%q)
if ($readini(exceptions.ini,n,$1,%opp) == chan) {
did -a highlight 49 %opp
}
inc %q
}
var %server = $scon(0)
while %server {
did -a highlight 61 $scon(%server).network
if ($scon(%server).network == $1) var %tempserv2 = $scon(%server).network
dec %server
}
set %current.server %tempserv2
var %use.server = $didwm(highlight,61,$+(*,%current.server,*))
did -c highlight 61 %use.server
}
alias -l c. { return $+($chr(3),$color(info text).dd,$1-,$chr(3)) }
alias -l closeit {
dialog -x highlight
dialog -dm highlight highlight
if ($1) { $1- }
}
alias highlightlogs {
if ($dialog(highlight)) { dialog -x highlight | dialog -dm highlight highlight }
else { dialog -dm highlight highlight }
}
on ^*:NOTICE:*:?: {
if ($nick = BotServ && %botlist) {
haltdef
if ($regex($1-,/^(\S+) \(\w+@\w+\.\w+(?:\.\w+)*\)$/Si)) { writeini -n exceptions.ini $network $regml(1) bot }
elseif ($regex($1-,/^(\d+) bots available\.$/Si)) {
unset %botlist
echo -at $c.(Finished writing bots to Botlist. There are currently $regml(1) bots available. This alias was written by Kol of SwiftIRC.)
}
}
}
alias isbot {
if ($readini(exceptions.ini,n,$2,$1)) { return $true }
else { return $false }
}
alias botlist {
echo -at $c.(Updating BotList)
if ($ini(exceptions.ini,$1,0) != 0) {
var %o = $ini(exceptions.ini,$1,0), %k = 0
while (%k < %o) {
var %pp = $ini(exceptions.ini,$1,%k)
if ($readini(exceptions.ini,n,$1,%pp) == bot) {
remini exceptions.ini $1 %pp
}
inc %k
}
}
writeini -n exceptions.ini $1 NickServ bot
writeini -n exceptions.ini $1 ChanServ bot
writeini -n exceptions.ini $1 BotServ bot
writeini -n exceptions.ini $1 MemoServ bot
writeini -n exceptions.ini $1 HostServ bot
var %server = $scon(0)
while %server {
if ($scon(%server).network == $1) var %tempserv = %server
dec %server
}
scon %tempserv
bs botlist
set %botlist on
}
alias nohtml {
var %x,%i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x)
%x = $replace(%x, ,$null)
return %x
}
alias hvcheck {
if ($sock(hvcheck)) sockclose hvcheck
sockopen hvcheck arbiter.novahost.org 80
}
on *:SOCKOPEN:hvcheck: {
sockwrite -nt $sockname GET /scripts/hversion.txt HTTP/1.1
sockwrite -nt $sockname Host: arbiter.novahost.org
sockwrite -nt $sockname $crlf $crlf
}
on *:SOCKREAD:hvcheck: {
if ($sockerr) { echo -at $c.(There was an error connecting. $+($chr(40),$sockerr,-,$sockname,$chr(41))) | halt }
var %x
sockread %x
if (*<b>*</b>* iswm %x) {
tokenize 32 %x
var %hversion = $nohtml($1), %mversion = $nohtml($2)
}
if %hversion && %mversion {
if ($hversion < %hversion) echo -at $c.(Your Highlight script version $+($chr(40),$hversion,$chr(41)) is out of date! The current version $&
is %hversion for mIRC $+(v,%mversion),. You may obtain an updated version at http://arbiter.novahost.org/scripts/higlight.txt)
elseif ($hversion = %hversion) echo -at $c.(Your Highlight script is up to date! $&
$+($chr(40),v,$hversion,$chr(41))) $iif($version < $remove(%mversion,+),$c.(but your mIRC $&
version is out of date! Please update your mIRC version to %mversion))
else echo -at $c.(It seems you've obtained a newer version of Arbiters Highlight script than Arbiter himself!)
}
}
alias dlpic {
if ($sock(dlpic)) sockclose dlpic
sockopen dlpic arbiter.novahost.org 80
}
on *:sockopen:dlpic:{
sockwrite -nt $sockname GET /images/arbitersbannercopy.jpg HTTP/1.1
sockwrite -nt $sockname Host: arbiter.novahost.org
sockwrite -nt $sockname $crlf $crlf
}
on *:sockread:dlpic: {
if ($sockerr) { echo -at $c.(There was an error connecting. $+($chr(40),$sockerr,-,$sockname,$chr(41))) | halt }
if (!$sock($sockname).mark) {
var %SockReader
sockread %SockReader
if (%SockReader == $null) { sockmark $sockname 1 }
}
else {
sockread &picture
bwrite $qt($mIRCdir $+ arbitersbannercopy.jpg) -1 -1 &picture
}
}
alias renini {
var %filename = $+(", $left($remove($gettok($1-, 1, 63), "), -1), "), %echo = echo $colour(in) -qa *** /renini:
tokenize 32 $gettok($1-, 2-, 63)
if (!$isfile(%filename)) {
%echo File not found: %filename
return
}
if ($0 == 2) {
var %l = $read(%filename, nw, $+([, $1])), %l = $readn
if ($ini(%filename, $1)) && (%l) {
write $+(-l, %l) %filename $+([, $2])
%echo Renamed topic $+(", $1") to $+(", $2") in %filename
}
else { %echo Topic $+(", $1") not found in %filename }
}
if ($0 > 2) {
var %l = $read(%filename, nw, $+([, $1])), %l = $readn, %item
if ($ini(%filename, $1)) && (%l) {
if ($ini(%filename, $1, $2)) {
%item = $readini(%filename, n, $1, $2)
remini %filename $1-2
writeini -n %filename $1 $3 %item
%echo Renamed item $+(", $2") from topic $+(", $1") to $+(", $3") in %filename
}
else { %echo Item $+(", $2") from topic $+(", $1") not found in %filename }
}
else { %echo Topic $+(", $1") not found in %filename }
}
}
on *:start:{ if (!$isfile(arbitersbannercopy.jpg)) dlpic }
on *:load:{
if (!$isfile(arbitersbannercopy.jpg)) dlpic
%highlight.secs = 15
%highlight.times = 5
%highlightprot.status = off
%highlight.notice = off
%highlight.yeah = off
%highlight.ctime = $ctime
echo -a $c.(*** You've just loaded Arbiters highlight script $+(v,$hversion,!) Right click anywhere on a channel and select "Highlights" to configure the script. All options are off by default.)
hvcheck
}
on *:unload:{
if ($input(Do you wish to remove all variables related to this script? (If you don't plan on using this script again, this is recommended),qy,Highlights $+(v,$hversion)) == $true) {
unset %highlight.* %highlightprot.status %logging.high %highlights.*
}
}