rendered paste bodyon *:TEXT:*:#:{
if ($highlighttrig($1-) == yes) || ($+(*,$me,*) iswm $1-) {
if ($isbot($nick) == $false) {
if ($($+(%,highlightspam.,$address($nick,2)),2) >= 5) { .ignore -u60 $nick 2 | echo -a $nick triggerd your highlight spam protection! Ignoring user for 60 seconds. | unset $+(%,highlightspam.,$address($nick,2)) }
if ($appactive == $false) {
inc -u10 $+(%,highlightspam.,$address($nick,2))
if ($window(@Highlights)) { closewin | showpopup $nick highlighted you in $chan on $network saying $strip($qt($1-)) }
else { showpopup $nick highlighted you in $chan on $network saying $strip($qt($1-)) }
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT) @ $date(dd/mm/yy]) $+($nick,/,$chan,/,$network,:) $strip($1-) }
}
else {
echo -a $nick highlighted you in $chan on $network saying $strip($qt($1-))
inc -u10 $+(%,highlightspam.,$address($nick,2))
if (%logging.high == on) { write highlights.txt $time([hh:nn:ssTT) @ $date(dd/mm/yy]) $+($nick,/,$chan,/,$network,:) $strip($1-) }
}
}
}
}
menu channel,status {
-
Highlight Logs:highlightlogs
}
dialog highlight {
title Highlight logs $+($chr(40),$lines(highlights.txt),$chr(41))
size -1 -1 242 161
option dbu
list 1, 6 12 231 81, size hsbar vsbar
box "Logs", 2, 4 2 235 96
button "Delete", 3, 62 107 37 12
button "Clear logs", 4, 62 126 37 12
text "Written by Mr_White (AKA Arbiter) @ sir_sonic1234@yahoo.com", 9, 5 146 163 8
link "alice.heliohost.org", 11, 182 145 54 8
button "Close", 12, 107 126 37 12, ok cancel
radio "Enable Logging", 8, 7 112 50 10
radio "Disable Logging", 10, 7 128 50 10
button "Update Bots", 13, 107 107 37 12
text "Credit for the popup alias goes to Xnemesis (www.crispycrisp.org)", 14, 180 109 54 25
button "Highlight Triggers", 5, 149 110 27 27, multi
}
on *:dialog:highlight:*:*:{
if ($devent == init) && ($did == 0) { updateit }
if ($devent == sclick) {
if ($did == 3) {
var %l = $read(highlights.txt,nw,$+(*,$gettok($did(highlight,1).seltext,5-,32),*))
write -dw $+ $qt(%l) highlights.txt %l
closeit
}
if ($did == 4) { write -c highlights.txt | echo -at *** Highlight log files cleard. | closeit }
if ($did == 8) {
if (%logging.high == on) { echo -at *** Error: Highlight logging is already on. }
else {
set %logging.high on
echo -at *** Highlight logging enabled.
}
}
if ($did == 10) {
if (%logging.high == off) { echo -at *** Error: Highlight logging is already on. }
else {
set %logging.high off
echo -at *** Highlight logging disabled.
}
}
if ($did == 12) { dialog -x highlight }
if ($did == 13) { botlist }
if ($did == 5) { dialog -x highlight | dialog -dm trigs trigs }
}
}
dialog trigs {
title Highlight Triggers $+($chr(40),$lines(highlighttrigs.txt),$chr(41))
size -1 -1 242 161
option dbu
combo 1, 10 15 222 99, size edit hsbar vsbar
box "Triggers", 2, 6 6 230 112
button "Add", 3, 10 124 37 12
button "Delete", 4, 10 143 37 12
button "Clear", 5, 60 124 37 12
button "Save && Close", 6, 60 143 37 12, ok cancel
edit "Notes: Regex is not supported in the highlight triggers. To add a highlight, input it in the edit box above and hit Add. To delete a trigger, highlight the trigger in the list box and hit Delete. Clear removes all triggers.", 7, 106 121 131 37, read multi
}
on *:dialog:trigs:*:*:{
if ($devent == init) && ($did == 0) { updateit2 }
if ($devent == sclick) {
if ($did == 4) {
var %l = $read(highlighttrigs.txt,nw,$+(*,$did(trigs,1).seltext,*))
write -dw $+ $qt(%l) highlighttrigs.txt %l
closeit2
}
if ($did == 5) { write -c highlighttrigs.txt | echo -at *** Highlight triggers cleard. | closeit2 }
if ($did == 3) { write highlighttrigs.txt $did(trigs,1).text | closeit2 }
}
}
alias highlighttrig {
var %i = 1
while (%i <= $lines(highlighttrigs.txt)) {
if ($+(*,$read(highlighttrigs.txt,%i),*) iswm $1-) { return yes | break }
else { inc %i }
}
}
alias -l updateit2 {
var %i = 1
while (%i <= $lines(highlighttrigs.txt)) {
did -a trigs 1 $read(highlighttrigs.txt,n,%i)
inc %i
}
}
alias -l updateit {
did -c highlight $iif(%logging.high == on,8,10)
var %i = 1
while (%i <= $lines(highlights.txt)) {
did -a highlight 1 $read(highlights.txt,n,%i)
inc %i
}
}
alias -l closeit { dialog -x highlight | dialog -dm highlight highlight }
alias -l closeit2 { dialog -x trigs | dialog -dm trigs trigs }
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)) write bots.txt $regml(1)
elseif ($regex($1-,/^(\d+) bots available\.$/Si)) {
unset %botlist
echo -a Finished writing bots to BotList. There are currently $regml(1) bots available. This alias was written by Kol of SwiftIRC.
}
}
}
alias isbot return $iif($read(bots.txt,r,/^\Q $+ $$1 $+ \E$/),$true,$false)
alias botlist {
echo -a Updating BotList
bs botlist
set %botlist on
write -c bots.txt
}
alias closewin { close -@Highlights }
alias showPopup {
window -pBdk0w0o +blL @Highlights $calc(%highlights.screenx - 250) $calc(%highlights.screenx - 92) 250 63
drawfill @Highlights $popc1 $popc1 0 0
var %highlights.nxtln = $true, %highlights.popup = $1-, %highlights.y = 9
while (%highlights.nxtln) {
if ($len(%highlights.popup) > 50) {
if (%highlights.y == 39) {
drawtext -p @Highlights $popc2 10 %highlights.y $mid(%highlights.popup,0,46) ...
unset %highlights.nxtln
unset %highlights.popup
}
else {
drawtext -p @Highlights $popc2 10 %highlights.y $mid(%highlights.popup,0,50)
%highlights.popup = $mid(%highlights.popup,51,$mid(%highlights.popup,51,0))
}
}
else {
drawtext -p @Highlights $popc2 10 %highlights.y %highlights.popup
unset %highlights.nxtln
unset %highlights.popup
}
inc %highlights.y 10
}
.timer 1 5 close -@Highlights
}
alias -l popc1 {
return 15
}
alias -l popc2 {
return 01
}
on *:start:{
%highlights.screenx = $window(-1).w
%highlights.screeny = $window(-1).h
}
on *:load:{
%highlights.screenx = $window(-1).w
%highlights.screeny = $window(-1).h
}