[mIRC] Voice Chat — File Browser
mIRCVoiceChatv1.07.07.03.18.02 / mIRCVoiceChatv1.07.07.03.18.02 / voice-07-07-03-18-02.mrc
voice-07-07-03-18-02.mrc — 18.18 KB — Download this file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;; [mIRC] Voice Chat ;;;;;;;;;;;;;;;
;;;;;;;; Created by MJCS-gTFC- and R-Ben ;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; Don't Forget to read the Readme about setup and the FAQ!
on *:LOAD: {
if ($dll($short(registry.dll),GetKeyValue, [ 1 ] HKEY_LOCAL_MACHINE\Software\Microsoft\DirectX\\Version) < 4.08.01.0810) {
beep 20
echo -a 1,8SORRY YOU NEED TO DOWNLOAD THE CURRENT VERSION OF DIRECTX FROM THE MICROSOFT WEBSITE
echo -a 1,8THE BROWSER IS TAKING YOU THERE NOW
$iif($?!="Do you want to install DirecX 9 Now?" = $true,url http://www.microsoft.com/windows/Directx/,echo -a 1,8Please DL DirectX 9)
unload -rs $short($script)
}
else {
v.setup
if (!$hget(xbw)) hmake xbw | if ($isfile($conffile)) hload -b xbw $conffile | hadd xbw linespeed_down 192 | hadd xbw linespeed_up 32
hadd xbw theme black | xbw openwin
echo -a 2You have loaded the [mIRC] Voice Chat Script - MJCS-gTFC- & R-ben - Ver $v.v | echo -a Opening Script Now... | voice.dialog
}
}
menu channel,query,status,menubar,nicklist {
-
Voice Chat:voice.dialog
}
alias startchat { unset %nicklist | np handler my_handler | np data %v.my.nick | np connect $1 $2 }
alias v.setup {
set %v.server 123.456.789.101 | set %v.port 30000 | set %v.net.download 1 | set %v.net.upload 1 | set %voice.auto.connect 0
set %v.auto.connect 0 | set %v.my.nick Not_Set
}
alias v.v { return 1.07.07.03.18.02 }
alias v.advertise { msg $active I am running [mIRC] Voice Chat Version $v.v }
alias stopchat { np mute | np close | voice.addchat Left Server | unset %nicklist }
alias np {
return $dll($short(nPLAYn.dll),peer,$1-)
if ($status.add == S_SENDING) { return S_OK }
else { status.add $1- }
}
alias my_handler {
if ($3 == volume) { return S_OK | halt }
elseif ($3 == silent) { return S_OK | halt }
elseif ($3 == muted) { return S_OK | halt }
elseif ($3 == voice_on) { np send 0 9 0 8 T: $+ %v.my.nick | return S_OK | halt }
elseif ($3 == voice_off) { np send 0 9 0 8 NT: $+ %v.my.nick | return S_OK | halt }
elseif ($3 == confirm) { status.add Confirming connect from $4 | return S_OK }
elseif ($3 == received) {
;status.add $1-
if ($gettok($5,1,58) == T) {
if ($gettok($5,2,58) isin %v.nick. [ $+ [ $4 ] ]) {
set %nicklist $replace(%nicklist,$4 $+ .(_) $+ $gettok($5,2,58),$4 $+ .(+) $+ $gettok($5,2,58)) | vnicklist %nicklist | return S_OK
}
}
if ($gettok($5,1,58) == NT) {
if ($gettok($5,2,58) isin %v.nick. [ $+ [ $4 ] ]) {
set %nicklist $replace(%nicklist,$4 $+ .(+) $+ $gettok($5,2,58),$4 $+ .(_) $+ $gettok($5,2,58)) | vnicklist %nicklist | return S_OK
}
}
if ($5 == new_data) {
if ($6 == %v.nick. [ $+ [ $4 ] ]) && ($left($7-,1) != $chr(32)) && ($left($7-,1) != $null) && ($4 != 1) { voice.addchat < $+ $6 $+ > $7- }
;voice.addchat < $+ $6 $+ > $7-
return S_OK
;echo -a $1-
;else { halt }
}
}
elseif ($3 == Joined) {
voice.addchat * $5 Has Joined | set %nicklist %nicklist $4 $+ .(_) $+ $5 | vnicklist %nicklist | set %v.nick. $+ $4 $5
;v.send.info
return S_OK
}
elseif ($5 == NICK.INFO) {
if ($6 == %v.nick. [ $+ [ $4 ] ]) && ($left($7-,1) != $chr(32)) && ($left($7-,1) != $null) {
set %v.nick. [ $+ [ $4 ] $+ ] .version $7 | set %v.nick. [ $+ [ $4 ] $+ ] .fullname $8- | return S_OK
}
;else { halt }
}
elseif ($3 == Parted) {
voice.addchat * $5 Has Left | set %nicklist $remove(%nicklist,$4 $+ .(_) $+ $5) | vnicklist %nicklist | unset set %v.nick. $+ $5 $+ *
}
;elseif ($5 == new_data) {
; if ($6 == %v.nick. [ $+ [ $4 ] ]) && ($left($7-,1) != $chr(32)) && ($left($7-,1) != $null) { voice.addchat < $+ $6 $+ > $7- }
; voice.addchat < $+ $6 $+ > $7-
; return S_OK
; echo -a $1-
; ;else { halt }
;}
elseif ($3 == cannot_connect) { status.add Can Not Connect To Server | voice.enable }
elseif ($3 == S_HOSTING) { status.add Now Hosting Server @ $ip $+ : $+ %v.server.port }
elseif ($3 == sent) { return S_OK }
else { status.add $1- }
return S_OK
}
alias v.send.info { np send 0 7 0 8 NICK.INFO %v.my.nick $v.v $iif($chr(32) isin %v.fullname,$replace(%v.fullname,$chr(32),ÿ),%v.fullname) }
alias short { return $shortfn($scriptdir $+ $1- $+ ) }
alias vnicklist { did -r voice.dialog 15 | var %c = 1 | while ($ [ $+ [ %c ] ]) { did -a voice.dialog 15 $ [ $+ [ %c ] ] | inc %c 1 } }
alias startserv {
unset %nicklist
np handler my_handler
np data %v.my.nick
np host 6 %v.server.port
voice.disable
status.add Server ON! @ $ip $+ : $+ %v.server.port
}
;;; Dialog Stuff Containers
alias v.mdx return $short(MDX.DLL)
alias dialog.mdx return $short(dialog.mdx)
alias gen.mdx return $short(ctl_gen.mdx)
alias voice.timestamp { return ** ( $+ $time $+ ) }
alias voice.activate { did -i voice.dialog did 1 seticon parameters }
alias voice.dialog { xbw openwin | .timeropen 1 4 dialog -md voice.dialog voice.dialog -1 }
alias voice.addchat { did -a voice.dialog 14 $crlf | did -a voice.dialog 14 ** ( $+ $time $+ ) $1- }
alias status.add { did -a voice.dialog 41 $crlf | did -a voice.dialog 41 $voice.timestamp $1- }
alias voice.disable { did -b voice.dialog 6,7,11,18,51,53,20,37,111 }
alias voice.enable { did -e voice.dialog 6,7,11,18,51,53,20,37,111 }
on *:DIALOG:voice.dialog:sclick:17:{ startserv server %v.port | voice.disable }
on *:DIALOG:voice.dialog:sclick:30:{
if ($did(16).text) {
np send 0 7 0 8 new_data %v.my.nick $did(16).text
voice.addchat < $+ %v.my.nick $+ > $did(16).text
.timer -m 1 1 did -rf voice.dialog 16
}
}
on *:DIALOG:voice.dialog:sclick:31:{ if (($did(6).text) && ($did(7).text)) { startchat %v.server %v.port | voice.disable } }
on *:DIALOG:voice.dialog:sclick:48:{ np close | voice.enable }
on *:DIALOG:voice.dialog:sclick:49:{ did -r voice.dialog 41 }
on *:DIALOG:voice.dialog:sclick:52:{ np close | voice.enable | voice.addchat Disconnected From Server | unset %v.nick* }
on *:DIALOG:voice.dialog:sclick:32:{ np Talk | did -b voice.dialog 32 | did -e voice.dialog 33 }
on *:DIALOG:voice.dialog:sclick:33:{ np mute | did -b voice.dialog 33 | did -e voice.dialog 32 }
on *:DIALOG:voice.dialog:sclick:53:{ set %v.auto.connect $did(53).state | status.add Auto Connect is $iif($did(53).state = 0,Off,On) }
on *:DIALOG:voice.dialog:sclick:27:{ set %v.net.download $did(27).state | status.add Net Graph DL is $iif($did(27).state = 0,Off,On) }
on *:DIALOG:voice.dialog:sclick:28:{ set %v.net.upload $did(28).state | status.add Net Graph UP is $iif($did(28).state = 0,Off,On) }
on *:DIALOG:voice.dialog:sclick:2:{ url irc://irc.gamesnet.net/globaltfc | status.add Connecting to irc.gamesnet.net #globaltfc }
on *:DIALOG:voice.dialog:sclick:4:{ url http://www.globaltfc.com | status.add Connecting to http://www.globaltfc.com }
on *:DIALOG:voice.dialog:sclick:35:{ url http://www.microsoft.com/windows/Directx/ | status.add Opening Up Microsoft DirectX Homepage }
on *:DIALOG:voice.dialog:sclick:36:{ url http://windowsupdate.microsoft.com | status.add Opening up Windows Update page }
on *:DIALOG:voice.dialog:edit:6:{ set %v.server $did(6) }
on *:DIALOG:voice.dialog:edit:11:{ set %v.my.nick $did(11) }
on *:DIALOG:voice.dialog:edit:51:{ set %v.c.p $did(51) }
on *:DIALOG:voice.dialog:edit:37:{ set %v.s.p $did(37) }
on *:DIALOG:voice.dialog:edit:7:{ set %v.port $did(7) }
on *:DIALOG:voice.dialog:edit:20:{ set %v.server.port $did(20) }
on *:DIALOG:voice.dialog:edit:111:{ set %v.fullname $did(111) }
on *:DIALOG:voice.dialog:edit:18:{ set %v.email $did(18) }
on *:DIALOG:voice.dialog:dclick:15:{ v.send.info | set %v.whois.nick $did(15).seltext | dialog.whois }
on *:DIALOG:voice.dialog:init:*:{
dll $v.mdx SetMircVersion $version | dll $v.mdx MarkDialog voice.dialog
dll $v.mdx SetControlMDX voice.dialog 34 Window > $dialog.mdx
did -a voice.dialog 34 grab $window(@band).hwnd @band
if (!$hget(xbw)) hmake xbw | if ($isfile($conffile)) hload -b xbw $conffile | xbw gimme | refresh-timer
unset %v.nick.*
status.add [mIRC] Voice Chat - MJCS-gTFC- & R-Ben - Version: $v.v
did -b voice.dialog 33 | did -e voice.dialog 32 | did -a voice.dialog 6 %v.server | did -a voice.dialog 7 %v.port
did -a voice.dialog 20 %v.server.port | did -a voice.dialog 11 %v.my.nick | did -a voice.dialog 51 %v.c.p
did -a voice.dialog 111 %v.fullname | did -a voice.dialog 18 %v.email | did -a voice.dialog 37 %v.s.p
if (%v.auto.connect == 1) { did -c voice.dialog 53 | startchat %v.server %v.port | voice.disable }
if (%v.net.download == 1) { did -c voice.dialog 27 }
if (%v.net.upload == 1) { did -c voice.dialog 28 }
;did -b voice.dialog 14
did -a voice.dialog 24 $&
The [mIRC] Voice Chat script was created because nobody else had done a script like this. $&
I (MJCS-gTFC-) was the one who started to create the script and eventually created all of the dialogs. $&
R-Ben was the one who started to code the server and parts of the client. $&
This script has evolved from a text-based add-on to a full-blown dialog based voice chat. $&
I hope that you enjoy the use of this wonderful script as much as R-Ben and I have. $&
Happy Talking :). If you encounter any errors/bugs please feel free to chat with us by clicking the Support link bellow.
v.support attach $v.support(find,support_box)
v.support navigate $shortfn($scriptdirreadme.htm)
}
on *:DIALOG:voice.dialog:close:*:{ .timerbandchk off | .timerxbw.start off | hsave -bo xbw $conffile | np close }
dialog voice.dialog {
title "[mIRC] Voice Chat - MJCS-gTFC- & R-Ben - www.globaltfc.com"
size -1 -1 245 193
option dbu notheme
icon icon $short(sounds.ico), 0
tab "Configuration", 1, 0 0 244 192
edit "", 6, 30 29 58 10, tab 1 autohs
edit "", 7, 101 29 27 10, tab 1 autohs
edit "", 11, 30 41 58 10, tab 1 autohs
edit "", 51, 30 53 58 10, tab 1 pass autohs
edit "", 111, 166 29 72 10, group tab 1 autohs
edit "", 18, 166 40 72 10, group tab 1 autohs
edit "", 20, 22 84 27 10, tab 1 autohs
edit "", 37, 75 84 50 10, tab 1 pass autohs
check "Auto Connect", 53, 105 59 51 10, tab 1
button "Disconnect", 52, 156 57 37 12, tab 1
button "Connect", 31, 198 57 37 12, tab 1
button "Start Server", 17, 23 98 37 12, tab 1
button "Stop Server", 48, 65 98 37 12, tab 1
text "Email Address:", 3, 129 41 36 8, group tab 1 right
box "Connect Settings", 5, 1 20 240 57, tab 1
text "Server:", 8, 4 30 25 8, tab 1 right
text "Port:", 9, 88 30 12 8, tab 1 right
text "Nick:", 10, 4 42 25 8, tab 1 right
text "Full Name:", 19, 133 30 32 7, group tab 1 right
box "Server", 12, 1 78 240 38, tab 1
text "Port:", 21, 2 85 20 8, tab 1 right
box "About", 23, 1 117 240 73, tab 1
text "", 24, 3 125 235 50, result tab 1
text "Password:", 50, 4 54 25 8, tab 1 right
link "Support", 2, 19 177 19 8, tab 1
link "www.globaltfc.com", 4, 54 177 45 8, tab 1
link "Direct X Home Page", 35, 115 177 49 8, tab 1
link "Windows Update", 36, 180 177 41 8, tab 1
text "Password:", 38, 50 85 25 8, tab 1 right
tab "Chat", 13
edit "", 14, 1 17 191 162, tab 13 read multi vsbar
list 15, 192 17 50 146, tab 13 sort size
edit "", 16, 1 180 191 10, tab 13 multi autohs
button "Talk", 32, 193 164 24 12, tab 13
button "Mute", 33, 218 164 24 12, tab 13
button "Send", 30, 193 180 49 10, result tab 13 default multi
tab "Net Graph", 22
box "Net Graph", 25, 1 20 240 121, tab 22
box "Options", 26, 1 145 240 45, tab 22
button "Net_Graph", 34, 5 28 229 107, tab 22
check "Download", 27, 4 152 50 10, tab 22
check "Upload", 28, 4 162 50 10, tab 22
check "Load on Start-up", 42, 4 172 51 10, tab 22
tab "Status", 39
box "Status Window/Debug Output", 40, 1 20 240 170, tab 39
edit "", 41, 4 28 235 150, tab 39 read multi vsbar
button "Clear", 49, 4 180 15 8, tab 39
tab "Support", 43
box "Support", 46, 1 20 240 170, tab 43
box "support_box", 47, 3 26 236 162, tab 43
button "&Ok", 29, 0 206 1 1, hide disable result flat ok
}
;;;;; Support
alias v.support { if ($isid) { return $dll($shortfn($scriptdirnHTMLn.dll),$$1,$2-) } | else { dll $shortfn($scriptdirnHTMLn.dll) $$1 $2- } }
alias v.readme { v.support navigate $shortfn($scriptdir\readme.htm) }
;Click event = v.support navigate $shortfn($scriptdir\readme.htm)
;;;;; Whois
;;;;; Allows for Nick, ID, & Kicking (if you are the server)
alias dialog.whois { dialog -md voice.user.info voice.user.info -1 }
on *:DIALOG:voice.user.info:sclick:2:{ np kick %v.whois.id Kick By Request of Server }
on *:DIALOG:voice.user.info:init:*:{
if ([ (_) ] isin %v.whois.nick) { set %v.whois.nick $remove(%v.whois.nick,(_)) }
elseif ([ (+) ] isin %v.whois.nick) { set %v.whois.nick $remove(%v.whois.nick,(+)) }
set %v.whois.id $left(%v.whois.nick,1)
set %v.whois.nick $remove(%v.whois.nick,$left(%v.whois.nick,2))
did -a voice.user.info 4 %v.whois.nick
did -a voice.user.info 6 %v.nick. [ $+ [ %v.whois.id ] $+ ] .version
did -a voice.user.info 8 %v.whois.id
did -a voice.user.info 9 %v.nick. [ $+ [ %v.whois.id ] $+ ] .fullname
}
dialog voice.user.info {
title "Whois?"
size -1 -1 83 72
option dbu notheme
icon $short(about.ico), 0
box "Whois", 1, 4 1 75 65
button "Kick?", 2, 20 50 37 12, flat
text "Nick:", 3, 6 9 17 8, right
edit "", 4, 24 8 50 10, disable
text "Ver:", 5, 6 29 17 8, right
edit "", 6, 24 28 50 10, disable
text "ID:", 7, 6 39 17 8, right
edit "", 8, 24 38 50 10, disable
edit "", 9, 24 18 50 10, disable
text "Name:", 10, 6 19 17 8, right
}
;;;;; Bandwidth Graph
;;;;; Source by zeeg (zeeg@evilcoder.net)
;;;;; Edited by MJCS-gTFC- | With Permission :)
; Aliases
alias refresh-timer .timerbandchk -i 0 1 bandchk
alias linespeed-down return $hget(xbw,linespeed_down)
alias linespeed-up return $hget(xbw,linespeed_up)
alias conffile return $short(main.cfg)
alias setbw hadd xbw $+(record:,$1) $2- | hsave -bo xbw $conffile
alias retbw return $iif($hget(xbw,$+(record:,$1)) > 0,$ifmatch,0)
alias stdio return $dll($$short(stdio.dll),$1,$2-)
alias bandchk { updatebar | if ($status = connected) { set %_.tlag $ticks } }
alias _color {
if ($1 = border) tokenize 44 128,128,128 | if ($1 = bg) tokenize 44 0,0,0
if ($1 = bw) { if ($2 = up) tokenize 44 255,255,0 | if ($2 = down) tokenize 44 0,255,0 } | return $rgb($1,$2,$3)
}
alias xbw {
if (!$isid) {
var %`
if ($1 = gimme) {
%` = $stdio(ReleaseProcess,xbw) | %` = $stdio(RunConsole,xbw netstat -e) | if ($gettok(%`,1,32) = OK) .timerxbw.start -m 0 1 xbw.start
}
if ($1 = openwin) { window -Bhnp +D @band 10 10 450 200 | window -a @band }
}
else {
if ($prop = cfg) { return $hget(xbw,$1 $+ . $+ $2) }
else {
if ($1 = total) return $gettok(%bandwidth,1,124) | if ($1 = down) return $gettok(%bandwidth,2,124)
if ($1 = up) return $gettok(%bandwidth,3,124) | if ($1 = total bytes) return $gettok(%bandwidth,4,124)
if ($1 = down bytes) return $gettok(%bandwidth,5,124) | if ($1 = up bytes) return $gettok(%bandwidth,6,124)
}
}
}
alias xbw.start {
var %out
while ($gettok(%out,1,32) != ERROR) {
%out = $stdio(ReadText,xbw out) | if (%out = OK) %out = OK
if (OK Bytes* iswm %out) {
set %!temp.ticks $ticks | set %!temp.in $gettok(%out,3,32) | set %!temp.out $gettok(%out,4,32) | %` = $stdio(ReleaseProcess,xbw)
%` = $stdio(RunConsole,xbw netstat -e) | .timerxbw.start off | .timerxbw.result -m 0 1 xbw.result | break
}
if (%out = ERROR STDE6 End of file) { var %` $stdio(ReleaseProcess,xbw) | .timerxbw.start off | break }
}
}
alias xbw.result {
var %out, %time, %`
while ($gettok(%out,1,32) != ERROR) {
%out = $stdio(ReadText,xbw out) | if (%out = OK) %out = OK
if (OK Bytes* iswm %out) {
%time = $calc(($ticks - %!temp.ticks) / 1000)
set %bandwidth $+($calc($calc(($gettok(%out,4,32) - %!temp.out) / %time) + $calc(($gettok(%out,3,32) - %!temp.in) $&
/ %time)),|,$calc(($gettok(%out,3,32) - %!temp.in) / %time),|,$calc(($gettok(%out,4,32) - %!temp.out) / %time),|,$&
$calc($gettok(%out,3,32) + $gettok(%out,4,32)),|,$gettok(%out,3,32),|,$gettok(%out,4,32))
if (!$hget(xbw,startdate)) { hadd xbw startdate $ctime }
if ($gettok(%bandwidth,2,124) > $retbw(in)) setbw in $gettok(%bandwidth,2,124)
if ($gettok(%bandwidth,3,124) > $retbw(out)) setbw out $gettok(%bandwidth,3,124)
if ($gettok(%out,3,32) > $retbw(inB)) setbw inB $gettok(%out,3,32)
if ($gettok(%out,4,32) > $retbw(outB)) setbw outB $gettok(%out,4,32)
if ($calc($gettok(%out,3,32) + $gettok(%out,4,32)) > $retbw(total)) setbw total $calc($gettok(%out,3,32) + $gettok(%out,4,32))
hadd xbw inBtot $calc($hget(xbw,inBtot) + ($gettok(%out,3,32) - %!temp.in))
hadd xbw outBtot $calc($hget(xbw,outBtot) + ($gettok(%out,4,32) - %!temp.out))
%` = $stdio(ReleaseProcess,xbw2) | .timerxbw.* off | .timerxbw.start -m 1 1500 xbw gimme | return
}
if (%out = ERROR STDE6 End of file) { var %` $stdio(ReleaseProcess,xbw2) | .timerxbw.result off | xbw gimme | break }
}
}
alias updatebar {
if (%_.wait = 1) { return } | drawfill -r @band $_color(bg) $_color(bg) 1 1 | drawscroll @band -2 0 2 0 64 25
var %bw $bytes($gettok(%bandwidth,2,124),k), %bw2 $bytes($gettok(%bandwidth,3,124),k)
var %band $iif($calc(23 - (25 * (%bw / $calc($linespeed-down + 30)))),$ifmatch,0)
var %band2 $iif($calc(25 - (25 * (%bw2 / $calc($linespeed-up + 20)))),$ifmatch,0)
if (%v.net.download == 1) { drawline -r @band $_color(bw,up) 1 60 %bw2lastpos 62 %band2 }
if (%v.net.upload == 1) { drawline -r @band $_color(bw,down) 1 60 %bwlastpos 62 %band }
set %bw2lastpos %band2 | set %bwlastpos %band
if (%v.net.download == 1) { drawtext -rpb @band $_color(bw,down) $_color(bg) Tahoma -7 420 3 $round($left(%bw,4),2) k/s }
elseif (%v.net.download == 0) { drawtext -rpb @band $_color(bw,down) $_color(bg) Tahoma -7 420 3 0 k/s }
if (%v.net.upload == 1) { drawtext -rpb @band $_color(bw,up) $_color(bg) Tahoma -7 420 13 $round($left(%bw2,4),2) k/s }
elseif (%v.net.upload == 0) { drawtext -rpb @band $_color(bw,up) $_color(bg) Tahoma -7 420 13 0 k/s }
drawrect -r @band $_color(border) 1 0 0 $window(@band).w $window(@band).h
}