; ; titlebar.mrc: 20040108 ; Written by Bekar (#mIRC@EFNet) ; ; Simple routine to add the networks, and nick to the titlebar ; ; Uses signals to re-gnerate the titlebar. Easy to add to existing events. ; ON *:SIGNAL:maketitle { var %title var %count = $scon(0) ; ; Add NICK:NETWORK to titlebar ; while (%count) { %title = $+( [, $iif($scon(%count).status != connected, -, $scon(%count).me), :, $scon(%count).network , $iif( $scon(%count).away, $+($chr(32), $chr(40), A, $chr(41)) ), ]) %title dec %count } ; ; Add playing MP3 if one exists ; if ($inmp3) { %title = %title [Now Playing: $nopath($addtok(%title,: $insong.fname, 32)) $+ ]] } ; ; Show download/upload speed totals if using DCC ; var %up = 0, %down = 0 var %count = $get(0) while (%count) { inc %down $get(%count).cps dec %count } var %count = $send(0) while (%count) { inc %up $send(%count).cps dec %count } if (%up || %down) { %title = %title $+([, $bytes(%up, k).suf, /, $bytes(%down, k).suf, ]) .timerSpeedUpdate 1 1 .signal maketitle } ; ; Force the mIRC version infront of the rest of the title ; .titlebar $version $iif($sslready, (SSL)) $iif($beta, ( $+ $beta $+ )) %title } ON *:START: { ; ; I didn't want to have to resort to this *sigh* ; .timerMakeTitle -o 0 30 .signal maketitle } ON *:NICK: { if ($nick == $me) { .signal maketitle } } ON *:MIDIEND: { .signal maketitle } ON *:WAVEEND: { .signal maketitle } ON *:MP3END: { .signal maketitle } ALIAS splay { var %command if ($show) { %command = splay } | else { %command = .splay } %command $1- .signal maketitle } ALIAS sound { var %command if ($show) { %command = sound } | else { %command = .sound } %command $1- .signal maketitle } ON *:DISCONNECT: .signal maketitle ON *:CONNECT: .signal maketitle RAW 305:*: .signal maketitle RAW 306:*: .signal maketitle ON *:DCCSERVER:*: .timer 1 1 .signal maketitle