rendered paste bodyalias np {
var %artist
var %album
var %title
if (!$com(itunes)) .comopen itunes iTunes.Application
if ($com(CurrentTrack)) .comclose CurrentTrack
.echo -q $com(itunes,CurrentTrack,3,dispatch* CurrentTrack)
.echo -q $com(CurrentTrack,Artist,3)
%artist = $com(CurrentTrack).result
.echo -q $com(CurrentTrack,Album,3)
%album = $com(CurrentTrack).result
.echo -q $com(CurrentTrack,Name,3)
%title = $com(CurrentTrack).result
say [4iTunes]14 %artist -14 %title $iif(%album,(4 $+ %album $+ ))
}
}
putqt { return $qt($remove($1-,")) }
strq { if ($1 != $null) { return $putqt($1-) } }
cmdexe { return $qt($iif($nndll(getenv,ComSpec),$v1,command)) }
power {
var %tc = 0,%tu = 0,%oc = 0,%po = 0,%i = $scid(0)
while (%i) {
scid $scon(%i)
if ($status == connected) {
var %c = $chan(0)
while (%c) {
inc %tc
inc %tu $calc($nick($chan(%c),0) -1)
if ($ccontrol($chan(%c))) {
inc %oc
inc %po $calc($nick($chan(%c),0) -1)
}
dec %c
}
}
dec %i
}
scid -r
if (!$isid) {
if ($1 == -e) { thmecho -a Stats: you're opped in $thmhl($+(%oc,/,%tc)) channels on $thmhl($scid(0)) $iif($scid(0) == 1,network.,networks.) You have the power over $thmhl($+(%po,/,%tu)) users. }
else { say I'm opped in $sbr($+(%oc,/,%tc)) channels on $sbr($scid(0)) $iif($scid(0) == 1,network.,networks.) I have the power over $sbr($+(%po,/,%tu)) users. }
}
else { return %po }