Displays Addon — File Browser
DisplaysAddonv1.0 / DisplaysAddonv1.0 / theme.mrc
theme.mrc — 18.11 KB — Download this file
on *:start:debug on
on *:load:{
writedef
echo 3 -a The addon was loaded
echo 3 -a Default settings loaded
echo 3 -a To change your displays type 4/themes
}
on ^!*:action:*:#:{ themeact # $nick $1- | haltdef }
on ^*:action:*:?:{ themeact $query($nick) $nick $1- | beep 1 1 | haltdef }
on ^*:ban:#:{ getmodes | haltdef }
on ^*:dehelp:#:{ getmodes | haltdef }
on ^*:deop:#:{ getmodes | haltdef }
on ^*:devoice:#:{ getmodes | haltdef }
on ^*:help:#:{ getmodes | haltdef }
on *:INPUT:*: {
if ($left($1-,1) != /) {
{ .msg $active $1- | haltdef }
echo $colour(own) -at $thmesprefix $+ $showprefix($active,$me) $+ $me $+ $thmessuffix $1-
}
}
on ^*:invite:#:{ themeinv # $nick | haltdef }
on ^*:join:#:{ themejoin # $nick | haltdef }
on ^*:kick:#:{ themekick # $nick $knick $1- | haltdef }
on ^*:mode:#:{ getmodes | haltdef }
on ^*:nick:{ themenick $nick $newnick | haltdef }
on ^*:notice:*:*:{ themenot $nick $1- | beep 5 1 | haltdef }
on ^*:notify:{ themenotify $nick | haltdef }
on ^*:op:#:{ getmodes | haltdef }
on ^!*:PART:#: { themepart # $nick | haltdef }
on ^!*:QUIT: { themequit $nick $1- | haltdef }
on ^*:SERVERDEOP:#: { getmodes | haltdef }
on ^*:SERVERMODE:#: { getmodes | haltdef }
on ^*:SERVEROP:#: { getmodes | haltdef }
on ^*:SNOTICE:* { themesnot $nick $2- | beep 5 1 | haltdef }
on ^!*:TEXT:*:#: {
; if ($me isin $1-2) { %nick = $pxt.highlight($nick) }
; else { %nick = $nick }
themetext # $nick $1-
haltdef
}
on ^*:TEXT:*:?: {
if ($query($nick) != $nick) { query $nick | beep 5 1 }
themetext $query($nick) $nick $1-
if (($active != $query($nick)) || ($appactive == $false)) { beep 1 1 }
haltdef
}
on ^*:open:?:{ beep 5 1 }
on ^*:CHAT:*: {
if ($chat($nick)) { themetext = $+ $chat($nick) $nick $1- }
haltdef
}
on ^*:TOPIC:#: { themetopic # $nick $1- | haltdef }
on ^*:UNOTIFY: { themeunotify $nick | haltdef }
on ^*:UNBAN:#: { getmodes | haltdef }
on ^*:USERMODE: { themeumode $1- | haltdef }
on ^*:VOICE:#: { getmodes | haltdef }
alias getmodes {
set %modes $read -nl [ $+ [ $lines(debug.log) ] ] debug.log
set %modes $gettok(%modes,4-,32)
if (%modes) {
thememode # $nick %modes | write -c debug.log | unset %modes | updatenl
}
}
alias action { if ($1) { .describe $1 $2- | themeact $1 $me $2- } }
alias ame {
if ($1) {
%i = 0
:loop
inc %i 1
if ($chan(%i) == $null) { goto end }
else { .describe $chan(%i) $1- | themeact $chan(%i) $me $1- | goto loop }
:end
unset %i
}
return
}
alias me { if ($1) { .describe $active $1- | themeact $active $me $1- } }
;
;=================================================================================
;THE DIALOG
;=================================================================================
;
dialog themes {
title "Change'em all!"
size -1 -1 270 200
option dbu
box "",100,2 -1 266 199
text "Choose joins appearence:",3,5 6 65 7
edit "",4,88 5 20 10, autohs
text "$nick",299,113 6 20 7
edit "",104,133 5 40 10, autohs
text "Choose parts appearence:",5,5 17 65 7
edit "",6,88 16 20 10, autohs
text "$nick",298,113 17 20 7
edit "",105,133 16 40 10, autohs
text "Choose quits appearence:",7,5 28 65 7
edit "",8,88 27 20 10, autohs
text "$nick",297,113 28 20 7
edit "",106,133 27 40 10, autohs
text "(reason)",290,180 28 30 7
text "Choose nickchanges appearence:",9,5 39 84 7
edit "",10,88 38 20 10 , autohs
text "$nick",296,113 39 20 7
edit "",107,133 38 40 10, autohs
text "$newnick",292,180 39 24 7
text "Choose kicks appearence:",11,5 83 65 7
edit "",12,88 82 20 10, autohs
text "$knick",295,113 83 20 7
edit "",108,133 82 40 10, autohs
text "$nick (reason)",240,180 83 70 7
text "Choose invites appearence:",13,5 61 75 7
edit "",14,88 60 20 10, autohs
text "$nick",294,113 61 20 7
edit "",109,133 60 40 10, autohs
text "$chan",291,180 61 20 7
text "Choose topics appearence:",15,5 72 75 7
edit "",16,88 71 20 10, autohs
text "$nick",293,113 72 20 7
edit "",110,133 71 40 10, autohs
text "the new topic",289,180 72 40 7
text "Choose modes appearence:",17,5 50 75 7
edit "",18,88 49 20 10, autohs
text "$nick",288,113 50 20 7
edit "",287,133 49 40 10,autohs
text "changed modes",286,180 50 50 7
box "",456, 2 94 266 104
text "Choose messages appearence:",21,5 116 75 7
edit "",22,88 114 20 10, autohs
text " $+ $nick $+ ",999,110 116 30 7
edit "",998,143 114 20 10, autohs
check "Show mode prefix",123,190 116 70 7
text "Choose actions appearence:",23,5 105 83 7
edit "",24,88 103 20 10, autohs
text " $nick",124,110 105 20 7
check "Show mode prefix",125,190 105 70 7
text "Choose notices appearence:",25,5 127 75 7
edit "",26,88 125 20 10, autohs
text " $+ $nick $+ ",997,110 127 30 7
edit "",996,143 125 20 10, autohs
text "Choose snotices appearence:",27,5 138 75 7
edit "",28,88 136 20 10, autohs
text " $+ $nick $+ ",995,110 138 30 7
edit "",994,143 136 20 10, autohs
box "",567,2 149 266 49
text "Choose notifies appearence:",29,5 160 75 7
edit "",30,88 158 20 10, autohs
text " $nick",130,110 160 20 7
edit "",126,133 158 40 10,autohs
text "Choose unotifies appearence:",31,5 171 75 7
edit "",32,88 169 20 10, autohs
text " $nick",131,110 171 20 7
edit "",127,133 169 40 10,autohs
text "Choose usermodes appearence:",33,5 182 80 7
edit "",34,88 180 20 10, autohs
text " $me",132,110 182 20 7
edit "",128,133 180 40 10,autohs
check "Show address",35, 222 6 40 7
check "Show chan",135, 180 6 40 7
check "Show address",36, 222 17 40 7
check "Show chan",136, 180 17 40 7
check "Show address",37, 222 28 40 7
check "Show address",38, 222 39 40 7
check "Show address",39, 222 61 40 7
check "Show address",41, 222 72 40 7
check "Show address",40, 222 50 40 7
button "Reset to defaults", 434, 188 158 70 10
button "OK",1,188 180 30 10,ok
button "Cancel",2,228 180 30 10,cancel
}
alias themes dialog -mdv themes themes
on *:dialog:themes:init:*:{ loadprefs }
on *:dialog:themes:sclick:1:{ writeprefs }
on *:dialog:themes:sclick:434:{ dialog -x themes | writedef | dialog -mdv themes themes }
alias -l loadprefs {
if ($themeread(join) == 1) did -c $dname 35
if ($themeread(part) == 1) did -c $dname 36
if ($themeread(quit) == 1) did -c $dname 37
if ($themeread(nick) == 1) did -c $dname 38
if ($themeread(inv) == 1) did -c $dname 39
if ($themeread(mode) == 1) did -c $dname 40
if ($themeread(topic) == 1) did -c $dname 41
if ($themeread(prefix) == 1) did -c $dname 123
if ($themeread(aprefix) == 1) did -c $dname 125
if ($themeread(chanjoin) == 1) did -c $dname 135
if ($themeread(chanpart) == 1) did -c $dname 136
did -a $dname 4 $colourget($themeread(joinprefix))
did -a $dname 6 $colourget($themeread(partprefix))
did -a $dname 8 $colourget($themeread(quitprefix))
did -a $dname 10 $colourget($themeread(nickprefix))
did -a $dname 12 $colourget($themeread(kickprefix))
did -a $dname 14 $colourget($themeread(invprefix))
did -a $dname 16 $colourget($themeread(topicprefix))
did -a $dname 18 $colourget($themeread(modeprefix))
did -a $dname 22 $colourget($themeread(mesprefix))
did -a $dname 994 $colourget($themeread(snotsuffix))
did -a $dname 996 $colourget($themeread(notsuffix))
did -a $dname 998 $colourget($themeread(messuffix))
did -a $dname 24 $colourget($themeread(actprefix))
did -a $dname 26 $colourget($themeread(notprefix))
did -a $dname 28 $colourget($themeread(snotprefix))
did -a $dname 30 $colourget($themeread(notifyprefix))
did -a $dname 32 $colourget($themeread(unotifyprefix))
did -a $dname 34 $colourget($themeread(umodeprefix))
did -a $dname 104 $colourget($themeread(joinend))
did -a $dname 105 $colourget($themeread(partend))
did -a $dname 106 $colourget($themeread(quitend))
did -a $dname 107 $colourget($themeread(nickend))
did -a $dname 108 $colourget($themeread(kickend))
did -a $dname 109 $colourget($themeread(invend))
did -a $dname 110 $colourget($themeread(topicend))
did -a $dname 126 $colourget($themeread(notifyend))
did -a $dname 127 $colourget($themeread(unotifyend))
did -a $dname 128 $colourget($themeread(umodeend))
did -a $dname 287 $colourget($themeread(modeend))
}
alias -l writeprefs {
themewrite join $did(35).state
themewrite part $did(36).state
themewrite quit $did(37).state
themewrite nick $did(38).state
themewrite inv $did(39).state
themewrite mode $did(40).state
themewrite topic $did(41).state
themewrite prefix $did(123).state
themewrite aprefix $did(125).state
themewrite chanjoin $did(135).state
themewrite chanpart $did(136).state
if ($did($dname,4).text) themewrite joinprefix $colourput($did($dname,4).text)
if ($did($dname,6).text) themewrite partprefix $colourput($did($dname,6).text)
if ($did($dname,8).text) themewrite quitprefix $colourput($did($dname,8).text)
if ($did($dname,10).text) themewrite nickprefix $colourput($did($dname,10).text)
if ($did($dname,12).text) themewrite kickprefix $colourput($did($dname,12).text)
if ($did($dname,14).text) themewrite invprefix $colourput($did($dname,14).text)
if ($did($dname,16).text) themewrite topicprefix $colourput($did($dname,16).text)
if ($did($dname,18).text) themewrite modeprefix $colourput($did($dname,18).text)
if ($did($dname,22).text) themewrite mesprefix $colourput($did($dname,22).text)
if ($did($dname,998).text) themewrite snotsuffix $colourput($did($dname,994).text)
if ($did($dname,998).text) themewrite notsuffix $colourput($did($dname,996).text)
if ($did($dname,998).text) themewrite messuffix $colourput($did($dname,998).text)
if ($did($dname,24).text) themewrite actprefix $colourput($did($dname,24).text)
if ($did($dname,26).text) themewrite notprefix $colourput($did($dname,26).text)
if ($did($dname,28).text) themewrite snotprefix $colourput($did($dname,28).text)
if ($did($dname,30).text) themewrite notifyprefix $colourput($did($dname,30).text)
if ($did($dname,32).text) themewrite unotifyprefix $colourput($did($dname,32).text)
if ($did($dname,34).text) themewrite umodeprefix $colourput($did($dname,34).text)
if ($did($dname,126).text) themewrite notifyend $colourput($did($dname,126).text)
if ($did($dname,127).text) themewrite unotifyend $colourput($did($dname,127).text)
if ($did($dname,128).text) themewrite umodeend $colourput($did($dname,128).text)
themewrite joinend $colourput($did($dname,104).text)
themewrite partend $colourput($did($dname,105).text)
themewrite quitend $colourput($did($dname,106).text)
themewrite nickend $colourput($did($dname,107).text)
themewrite kickend $colourput($did($dname,108).text)
themewrite invend $colourput($did($dname,109).text)
themewrite topicend $colourput($did($dname,110).text)
themewrite modeend $colourput($did($dname,287).text)
}
alias -l themeread { return $readini mirc.ini themes $1 }
alias -l themewrite { writeini mirc.ini themes $1- }
alias -l colourput { return $replace($1-,$chr(3),$chr(153),$chr(2),$chr(176),$chr(31),$chr(175),$chr(22),$chr(247)) }
alias -l colourget { return $replace($1-,$chr(153),$chr(3),$chr(176),$chr(2),$chr(175),$chr(31),$chr(247),$chr(22)) }
;
;==================================================================================
;THEME SPECIFIC SHITS
;==================================================================================
;
alias -l themejoin { echo $colour(join) -lt $1 $thjoinprefix $+ $2 $showaddress($2,join) $thjoinend $showchan($1,chanjoin) }
alias -l themepart { echo $colour(part) -lt $1 $thpartprefix $+ $2 $showaddress($2,part) $thpartend $showchan($1,chanpart) }
alias -l themequit {
var %i = 1
while (%i <= $comchan($1,0)) {
if ($comchan($1,%i)) { echo $colour(quit) -lt $comchan($1,%i) $thquitprefix $+ $1 $showaddress($1,quit) $thquitend ( $+ $2- $+ $+ ) }
inc %i
}
echo $colour(quit) -lts $thquitprefix $+ $1 $showaddress($1,quit) has quit IRC ( $+ $2- $+ $+ )
echo $colour(info) -s -
}
alias -l themenick {
var %ii = 1
while (%ii <= $comchan($2,0)) {
if ($comchan($2,%ii)) { echo $colour(nick) -lt $comchan($2,%ii) $thnickprefix $+ $1 $showaddress($2,nick) $thnickend $2 }
inc %ii
}
}
alias -l themekick {
if ($3 != $me) { echo $colour(kick) -lt $1 $thkickprefix $+ $3 $thkickend $2 ( $+ $4- $+ $+ ) }
else {
if ($me ison $1) { echo $colour(kick) -lt $1 $thkickprefix $+ You were kicked by $2 ( $+ $4- $+ $+ ) }
echo $colour(kick) -stl $thkickprefix $+ You were kicked from $1 by $2 ( $+ $4- $+ $+ )
}
}
alias -l thememode { echo $colour(mode) -lt $1 $thmodeprefix $+ $2 $showaddress($2,mode) $thmodeend $3- }
alias -l themeinv { echo $colour(invite) -ta $thinvprefix $+ $2 $showaddress($2,inv) $thinvend $1 }
alias -l themetopic {
if ($3 != $null) { echo $colour(topic) -lt $1 $thtopicprefix $+ $2 $showaddress($2,topic) $thtopicend ' $3- $+ ' }
else { echo $colour(topic) -lt $1 $thtopicprefix $+ $2 $showaddress($2,topic) cleared the topic }
}
alias -l themeumode { echo $colour(info) -st $thumodeprefix $+ $me $thumodeend $1- }
alias -l themeact { echo $colour(action) -lt $1 $thactprefix $+ $showaprefix($1,$2) $+ $2 $3- }
alias -l themenotify { echo $colour(notify) -at $thnotifyprefix $+ $1 $thnotifyend | w $1 }
alias -l themeunotify { echo $colour(notify) -at $thunotifyprefix $+ $1 $thunotifyend }
alias -l themetext { echo $colour(normal) -lt $1 $thmesprefix $+ $+ $showprefix($1,$2) $+ $2 $+ $thmessuffix $+ $3- }
alias -l themenot { echo $colour(notice) -alt $thnotprefix $+ $+ $1 $+ $thnotsuffix $+ $2- }
alias -l themesnot { echo $colour(notice) -slt $thsnotprefix $+ $+ $1 $+ $thsnotsuffix $+ $2- }
alias -l thmodeprefix { return $colourget($themeread(modeprefix)) }
alias -l thjoinprefix { return $colourget($themeread(joinprefix)) }
alias -l thpartprefix { return $colourget($themeread(partprefix)) }
alias -l thquitprefix { return $colourget($themeread(quitprefix)) }
alias -l thkickprefix { return $colourget($themeread(kickprefix)) }
alias -l thnickprefix { return $colourget($themeread(nickprefix)) }
alias -l thinvprefix { return $colourget($themeread(invprefix)) }
alias -l thtopicprefix { return $colourget($themeread(topicprefix)) }
alias -l thmesprefix { return $colourget($themeread(mesprefix)) }
alias -l thmessuffix { return $colourget($themeread(messuffix)) }
alias -l thactprefix { return $colourget($themeread(actprefix)) }
alias -l thnotprefix { return $colourget($themeread(notprefix)) }
alias -l thnotsuffix { return $colourget($themeread(notsuffix)) }
alias -l thsnotprefix { return $colourget($themeread(snotprefix)) }
alias -l thsnotsuffix { return $colourget($themeread(snotsuffix)) }
alias -l thnotifyprefix { return $colourget($themeread(notifyprefix)) }
alias -l thunotifyprefix { return $colourget($themeread(unotifyprefix)) }
alias -l thumodeprefix { return $colourget($themeread(umodeprefix)) }
alias -l thjoinend {
if ($themeread(joinend)) { return $themeread(joinend) $+ }
else return $chr(32)
}
alias -l thpartend {
if ($themeread(partend)) { return $themeread(partend) $+ }
else return $chr(32)
}
alias -l thquitend {
if ($themeread(quitend)) { return $themeread(quitend) $+ }
else return $chr(32)
}
alias -l thnickend {
if ($themeread(nickend)) { return $themeread(nickend) $+ }
else return $chr(32)
}
alias -l thkickend {
if ($themeread(kickend)) { return $themeread(kickend) $+ }
else return $chr(32)
}
alias -l thinvend {
if ($themeread(invend)) { return $themeread(invend) $+ }
else return $chr(32)
}
alias -l thtopicend {
if ($themeread(topicend)) { return $themeread(topicend) $+ }
else return $chr(32)
}
alias -l thmodeend {
if ($themeread(modeend)) { return $themeread(modeend) $+ }
else return $chr(32)
}
alias -l thnotifyend {
if ($themeread(notifyend)) { return $themeread(notifyend) $+ }
else return $chr(32)
}
alias -l thunotifyend {
if ($themeread(unotifyend)) { return $themeread(unotifyend) $+ }
else return $chr(32)
}
alias -l thumodeend {
if ($themeread(umodeend)) { return $themeread(umodeend) $+ }
else return $chr(32)
}
alias -l showprefix {
if ($themeread(prefix) == 1) {
if ($2 isop $1) { return @ }
elseif ($2 isvo $1) { return + }
elseif ($2 ishelp $1) { return % }
else return $chr(32)
}
}
alias -l showaprefix {
if ($themeread(aprefix) == 1) {
if ($2 isop $1) { return @ }
elseif ($2 isvo $1) { return + }
elseif ($2 ishelp $1) { return % }
else return $chr(32)
}
}
alias -l themename { return default }
alias -l showaddress {
if ($themeread($2) == 1) { if ($address($1,0)) { return ( $+ $remove($address($1,0),*!) $+ ) } }
else return $chr(32)
}
alias -l showchan {
if ($themeread($2) == 1) { return $1 }
else return $chr(32)
}
alias -l writedef {
themewrite join 1
themewrite part 1
themewrite quit 1
themewrite nick 0
themewrite inv 1
themewrite mode 0
themewrite chanjoin 1
themewrite chanpart 1
themewrite joinprefix ***
themewrite partprefix ***
themewrite quitprefix ***
themewrite nickprefix ***
themewrite kickprefix ***
themewrite invprefix ***
themewrite topicprefix ***
themewrite modeprefix ***
themewrite mesprefix <
themewrite snotsuffix -
themewrite notsuffix -
themewrite messuffix >
themewrite actprefix *
themewrite notprefix -
themewrite snotprefix -
themewrite notifyprefix ***
themewrite unotifyprefix ***
themewrite umodeprefix ***
themewrite joinend has joined
themewrite partend has left
themewrite quitend has quit IRC
themewrite nickend is now known as
themewrite kickend was kicked by
themewrite invend invites you to join
themewrite topicend changes the topic to:
themewrite modeend sets mode:
themewrite topic 0
themewrite prefix 0
themewrite aprefix 0
themewrite notifyend is on IRC
themewrite unotifyend has left IRC
themewrite umodeend sets mode
}
menu menubar,channel {
Displays Addon
.Change displays:themes
.-
.Unload:{ remini mirc.ini themes | unload -rs theme.mrc }
}