VrS (Variant realities Script) — File Browser
VrSVariantrealitiesScriptv2.0 / VrSVariantrealitiesScriptv2.0 / VrS / System / Modules / vMI / VMI4.MRC
VMI4.MRC — 8.11 KB — Download this file
on *:signal:vTheme.Unload: {
set %theme.oldclineowner $theme.setting(ClineOwner)
set %theme.oldclineop $theme.setting(ClineOP)
set %theme.oldclinehop $theme.setting(ClineHOp)
set %theme.oldclinevoice $theme.setting(ClineVoice)
set %theme.oldclineregular $theme.setting(ClineRegular)
set %theme.oldclinecharowner $theme.setting(ClineCharOwner)
set %theme.oldclinecharop $theme.setting(ClineCharOp)
set %theme.oldCLineCharHOp $theme.setting(CLineCharHOp)
set %theme.oldclinecharvoice $theme.setting(ClineCharVoice)
}
on *:signal:vTheme.Load: {
:vtstart
if (%Wildcard == $null) { var %Wildcard = @vMI.*:Status | var %Font = $theme.setting(FontDefault) | var %Background = ImageStatus }
elseif (%Wildcard == @vMI.*:Status) { var %Wildcard = @vMI.*:#* | var %Font = $theme.setting(FontChan) | var %Background = ImageChan }
elseif (%Wildcard == @vMI.*:#*) { var %Wildcard = @vMI.*:* $+ $chr(160) | var %Font = $theme.setting(FontQuery) | var %Background = ImageQuery }
elseif (%Wildcard == [ @vMI.*:* $+ [ $chr(160) ] ] ) { var %Wildcard = @vMI.*DCC*:* | var %Font = $theme.setting(FontQuery) | var %Background = ImageQuery }
elseif (%Wildcard == @vMI.*DCC*:*) { goto vtend }
var %counter = 1
while (%counter <= $window(%Wildcard,0)) {
if (%Wildcard == [ @vMI.*:* $+ [ $chr(160) ] ] ) && ($left($gettok($window(%Wildcard,%counter),2-,58),1) isin &#+) { goto skip }
font $iif($gettok(%Font,3,44) == B,-b) $window(%Wildcard,%counter) $gettok(%Font,2,44) $gettok(%Font,1,44)
if ($theme.setting(%Background)) {
background $theme.bgoption($gettok($theme.setting(%::BG),1,32)) $window(%Wildcard,%counter) $+(",$themedir($gettok($theme.setting(%Background),2-,32)),")
}
else { background -x $window(%Wildcard,%counter) }
if ($left($gettok($window(%Wildcard,%counter),2-,58),1) isin &#+) { RedrawNicklist $window(%Wildcard,%counter) }
:skip
inc %counter
}
goto vtstart
:vtend
unset %theme.old*
}
alias -l RedrawNicklist {
; Syntax: /RedrawNicklist <Window>
var %counter = 1
var %Total = $line($1,0,1)
while (%counter <= %Total) {
set -u %::List. [ $+ [ %counter ] ] $line($1,%counter,1)
inc %counter
}
%counter = 1
while (%counter <= %Total) {
set -u %Line %::List. [ $+ [ %counter ] ]
var %Len = $calc($pos(%Line,,$pos(%Line,,0)) + 2)
if ($left(%Line,%Len) == $+(,%Theme.oldclinecharop,,%theme.oldclineop)) { var %Line2 = $+(,$theme.setting(clinecharop),,$theme.setting(clineop),$right(%Line, - [ $+ [ %Len ] ] )) }
elseif ($left(%Line,%Len) == $+(,%Theme.oldCLineCharHOp,,%theme.oldclinehop)) { var %Line2 = $+(,$theme.setting(CLineCharHOp),,$theme.setting(clinehop),$right(%Line, - [ $+ [ %Len ] ] )) }
elseif ($left(%Line,%Len) == $+(,%Theme.oldclinecharvoice,,%theme.oldclinevoice)) { var %Line2 = $+(,$theme.setting(clinecharvoice),,$theme.setting(clinevoice),$right(%Line, - [ $+ [ %Len ] ] )) }
else { var %Line2 = $+(,$theme.setting(clineregular),$right(%Line, - [ $+ [ %Len ] ] )) }
dline -l $1 $fline($1,$strip(%Line),1,1)
aline -l $1 %Line2
unset %Line2
inc %counter
}
}
on *:signal:vMIInternal.Invite: {
set -u %:echo vMI.Echo Status
theme.text Invite
}
on *:signal:vMIInternal.Raw.433: {
set -u %:echo vMI.NEcho -ai2
set -u %::nick $2
theme.text Raw.433
}
on *:signal:vMIInternal.PrivMsg: {
set -u %:echo vMI.Echo [ [ %vMIEvent.Nick ] $+ [ $chr(160) ] ]
theme.text TextQuery
}
on *:signal:vMIInternal.ChanMsg: {
if ($window($vMI.WinName(%vMIEvent.Chan),1)) {
set -u %vS.HilightMsg 1
set -u %::CMode $vMI.CMode($vIAL(%vMIEvent.Chan,%vMIEvent.Nick).Modes)
if ($mid($1-,1,3) == ø¿») { %::Text = $UEnc.DecryptText(%::Text) }
set -u %:echo vMI.Echo %vMIEvent.Chan
theme.text TextChan
}
}
on *:signal:vMIInternal.Action: {
if ($left(%vMIEvent.Chan,1) !isin &#+) {
set -u %::Nick %vMIEvent.Nick
set -u %::Text %vMIEvent.Text
set -u %:echo vMI.Echo [ [ %vMIEvent.Nick ] $+ [ $chr(160) ] ]
theme.text ActionQuery
}
else {
if ($window($vMI.WinName(%vMIEvent.Chan))) {
set -u %::Nick %vMIEvent.Nick
set -u %::Text %vMIEvent.Text
set -u %::CMode $vMI.CMode($vIAL(%vMIEvent.Chan,%vMIEvent.Nick).Modes)
set -u %:echo vMI.Echo %vMIEvent.Chan
theme.text ActionChan
}
}
}
on *:signal:vMIInternal.Notice: {
set -u %vS.HilightMsg 1
unset %vMIEvent.Chan
var %ntcounter = 1
var %vMIEvent.TotalChans = $vIAL(0)
while (%ntcounter <= %vMIEvent.TotalChans) {
set -u %vMIEvent.Chan $vIAL(%ntcounter)
if ($vIAL(%vMIEvent.Chan,%vMIEvent.Nick)) { set -u %vMIEvent.Noticed 1 | set -u %:echo vMI.Echo %vMIEvent.Chan | theme.text Notice }
inc %ntcounter
}
if (%vMIEvent.Noticed == $null) { set -u %:echo vMI.Echo Status | theme.text Notice }
}
on *:signal:vMIInternal.ChanNotice: {
set -u %vS.HilightMsg 1
set -u %::Nick %vMIEvent.Nick $+ : $+ %vMIEvent.Chan
set -u %:echo vMI.Echo %vMIEvent.Chan
theme.text Notice
}
on *:signal:vMIInternal.OpNotice {
set -u %vS.HilightMsg 1
set -u %::Nick %vMIEvent.Nick $+ : $+ %vMIEvent.NOTICEPREFIX $+ %vMIEvent.Chan
set -u %:echo vMI.Echo %vMIEvent.Chan
theme.text Notice
}
on *:signal:vMIInternal.HNotice {
set -u %vS.HilightMsg 1
set -u %::Nick %vMIEvent.Nick $+ : $+ %vMIEvent.NOTICEPREFIX $+ %vMIEvent.Chan
set -u %:echo vMI.Echo %vMIEvent.Chan
theme.text Notice
}
on *:signal:vMIInternal.VNotice {
set -u %vS.HilightMsg 1
set -u %::Nick %vMIEvent.Nick $+ : $+ %vMIEvent.NOTICEPREFIX $+ %vMIEvent.Chan
set -u %:echo vMI.Echo %vMIEvent.Chan
theme.text Notice
}
on *:signal:vMIInternal.SNotice: {
set -u %vS.HilightMsg 1
set -u %:echo vMI.Echo Status
theme.text Notice
}
on *:signal:vMIInternal.CtcpReply: {
set -u %:echo vMI.NEcho -ai2t
theme.text CtcpReply
}
on *:signal:vMIInternal.Input: {
set -u %vS.HilightMsg 1
if (%vMIEvent.Chan) { vMI.CMD.Msg %vMIEvent.Chan %vMIEvent.Text }
elseif (%vMIEvent.Nick) { vMI.CMD.Msg %vMIEvent.Nick %vMIEvent.Text }
}
on *:signal:vMIInternal.Topic: {
set -u %:echo vMI.Echo %vMIEvent.Chan
theme.text Topic
}
on *:signal:vMIInternal.Ctcp: {
if (%vMIEvent.CtcpEcho == 1) {
set -u %:echo vMI.Echo Status
theme.text $iif(!%::chan,Ctcp,CtcpChan)
}
}
on *:signal:vMIInternal.Join: {
if (%vMIEvent.Nick == $vMI.Me) {
set %:echo vMI.Echo %vMIEvent.Chan
theme.text JoinSelf
}
else {
if ($window($vMI.WinName(%vMIEvent.Chan),1)) {
set -u %:echo vMI.Echo %vMIEvent.Chan
theme.text Join
}
}
}
on *:signal:vMIInternal.Nick: {
var %Counter = 1, %TotalChans = $numtok(%vMIEvent.Chans,32)
if (%vMIEvent.NewNick == $vMI.Me) {
set -u %:echo vMI.Echo Status
theme.text NickSelf
}
while (%Counter <= %TotalChans) {
set -u %vMIEvent.Chan $gettok(%vMIEvent.Chans,%Counter,32)
set -u %:echo vMI.Echo %vMIEvent.Chan
if (%vMIEvent.NewNick == $vMI.Me) { theme.text NickSelf }
else { theme.text Nick }
inc %Counter
}
}
on *:signal:vMIInternal.Part: {
if (%vMIEvent.Nick != $vMI.Me) {
if ($window($vMI.WinName(%vMIEvent.Chan))) {
set -u %:echo vMI.Echo %vMIEvent.Chan
theme.text Part
}
}
}
on *:signal:vMIInternal.Quit: {
var %Counter = 1, %TotalChans = $numtok(%vMIEvent.Chans,32)
while (%Counter <= %TotalChans) {
set -u %vMIEvent.Chan $gettok(%vMIEvent.Chans,%Counter,32)
set -u %:echo vMI.Echo %vMIEvent.Chan
theme.text Quit
inc %Counter
}
}
on *:signal:vMIInternal.Kick: {
if (%vMIEvent.KNick == $vMI.Me) {
set -u %:echo vMI.Echo Status | theme.text KickSelf
set -u %:echo vMI.Echo %vMIEvent.Chan | theme.text KickSelf
set -u %:echo vMI.Echo %vMIEvent.Chan | theme.text Rejoin
}
else { set -u %:echo vMI.Echo %vMIEvent.Chan | theme.text Kick }
}
on *:signal:vMIInternal.UserMode: { set -u %:echo vMI.Echo Status | theme.text ModeUser }
on *:signal:vMIInternal.Mode: { set -u %:echo vMI.Echo %vMIEvent.Chan | theme.text Mode }
on *:signal:vMIInternal.ServerMode: { set -u %:echo vMI.Echo %vMIEvent.Chan | theme.text Mode }