ircZP — File Browser
ircZPv1.1 / ircZPv1.1 / zpdir / kte / Cache / Kte-Dyn-themeZP.mts-S4.mrc
Kte-Dyn-themeZP.mts-S4.mrc — 27.02 KB — Download this file
; Kte dynamic script file
; Do not edit or unload this file while using Kte!
; Kte-Dyn 1.3 4697432E 8F8D3061
alias theme.text {
if (!$var(%:echo)) { return $false }
_set .
if ($isalias(kte:: $+ $1)) { kte:: $+ $1 | return $true }
elseif (* iswm $hget(Kte.Theme, $1)) {
var %ln
set -n %ln $hget(Kte.Theme, $1)
if ($gettok(%ln, 1, 32) == !Script) { set -n %ln $deltok(%ln, 1, 32) }
else { set -n %ln % $+ :echo $dll($scriptdir $+ kte.dll, MTSPrecompile, %ln) $!+ % $+ :comment }
.timer.kte.theme 1 0 %ln | .timer.kte.theme -e | return $true
}
return $false
}
alias _kte.void
alias -l _set {
set -nu %::me $me | set -u %::server $server | set -u %::port $port
;
set -nu %::pre 3[12%3]
var %ts = 12(3h:nntt12) | set -nu %::timestamp $time(%ts)
if (!$1) {
if (!$var(%::nick)) { set -u %::nick $nick | if (!$var(%::address)) { set -u %::address $address } }
if (!$var(%::chan)) { set -u %::chan $chan }
if (!$var(%::target)) { set -u %::target $target }
haltdef
}
}
alias -l _chanevt {
if ($chan !ischan) { halt }
if ($nick($chan, $nick).pnick != $nick) { set -u %::cmode $left($ifmatch, 1) }
set -u %::cnick $nick($chan, $nick).color
}
alias -l _pt if (* iswm %::text) { set -nu %::parentext ( $+ %::text $+ ) } | else { unset %::parentext }
alias -l _entered {
var %def = $readini($mircini, events, default), %set
if (!%def) { %def = 0,0,0,0,0,0,0,0 }
%set = $readini($mircini, events, $1)
if (!%set) { %set = 0,0,0,0,0,0,0,0 }
while ($findtok(%set, 0, 1, 44)) { %set = $puttok(%set, $calc($gettok(%def, $ifmatch, 44) + 1), $ifmatch, 44) }
hadd Kte.Events $1 %set
}
alias -l _left hdel Kte.Events $1
alias -l _isactive if ($cid == $activecid) { return 1 } | return 0
alias -l _active if ($cid == $activecid) { return a } | return s
alias -l _ischat {
var %n = $mid($1, 2)
if (=* !iswm $1) { return 1 }
if (=* iswm $1) && (($chat(%n)) || ($fserv(%n))) { return 1 }
return 0
}
; events
on ^&*:JOIN:#:{
if ($nick == $me) { _entered $chan }
var %tgt = $gettok($hget(Kte.Events, $chan), 1, 44)
if (%tgt = 3) { haltdef | return }
_set | _chanevt
if (%tgt = 2) { set -u %:echo echo $color(join) -sti2 }
else { set -u %:echo echo $color(join) -ti2 $chan }
if ($nick == $me) { %:echo 3[12%3] 12You are now in 3 $+ %::chan $+ %:comment }
else { %:echo 3[12%3] 12Join:(3 $+ %::nick $+ 12)::(3 $+ %::address $+ 12) $+ %:comment }
}
on ^&*:PART:#:{
if ($nick != $me) {
var %tgt = $gettok($hget(Kte.Events, $chan), 2, 44)
_set | _chanevt
if (%tgt = 3) { return }
elseif (%tgt = 2) { set -u %:echo echo $color(join) -sti2 }
else { set -u %:echo echo $color(join) -ti2 $chan }
set -nu %::text $strip($1-, o) | _pt
%:echo 3[12%3] 12Part:(3 $+ %::nick $+ 12)::(3 $+ %::address $+ 12) $+ %:comment
}
else { _left $chan }
}
on ^&*:QUIT:{
var %i = $comchan($nick, 0), %tgt, %st = 0
_set | set -nu %::text $strip($1-, o) | _pt
while (%i) {
%::chan = $comchan($nick, %i)
%tgt = $gettok($hget(Kte.Events, %::chan), 3, 44)
if (%tgt = 4) { dec %i | continue }
if (%tgt = 3) || (%tgt = 2) { %st = 1 }
if (!%tgt) || (%tgt = 3) || (%tgt = 1) { %:echo = echo $color(quit) -ti2 %::chan | %:echo 3[12%3] 12Quit:(3 $+ %::nick $+ 12) Reason:(3 $+ %::parentext $+ 12) $+ %:comment }
dec %i
}
unset %::chan
if ($query($nick)) { %:echo = echo $color(quit) -ti2 $nick | %:echo 3[12%3] 12Quit:(3 $+ %::nick $+ 12) Reason:(3 $+ %::parentext $+ 12) $+ %:comment }
if (%st) { %:echo = echo $color(quit) -sti2 | %:echo 3[12%3] 12Quit:(3 $+ %::nick $+ 12) Reason:(3 $+ %::parentext $+ 12) $+ %:comment }
unset %:echo
}
on ^&*:NICK:{
var %i = $comchan($newnick, 0), %tgt
_set | set -u %::newnick $newnick
if ($nick == $me) { %:echo = echo $color(nick) -sti2 | %:echo 3[12%3] 12You are now known as:3 %::newnick $+ %:comment }
while (%i) {
%::chan = $comchan($newnick, %i)
%tgt = $gettok($hget(Kte.Events, %::chan), 7, 44)
if (%tgt != 2) { %:echo = echo $color(nick) -ti2 %::chan | %:echo 3[12%3] 3 $+ %::nick $+ 12 is know as 3 $+ %::newnick $+ %:comment }
dec %i
}
if ($query($newnick)) { unset %::chan | %:echo = echo $color(nick) -ti2 $newnick | %:echo 3[12%3] 3 $+ %::nick $+ 12 is know as 3 $+ %::newnick $+ %:comment }
unset %::chan %:echo
}
on ^&*:USERMODE:_set | set -nu %::modes $1- | set -u %:echo echo $color(mode) -sti2 | %:echo 3[12%3] 12You're usermodes are now set to:3 %::modes $+ %:comment
on ^&*:RAWMODE:#:{
var %tgt = $gettok($hget(Kte.Events, $chan), 4, 44)
if (%tgt = 3) { haltdef | return }
_set | _chanevt
if (%tgt = 2) { set -u %:echo echo $color(mode) -sti2 }
else { set -u %:echo echo $color(mode) -ti2 $chan }
set -nu %::modes $1- | %:echo 3[12%3] 12 $+ %::nick $+ 3 sets modes:12 %::modes $+ %:comment
}
on ^&*:TOPIC:#:{
var %tgt = $gettok($hget(Kte.Events, $chan), 5, 44)
if (%tgt = 3) { haltdef | return }
_set | _chanevt
if (%tgt = 2) { set -u %:echo echo $color(topic) -sti2 }
else { set -u %:echo echo $color(topic) -ti2 $chan }
set -nu %::text $1- | _pt | %:echo 3[12%3] 12Topic:(3 $+ %::text $+ 12) Nick:(3 $+ %::nick $+ 12) $+ %:comment
}
on ^&*:KICK:#:{
var %tgt = $gettok($hget(Kte.Events, $chan), 8, 44)
if (%tgt = 3) { haltdef | return }
_set | _chanevt
if (%tgt = 2) { set -u %:echo echo $color(kick) -sti2 }
else { set -u %:echo echo $color(kick) -ti2 $chan }
set -u %::knick $knick | set -u %::kaddress $gettok($address($knick, 5), 2, 33) | set -nu %::text $strip($1-, o)
_pt
if ($knick == $me) {
%:echo 3[12%3] 12You were kicked from 3 $+ %::chan $+ 12 by 3 $+ %::nick $+ 12 :: 3 $+ %::parentext $+ %:comment
set -u %:echo echo $color(kick) -seti2 | %:echo 3[12%3] 12You were kicked from 3 $+ %::chan $+ 12 by 3 $+ %::nick $+ 12 :: 3 $+ %::parentext $+ %:comment
_left $chan
}
else { %:echo 3[12%3] 12Kick:(3 $+ %::knick by %::nick $+ 12) Reason:(3 $+ %::parentext $+ 12) $+ %:comment }
}
on ^&*:INVITE:#:{
var %e = echo $color(invite) -ti2 | _set
if ($_isactive) && (@* !iswm $active) && ($hget(Kte.Events, Active.Invites)) { set -u %:echo %e $+ a }
else { set -u %:echo %e $+ s }
%:echo 3[12%3] 3 $+ %::nick $+ 12 has invited you to 3 $+ %::chan $+ %:comment
}
on ^&*:ERROR:*:_set | set -u %:echo echo $color(other) -sti2 | set -nu %::text $2- | _pt | %:echo 3[12%3] 12Error:3 %::text $+ %:comment
on ^&*:NOTIFY:{
_set | set -u %:echo echo $color(notify) -ti2 $+ $iif(($_isactive) && (@* !iswm $active), a, s)
set -nu %::text $notify($nick).note | _pt
%:echo 3[12%3] 3 $+ %::nick $+ 12 (3 $+ %::address $+ 12) is online! %:comment
}
on ^&*:UNOTIFY:{
_set | set -u %:echo echo $color(notify) -ti2 $+ $iif(($_isactive) && (@* !iswm $active), a, s)
set -nu %::text $notify($nick).note | _pt
%:echo 3[12%3] 3 $+ %::nick $+ 12 (3 $+ %::address $+ 12) is offline! %:comment
}
on ^&*:WALLOPS:*:{
_set | set -u %:echo echo $color(wallops) -ti2 $+ $iif(($_isactive) && (@* !iswm $active), a, s)
set -nu %::text $strip($1-, o) | _pt
}
on &*:DNS:{
_set
set -u %:echo echo $color(info) -ti2 $+ $iif(($_isactive) && (@* !iswm $active), a, s)
set -u %::iaddress $iaddress | set -u %::raddress $raddress | set -u %::naddress $naddress
if ($raddress) { %:echo 3[12%3] 12DNS for3 %::address $+ 12 is3 %::raddress $+ %:comment }
else { %:echo 3[12%3] 12DNS was not resolved3 %::raddress $+ %:comment }
}
on ^&*:SNOTICE:*:{
_set | set -u %:echo echo $color(notice) -sti2
set -nu %::text $strip($1-, o)
%:echo 12Server:(3 $+ %::nick $+ 12): $+ %::text $+ %:comment
}
on &*:INPUT:*:{
if ($0) && ((/* !iswm $1) || ($ctrlenter)) && (($active ischan) || ($query($active)) || (=* iswm $active)) && ($window($active, 0) = 1) {
say $1- | halt
}
}
alias say {
if ($isid) { return }
if ($status == disconnected) || (!$0) || (($active !ischan) && (!$query($active))) && (=* !iswm $active) {
.timer.kte 1 0 !say $1- | .timer.kte -e | halt
}
.!msg $active $1-
_set | set -u %:echo echo $color(own) -ati2
set -nu %::text $1- | set -u %::target $active | set -u %::nick $me
if ($active ischan) {
if ($nick($active, $me).pnick != $me) { set -u %::cmode $left($ifmatch, 1) }
set -u %::cnick $nick($active, $me).color
}
%:echo 12[ $+ %::nick $+ 12] %::text $+ %:comment
}
alias query {
if ($isid) { return }
if (!$0) { .timer.kte 1 0 !query | .timer.kte -e | halt }
!query $1
if ($0 > 1) {
if (!$server) { .timer.kte 1 0 !query $1- | .timer.kte -e | halt }
msg $1-
}
}
alias msg {
if ($isid) { return }
if ($0 < 2) || ((=* !iswm $1) && ($status == disconnected)) || (!$_ischat($1)) {
.timer.kte 1 0 !msg $1- | .timer.kte -e | halt
}
.!msg $1-
if (!$show) { return }
_set | set -nu %::text $2- | set -u %::target $1 | set -u %::nick $1
if ($1 ischan) || ($query($1)) || (=* iswm $1) {
set -u %:echo echo $color(own) -ti2 $1
if ($1 ischan) {
if ($nick($1, $me).pnick != $me) { set -u %::cmode $left($ifmatch, 1) }
set -u %::cnick $nick($1, $me).color
%:echo 12[ $+ %::nick $+ 12] %::text $+ %:comment
}
else { %:echo < $+ %::me $+ > %::text $+ %:comment }
}
else { set -u %:echo echo $color(own) -ti2 $+ $_active | %:echo -> * $+ %::nick $+ * %::text $+ %:comment }
}
alias amsg {
if ($isid) { return }
if ($status == disconnected) || (!$0) || (!$chan(0)) { .timer.kte 1 0 !amsg $1- | .timer.kte -e | halt }
!.amsg $1-
if (!$show) { return }
_set . | set -nu %::text $1- | set -u %::nick $me
var %i = $chan(0)
while (%i) {
set -u %::chan $chan(%i)
set -u %::target %::chan
set -u %:echo echo $color(own) -ti2 %::chan
if ($nick(%::chan, $me).pnick != $me) { set -u %::cmode $left($ifmatch, 1) }
set -u %::cnick $nick(%::chan, $me).color
%:echo 12[ $+ %::nick $+ 12] %::text $+ %:comment
dec %i
}
}
alias me {
if ($isid) { return }
if (!$server) || (!$0) || (($active !ischan) && (!$query($active))) && (=* !iswm $active) {
.timer.kte 1 0 !me $1- | .timer.kte -e | halt
}
.!describe $active $1-
if (!$show) { return }
_set | set -u %:echo echo $color(action) -ati2
set -nu %::text $1- | set -u %::target $active | set -u %::nick $me
if ($active ischan) {
if ($nick($active, $me).pnick != $me) { set -u %::cmode $left($ifmatch, 1) }
set -u %::cnick $nick($active, $me).color
}
%:echo 13* %::me %::text $+ %:comment
}
alias action {
if ($isid) { return }
if (!$server) || (!$0) || (($active !ischan) && (!$query($active))) && (=* !iswm $active) {
.timer.kte 1 0 !action $1- | .timer.kte -e | halt
}
me $1-
}
alias describe {
if ($isid) { return }
if (!$server) || ($0 < 2) || (!$_ischat($1)) {
.timer.kte 1 0 !describe $1- | .timer.kte -e | halt
}
.!describe $1-
if (!$show) { return }
_set | set -nu %::text $2- | set -u %::target $1 | set -u %::nick $1
if ($1 ischan) || ($query($1)) || (=* iswm $1) {
set -u %:echo echo $color(action) -ti2 $1
if ($1 ischan) {
if ($nick($1, $me).pnick != $me) { set -u %::cmode $left($ifmatch, 1) }
set -u %::cnick $nick($1, $me).color
%:echo 13* %::me %::text $+ %:comment
}
else { %:echo 6* %::me %::text $+ %:comment }
}
else { set -u %:echo echo $color(action) -ti2 $+ $_active | %:echo -> * $+ %::target $+ * %::text $+ %:comment }
}
alias ame {
if ($isid) { return }
if (!$server) || (!$0) || (!$chan(0)) { .timer.kte 1 0 !ame $1- | .timer.kte -e | halt }
!.ame $1-
if (!$show) { return }
_set . | set -nu %::text $1- | set -u %::nick $me
var %i = $chan(0)
while (%i) {
set -u %::chan $chan(%i)
set -u %::target %::chan
set -u %:echo echo $color(action) -ti2 %::chan
if ($nick(%::chan, $me).pnick != $me) { set -u %::cmode $left($ifmatch, 1) }
set -u %::cnick $nick(%::chan, $me).color
%:echo 13* %::me %::text $+ %:comment
dec %i
}
}
alias notice {
if ($isid) { return }
if (!$server) || ($0 < 2) { .timer.kte 1 0 !notice $1- | .timer.kte -e | halt }
.!notice $1-
if (!$show) { return }
_set | set -nu %::text $2- | set -u %::target $1 | set -u %::nick $1
set -u %:echo echo $color(notice) -ti2 $+ $_active
if ($1 ischan) { %:echo 3[12%3] 12[#N]To:(3 $+ %::nick $+ 12): $+ %::text $+ %:comment }
else { %:echo 3[12%3] 12[N]To:(3 $+ %::nick $+ 12): $+ %::text $+ %:comment }
}
on &^*:TEXT:*:#:{
_set | _chanevt | set -u %:echo echo $color(normal) -mlbfti2 $chan | set -nu %::text $strip($1-, o)
%:echo 12[ $+ %::nick $+ 12] %::text $+ %:comment
}
on &^*:ACTION:*:#:{
_set | _chanevt | set -u %:echo echo $color(action) -mlbfti2 $chan | set -nu %::text $strip($1-, o)
%:echo 13* %::nick %::text $+ %:comment
}
on &^*:NOTICE:*:#:{
_set | _chanevt | set -u %:echo echo $color(notice) -mti2 $chan | set -nu %::text $strip($1-, o)
%:echo 3[12%3] 12Channel Notice:(3 $+ %::nick $+ 12): $+ %::text $+ %:comment
}
on &^*:CHAT:*:{
if ($window(=$nick, 0) > 1) { return }
var %e = echo $color(normal) -mti2 | _set | set -nu %::text $strip($1-, o)
set -u %:echo %e =$nick | %:echo < $+ %::nick $+ > %::text $+ %:comment
}
on &^*:TEXT:*:?:{
var %e = echo $color(normal) -mti2 | _set | set -nu %::text $strip($1-, o)
if ($query($nick)) { set -u %:echo %e $nick | %:echo < $+ %::nick $+ > %::text $+ %:comment }
else {
if ($window(Message Window)) { set -u %:echo %e $+ d }
elseif ($_isactive) && (@* !iswm $active) && ($hget(Kte.Events, Active.Queries)) { set -u %:echo %e $+ a }
else { set -u %:echo %e $+ s }
%:echo < $+ %::nick $+ > %::text $+ %:comment
}
}
on &^*:ACTION:*:?:{
var %e = echo $color(action) -mti2 | _set | set -nu %::text $strip($1-, o)
if ($query($nick)) { set -u %:echo %e $nick | %:echo 6* %::nick %::text $+ %:comment }
else {
if ($window(Message Window)) { set -u %:echo %e $+ d }
elseif ($_isactive) && (@* !iswm $active) && ($hget(Kte.Events, Active.Queries)) { set -u %:echo %e $+ a }
else { set -u %:echo %e $+ s }
%:echo * %::nick %::text $+ %:comment
}
}
on &^*:NOTICE:*:?:{
var %e = echo $color(notice) -mti2 | _set
if ($_isactive) && (@* !iswm $active) && ($hget(Kte.Events, Active.Notices)) { set -u %:echo %e $+ a }
else { set -u %:echo %e $+ s }
set -nu %::text $strip($1-, o)
%:echo 3[12%3] 12Notice:(3 $+ %::nick $+ 12): $+ %::text $+ %:comment
}
ctcp ^&*:*:?:onctcp $1-
ctcp ^&*:*:#:onctcp $1-
alias -l onctcp {
if ($1 == VERSION) || (($target == $me) && ($1 == DCC)) { return }
var %ch = 0, %txt, %rpl
if ($target != $me) { %ch = 1 }
if ($target ischan) {
var %tgt = $gettok($hget(Kte.Events, $chan), 6, 44)
if (%tgt = 2) { set -u %:echo echo $color(ctcp) -seti2 }
else { set -u %:echo echo $color(ctcp) -eti2 $target }
}
else {
set -u %:echo echo $color(ctcp) -eti2 $+ $iif((@* !iswm $active) && ($_isactive) && ($hget(Kte.Events, Active.CTCPs)), a, s)
}
set -u %::ctcp $1
set -n %txt $2-
if ($1 == PING) { %txt = | set -n %rpl $1- }
elseif ($1- == TIME) { set -n %rpl $1 $fulldate }
elseif ($1- == FINGER) { set -n %rpl $1 $fullname (-) Idle $idle second $+ $iif(($idle != 1), s) }
set -nu %::text $strip(%txt, o)
_set
if (%ch) { %:echo 3[12%3] 12CTCP from:3 %::nick $+ 12:3 $+ %::ctcp $+ 12(3 $+ %::parentext $+ 12) $+ %:comment }
else { %:echo 3[12%3] 12Received CTCP from3: %::nick $+ 12:3 $+ %::ctcp %::parentext $+ %:comment }
if (%rpl) { !.ctcpreply $nick %rpl }
haltdef
}
alias ctcp {
if ($isid) { return }
if ($0 < 2) || (!$server) || ($2 == DCC) { .timer.kte 1 0 !ctcp $1- | .timer.kte -e | return }
.!ctcp $1-
if (!$show) { return }
set -u %::target $1
set -u %::ctcp $upper($2)
set -nu %::text $3-
_set .
set -u %:echo echo $color(ctcp) -ti2 $+ $_active
if ($1 ischan) { set -u %::chan $1 | %:echo 3[12%3] 12Ctcp:3 %::chan $+ 12:3 $+ %::ctcp $+ 12:3 $+ %::text $+ %:comment }
else { set -u %::nick $1 | %:echo 3[12%3] 12Ctcp:3 %::nick $+ 12:3 $+ %::ctcp $+ 12:3 $+ %::text $+ %:comment }
}
on &*:CTCPREPLY:*:{
var %rpl | set -n %rpl $2-
if ($1 == PING) && ($2- isnum) && ($2 < $ctime) { %rpl = $duration($calc($ctime - $2)) }
set -u %:echo echo $color(ctcp) -sti2
set -u %::ctcp $upper($1)
set -nu %::text $strip(%rpl, o)
_set | %:echo $chr(91) $+ %::nick %::ctcp $+ reply]: %::text $+ %:comment
haltdef
}
alias ctcpreply {
if ($isid) { return }
if ($0 < 2) || (!$server) { .timer.kte 1 0 !ctcpreply $1- | .timer.kte -e | return }
.!ctcpreply $1-
if (!$show) { return }
set -u %:echo echo $color(ctcp) -ti2 $+ $_active
set -u %::target $1
set -u %::ctcp $upper($2)
set -nu %::text $3-
set -u %::nick $1
_set . | %:echo 3[12%3] 12Ctcp:3 %::nick $+ 12:3 $+ %::ctcp $+ 12:3 $+ %::parentext $+ %:comment
}
alias dns {
if ($isid) { return }
if (!$0) || (($1 == -h) && ($0 = 1)) || ((. !isin $1) && ($1 != -h) && (!$server)) {
.timer.kte 1 0 !dns $1- | .timer.kte -e | return
}
.!dns $1-
if (!$show) { return }
var %h = $1, %f
if ($istok(-h -c, $1, 32)) { %f = $1 | %h = $2 }
if (%f != -h) && (. !isin %h) && ($address(%h, 5)) { %h = $gettok($ifmatch, 2, 64) }
set -u %:echo echo $color(info) -ti2 $+ $iif((@* iswm $active) && ($_isactive), s, a)
set -u %::address %h
_set . | %:echo 3[12%3] 12Please wait, resolving3 %::address $+ %:comment
}
; ----------------------------------------------------------------------
; Numeric (raw) events ------------------------------------------------
; ----------------------------------------------------------------------
raw 002:*:set -u %::value $ [ $+ [ $0 ] ] | _doraw $1-
raw 003:*:if ($2-5 == this server was created) { set -u %::value $6- } | _doraw $1-
raw 221:*:set -u %::nick $me | set -u %::modes $2 | _doraw $1-
raw 250:*:set -u %::value $5 | _doraw $1-
raw 251:*:set -u %::users $4 | set -u %::text $7 | set -u %::value $10 | _doraw $1-
raw 255:*:set -u %::users $4 | set -u %::value $7 | _doraw $1-
raw 265:*:set -u %::users $5 | set -u %::value $7 | _doraw $1-
raw 266:*:set -u %::users $5 | set -u %::value $7 | _doraw $1-
raw 301:*:{
if ($halted) { return }
if ($hget(Kte.Whois)) { hadd Kte.Whois Away $3- | haltdef }
else { set -u %::nick $2 | set -nu %::away $3- | set -nu %::text $3- | _doraw $1- }
}
raw 302:*:{
if ($halted) || (!$isalias(kte::Raw.302)) { return }
var %i = 2, %t = $0, %p, %addr, %pos
while (%i <= %t) {
%p = $ [ $+ [ %i ] ]
%addr = $gettok(%p, 2, 61)
%pos = $pos(%addr, $left($remove(%addr, +, -), 1), 1)
set -u %::nick $gettok(%p, 1, 61)
set -u %::address $mid(%addr, %pos)
set -u %::value $left(%addr, $calc(%pos - 1))
if ($right(%::nick, 1) == *) { %::nick = $left(%::nick, -1) | %::value = %::value $+ * }
._doraw $1-
inc %i
}
}
; /list
raw 321:*:if (!$halted) && ($isalias(kte::Raw.321)) { _doraw $1- }
raw 322:*:if (!$halted) && ($isalias(kte::Raw.322)) { _doraw $1- }
raw 323:*:if (!$halted) && ($isalias(kte::Raw.323)) { _doraw $1- }
; /links
raw 364:*:if (!$halted) && ($isalias(kte::Raw.364)) { _doraw $1- }
raw 365:*:if (!$halted) && ($isalias(kte::Raw.365)) { _doraw $1- }
raw 324:*:set -u %::chan $2 | set -u %::value $3- | set -u %::modes $3- | set -u %::text $3- | _doraw $1-
raw 329:*:set -u %::chan $2 | set -u %::value $asctime($3) | set -u %::text $3- | _doraw $1-
raw 333:*:set -u %::chan $2 | set -u %::nick $3 | set -u %::value $asctime($4) | set -u %::text %::value | _doraw $1-
raw 341:*:set -u %::nick $2 | set -u %::chan $3 | _doraw $1-
raw 352:*:{
if ($2 != *) { set -u %::chan $2 }
set -u %::address $+($3, @, $4)
set -u %::wserver $5
set -u %::nick $6
set -u %::away $iif((h isin $7), H, G)
set -u %::isoper is $iif((* !isin $7), not)
set -u %::cmode $remove($7, *, H, G)
set -u %::value $8
set -u %::realname $9-
_doraw $1-
}
raw 353:*:set -u %::chan $2 | set -u %::text $3- | _doraw $1-
raw 372:*:set -nu %::text $3- | _doraw $1-
raw 391:*:set -u %::text $3- | _doraw $1-
; whois
raw 311:*:{
var %h = Kte.Whois
if ($halted) { return }
if ($hget(%h)) { showwhois Whois }
if (* iswm $theme.setting(Whois)) {
if (!$hget(%h)) { hmake %h 4 } | hadd %h Nick $2 | hadd %h Address $+($3, @, $4)
hadd %h RealName $6- | haltdef
}
if ($isalias(kte::Raw.311)) {
set -u %::nick $2
set -u %::address $+($3, @, $4)
set -nu %::realname $6-
._doraw $1-
}
}
raw 314:*:{
var %h = Kte.Whois
if ($halted) { return }
if ($hget(%h)) { showwhois Whowas }
elseif (* iswm $theme.setting(Whowas)) {
if (!$hget(%h)) { hmake %h 4 } | hadd %h Nick $2 | hadd %h Address $+($3, @, $4)
hadd %h RealName $6- | haltdef
}
if ($isalias(kte::Raw.314)) {
set -u %::nick $2 | set -u %::address $+($3, @, $4) | set -nu %::realname $6- | ._doraw $1-
}
}
raw 319:*:{
if ($halted) { return }
if ($hget(Kte.Whois)) { hadd Kte.Whois Chan $hget(Kte.Whois, Chan) $3- | haltdef }
if ($isalias(kte::Raw.319)) { set -u %::nick $2 | set -nu %::chan $3- | ._doraw $1- }
}
raw 312:*:{
if ($halted) { return }
if ($hget(Kte.Whois)) { hadd Kte.Whois WServer $3 | hadd Kte.Whois ServerInfo $4- | haltdef }
if ($isalias(kte::Raw.312)) { set -u %::nick $2 | set -u %::wserver $3 | set -nu %::serverinfo $4- | ._doraw $1- }
}
raw 307:*:{
if ($halted) { return }
if ($hget(Kte.Whois)) { hadd Kte.Whois IsRegd is | haltdef }
if ($isalias(kte::Raw.307)) { set -u %::nick $2 | set -u %::isregd is | ._doraw $1- }
}
raw 313:*:{
if ($halted) { return }
if ($hget(Kte.Whois)) { hadd Kte.Whois IsOper is | hadd Kte.Whois OperLine $3- | haltdef }
if ($isalias(kte::Raw.313)) { set -u %::nick $2 | set -u %::isoper is | set -nu %::operline $3- | ._doraw $1- }
}
raw 317:*:{
if ($halted) { return }
if ($hget(Kte.Whois)) { hadd Kte.Whois IdleTime $3 | hadd Kte.Whois SignonTime $4 | haltdef }
if ($isalias(kte::Raw.317)) {
set -u %::nick $2
set -u %::idletime $3
set -u %::signontime $asctime($4)
._doraw $1-
}
}
raw 318:*:{
if ($halted) { return }
if ($hget(Kte.Data, ..NoNick)) { hdel Kte.Data ..NoNick | halt }
if ($hget(Kte.Whois)) { showwhois Whois | hfree Kte.Whois | haltdef }
if ($isalias(kte::Raw.318)) { set -nu %::nick $2 | ._doraw $1- }
}
raw 369:*:{
if ($halted) { return }
if (* iswm $hget(Kte.Data, ..NoNick)) { hdel Kte.Data ..NoNick | halt }
if ($hget(Kte.Whois)) { showwhois Whowas | hfree Kte.Whois | haltdef }
if ($isalias(kte::Raw.369)) { set -nu %::nick $2 | ._doraw $1- }
}
raw *:*:{
if (6* iswm $numeric) || ($halted) { return }
if ($numeric = 303) && (!$2-) { Kte.error - $+ $_active The specified nicks are not online | haltdef }
set -u %::nick $2 | set -u %::chan $2 | set -u %::value $2
_doraw $1-
}
; /_doraw str <params>
alias -l _doraw {
var %cl = info2, %f, %n = $right(00 $+ $numeric, 3)
if ($istok(401 404, $numeric, 32)) { hadd Kte.Data ..NoNick $2 }
elseif (* iswm $hget(Kte.Data, ..NoNick)) { hdel Kte.Data ..NoNick }
if ($halted) && ($show) { return }
if ($istok(331 332 333, $numeric, 32)) { %cl = topic }
elseif ($numeric = 372) { %cl = normal }
set -u %::numeric $numeric
set -u %::fromserver $nick
_set .
if ($istok(324 328 329 331 332 333 352 353 366 367 368 404 482, $numeric, 32)) {
var %ch = $2 | if ($numeric = 353) { %ch = $3 }
%::chan = %ch
if (%ch ischan) { %f = -ti2 %ch }
if (!$var(%::text)) { set -nu %::text $3- }
}
if (!$isalias(kte::Raw. $+ %n)) {
if (!%f) { %f = -ti2 $+ $iif(($_isactive) && ($status != connecting) && (@* !iswm $active), a, s) }
set -u %:echo echo $color(%cl) %f
if (!$var(%::text)) { set -nu %::text $2- }
%:echo %::text $+ %:comment
}
else {
if ($istok(403 405 437 442 467 468 471 473 474 475 477 478, $numeric, 32)) {
set -u %::chan $2
if ($numeric = 478) { set -u %::value $3 | set -nu %::text $4- }
elseif (!$var(%::text)) { set -nu %::text $3- }
}
elseif ($istok(432 433 436 438, $numeric, 32)) { set -nu %::text $3- }
elseif ($numeric = 301) {
if (!$hget(Kte.Events, Active.Away)) { %f = -ti2s }
elseif ($query($2)) { %f = -ti2 $2 }
}
if (!%f) { %f = -ti2 $+ $iif(($_isactive) && ($status != connecting) && (@* !iswm $active), a, s) }
if (!$var(%::text)) { set -nu %::text $2- }
set -u %:echo echo $color(%cl) %f
$+(kte::Raw., %n)
}
haltdef
}
alias -l showwhois {
var %h = Kte.Whois
if (!$hget(%h, IsOper)) { hadd %h IsOper is not }
if (!$hget(%h, IsRegd)) { hadd %h IsRegd is not }
_set .
set -u %::nick $hget(%h, Nick) | set -u %::address $hget(%h, Address) | set -nu %::realname $hget(%h, RealName)
set -nu %::chan $hget(%h, Chan) | set -u %::wserver $hget(%h, WServer) | set -nu %::serverinfo $hget(%h, ServerInfo)
set -nu %::text $hget(%h, Text) | set -u %::isregd $hget(%h, IsRegd) | set -u %::isoper $hget(%h, IsOper)
set -nu %::operline $hget(%h, OperLine) | set -u %::idletime $duration($hget(%h, IdleTime))
set -u %::signontime $asctime($hget(%h, SignonTime)) | set -nu %::away $hget(%h, Away)
set -u %:echo echo $color(whois) -ti2 $+ $iif(($_isactive) && (@* !iswm $active) && ($hget(Kte.Events, Active.Whois)), a, s)
if ($1 == Whois) { themeZP-Whois }
else { }
hdel -w Kte.Whois *
}
alias -l kte::Echo %:echo %::text $+ %:comment
alias -l kte::EchoTarget %:echo 3[12%3] %::text $+ %:comment
alias -l kte::Error %:echo 3[12%3] %::text $+ %:comment
alias -l kte::Raw.303 %:echo 3[12%3] %::text are online %:comment
alias -l kte::RAW.255 %:echo 3[12%3] 12Local clients:3 %::users $+ 12on:3 %::value $+ 12 servers %:comment
alias -l kte::Raw.332 %:echo 3[12%3] Topic is ' $+ %::text $+ ' %:comment
alias -l kte::RAW.252 %:echo 3[12%3] 12Operator(s) online:3 %::value $+ %:comment
alias -l kte::RAW.265 %:echo 3[12%3] 12Local users:3 %::users 12Max:3 %::value $+ %:comment
alias -l kte::RAW.253 %:echo 3[12%3] 12Unknown connection(s):3 %::value $+ %:comment
alias -l kte::Raw.401 %:echo 3[12%3] %::nick no such nick/channel %:comment
alias -l kte::RAW.266 %:echo 3[12%3] 12Global users:3 %::users 12Max:3 %::value $+ %:comment
alias -l kte::RAW.250 %:echo 3[12%3] 12Total connection(s):3 %::value $+ %:comment
alias -l kte::Raw.251 %:echo 3[12%3] 12Users:3 %::value 12Invisible:3 %::users $+ %:comment
alias -l kte::Raw.301 %:echo 3[12%3] %::nick is away: %::text $+ %:comment
alias -l kte::Raw.302 %:echo 3[12%3] Userhost: %::nick $+ = $+ %::value $+ %::address $+ %:comment
alias -l kte::RAW.254 %:echo 3[12%3] 12Number of channels formed:3 %::value $+ %:comment