[Addon]
Script=GTSdll
Version=1.2.7.2
Author=GTS
Desc=DC++/oDC/BCDC/BitTorrent/GetRight/BSPlayer/MPClassic/ZoomPlayer/WinAmp
For=all mIRC based Scripts

[script]
n0=;####################################################
n1=;##  GTSDll v1.2.7.2                               ##
n2=;####################################################
n3=;##                                                ##
n4=;##  by GTS - #gtsdll @ irc.rizon.net              ##
n5=;##                                                ##
n6=;##  Some modifications and addons by              ##
n7=;##  Shahid, Phaze-, EqUaTe and Chaosblade         ##
n8=;##                                                ##
n9=;##  Homepage:                                     ##
n10=;##  http://www.gts-stuff.com/                     ##
n11=;##                                                ##
n12=;####################################################
n13=
n14=;####################################################
n15=;##  /wafind [text]                                ##
n16=;####################################################
n17=;## (included for backward compatibility)          ##
n18=;####################################################
n19=alias wafind {
n20=  dll " $+ $scriptdir $+ gtsmirc.dll" OpenWAFind $1-
n21=}
n22=
n23=alias wajump {
n24=  wa jumpto $1-
n25=}
n26=
n27=alias vidplay { dll " $+ $scriptdir $+ gtsmirc.dll" VIDCommand play }
n28=alias vidpause { dll " $+ $scriptdir $+ gtsmirc.dll" VIDCommand pause }
n29=alias vidstop { dll " $+ $scriptdir $+ gtsmirc.dll" VIDCommand stop }
n30=alias vidsync {
n31=  if ($lower($1) == enable) {
n32=    .hadd GTSDll_settings VID_SYNC on
n33=    echo -a * Video Sync Feature enabled
n34=    return
n35=  }
n36=  if ($lower($1) == disable) {
n37=    .hadd GTSDll_settings VID_SYNC off
n38=    echo -a * Video Sync Feature disabled
n39=    return
n40=  }
n41=  if (#* !iswm $2) {
n42=    var %nickcount $numtok($2-,32)
n43=    var %x 1
n44=    while (%x <= %nickcount) {
n45=      .ctcp $gettok($2-,%x,32) vid_sync $1
n46=      inc %x
n47=    }
n48=    dll " $+ $scriptdir $+ gtsmirc.dll" VIDCommand $1
n49=    vid
n50=  }
n51=  else {
n52=    .ctcp $2 vid_sync $1
n53=    dll " $+ $scriptdir $+ gtsmirc.dll" VIDCommand $1
n54=    vid
n55=  }
n56=}
n57=
n58=ctcp 1:vid_sync *:*: {
n59=  if ($hget(GTSDll_settings,VID_SYNC) == on) {
n60=    if ($chan) {
n61=      if ($hget(GTSDll_settings,VID_SYNC_limitation) == defined_only) {
n62=        if (!$istok($hget(GTSDll_settings,VID_SYNC_channels),$chan,32)) { echo -s * Ignored VidSync-Message of $nick for channel $chan }
n63=        else {
n64=          dll " $+ $scriptdir $+ gtsmirc.dll" VIDCommand $2
n65=          vid -c $chan
n66=        }
n67=      }
n68=      if ($hget(GTSDll_settings,VID_SYNC_limitation) == all_except) {
n69=        if ($istok($hget(GTSDll_settings,VID_SYNC_channels),$chan,32)) { echo -s * Ignored VidSync-Message of $nick for channel $chan }
n70=        else {
n71=          dll " $+ $scriptdir $+ gtsmirc.dll" VIDCommand $2
n72=          vid -c $chan
n73=        }
n74=      }
n75=      if ($hget(GTSDll_settings,VID_SYNC_limitation) == none) {
n76=        dll " $+ $scriptdir $+ gtsmirc.dll" VIDCommand $2
n77=        vid -c $chan
n78=      }
n79=    }
n80=    else {
n81=      if ($hget(GTSDll_settings,VID_SYNC_limitation) == defined_only) {
n82=        if (!$istok($hget(GTSDll_settings,VID_SYNC_channels),$active,32)) {
n83=          echo -s * Ignored VidSync-Message of $nick for channel $active (Active Channel Window)
n84=        }
n85=        else {
n86=          if ($nick ison $active) {
n87=            dll " $+ $scriptdir $+ gtsmirc.dll" VIDCommand $2
n88=            vid
n89=          }
n90=          else { echo -s * Ignored VidSync-Message of $nick for channel $active (Active Channel Window) }
n91=        }
n92=      }
n93=      if ($hget(GTSDll_settings,VID_SYNC_limitation) == all_except) {
n94=        if ($istok($hget(GTSDll_settings,VID_SYNC_channels),$active,32)) {
n95=          echo -s * Ignored VidSync-Message of $nick for channel $active (Active Channel Window)
n96=        }
n97=        else {
n98=          if ($nick ison $active) {
n99=            dll " $+ $scriptdir $+ gtsmirc.dll" VIDCommand $2
n100=            vid
n101=          }
n102=          else { echo -s * Ignored VidSync-Message of $nick for channel $active (Active Channel Window) }
n103=        }
n104=      }
n105=      if ($hget(GTSDll_settings,VID_SYNC_limitation) == none) {
n106=        dll " $+ $scriptdir $+ gtsmirc.dll" VIDCommand $2
n107=        vid
n108=      }
n109=    }
n110=  }
n111=}
n112=
n113=;####################################################
n114=;##  /wa <action> [params]                         ##
n115=;####################################################
n116=alias wa {
n117=  if ($1) {
n118=    if ($lower($1) == find) { dll " $+ $scriptdir $+ gtsmirc.dll" OpenWAFind $2- | return }
n119=    if ($lower($1) == play) { dll " $+ $scriptdir $+ gtsmirc.dll" WACommand play | return }
n120=    if ($lower($1) == playloud) { dll " $+ $scriptdir $+ gtsmirc.dll" WACommand play | .timer $+ $ctime $+ 123 -m 1 250 aud $3- | return }
n121=    if ($lower($1) == pause) { dll " $+ $scriptdir $+ gtsmirc.dll" WACommand pause | return }
n122=    if ($lower($1) == stop) { dll " $+ $scriptdir $+ gtsmirc.dll" WACommand stop | return }
n123=    if ($lower($1) == fstop) { dll " $+ $scriptdir $+ gtsmirc.dll" WACommand fstop | return }
n124=    if ($lower($1) == next) { dll " $+ $scriptdir $+ gtsmirc.dll" WACommand next | return }
n125=    if ($lower($1) == prev) { dll " $+ $scriptdir $+ gtsmirc.dll" WACommand prev | return }
n126=    if ($lower($1) == shuffle) { dll " $+ $scriptdir $+ gtsmirc.dll" WACommand shuffle | return }
n127=    if ($lower($1) == repeat) { dll " $+ $scriptdir $+ gtsmirc.dll" WACommand repeat | return }
n128=    if ($lower($1) == stopifdone) { dll " $+ $scriptdir $+ gtsmirc.dll" WACommand stopifdone | return }
n129=    if ($lower($1) == jumpto) {
n130=      var %item $dll(" $+ $scriptdir $+ gtsmirc.dll",WAFindTrack,$hget(GTSDll_settings,WAFolder) $+ $chr(1) $+ * $+ $2- $+ *)
n131=      if (%item > -1) {
n132=        dll " $+ $scriptdir $+ gtsmirc.dll" WACommand jump %item
n133=      }
n134=      else echo -a * /wa: $2- not found
n135=      return
n136=    }
n137=    if ($lower($1) == jumpnext) {
n138=      var %item $dll(" $+ $scriptdir $+ gtsmirc.dll",WAFindNextTrack,$hget(GTSDll_settings,WAFolder) $+ $chr(1) $+ * $+ $2- $+ *)
n139=      if (%item > -1) {
n140=        dll " $+ $scriptdir $+ gtsmirc.dll" WACommand jump %item
n141=      }
n142=      else echo -a * /wa: $2- not found
n143=      return
n144=    }
n145=    if ($lower($1) == jump) { dll " $+ $scriptdir $+ gtsmirc.dll" WACommand jump $2- | return }
n146=    if (($lower($1) == sync) && ($2)) {
n147=      dll " $+ $scriptdir $+ gtsmirc.dll" WACommand stop
n148=      if (#* !iswm $2) {
n149=        var %nickcount $numtok($2-,32)
n150=        var %x 1
n151=        while (%x <= %nickcount) {
n152=          .ctcp $gettok($2-,%x,32) wa_sync * $+ $nopath($dll(" $+ $scriptdir $+ gtsmirc.dll",GetAudioFileName,$hget(GTSDll_settings,WAFolder))) $+ *
n153=          inc %x
n154=        }
n155=      }
n156=      else {
n157=        .ctcp $2 wa_sync * $+ $nopath($dll(" $+ $scriptdir $+ gtsmirc.dll",GetAudioFileName,$hget(GTSDll_settings,WAFolder))) $+ *
n158=      }
n159=      .timer $+ $ctime 1 1 { wa playloud }
n160=      return
n161=    }
n162=    if ($lower($1) == enable) {
n163=      if ($lower($2) == sync) { .hadd GTSDll_settings WA_jump_state on | echo -a * WinAmp Sync Feature enabled | return }
n164=    }
n165=    if ($lower($1) == disable) {
n166=      if ($lower($2) == sync) { .hadd GTSDll_settings WA_jump_state off | echo -a * WinAmp Sync Feature disabled | return }
n167=    }
n168=    echo -a * /wa: invalid parameter(s)
n169=  }
n170=  else echo -a * /wa: not enough parameters
n171=}
n172=
n173=ctcp 1:wa_sync *:*: {
n174=  if ($hget(GTSDll_settings,WA_jump_state) == on) {
n175=    if ($chan) {
n176=      if ($hget(GTSDll_settings,WA_SYNC_limitation) == defined_only) {
n177=        if (!$istok($hget(GTSDll_settings,WA_SYNC_channels),$chan,32)) { echo -s * Ignored WASync-Message of $nick for channel $chan }
n178=        else {
n179=          var %item $dll(" $+ $scriptdir $+ gtsmirc.dll",WAFindTrack,$hget(GTSDll_settings,WAFolder) $+ $chr(1) $+ * $+ $2- $+ *)
n180=          if (%item > -1) {
n181=            dll " $+ $scriptdir $+ gtsmirc.dll" WACommand jump %item
n182=            .timer $+ $ctime -m 1 250 aud $iif($chan,-c $chan,)
n183=          }
n184=          else echo -a * wa_sync: $2- not found
n185=        }
n186=      }
n187=      if ($hget(GTSDll_settings,WA_SYNC_limitation) == all_except) {
n188=        if ($istok($hget(GTSDll_settings,WA_SYNC_channels),$chan,32)) { echo -s * Ignored WASync-Message of $nick for channel $chan }
n189=        else {
n190=          var %item $dll(" $+ $scriptdir $+ gtsmirc.dll",WAFindTrack,$hget(GTSDll_settings,WAFolder) $+ $chr(1) $+ * $+ $2- $+ *)
n191=          if (%item > -1) {
n192=            dll " $+ $scriptdir $+ gtsmirc.dll" WACommand jump %item
n193=            .timer $+ $ctime -m 1 250 aud $iif($chan,-c $chan,)
n194=          }
n195=          else echo -a * wa_sync: $2- not found
n196=        }
n197=      }
n198=      if ($hget(GTSDll_settings,WA_SYNC_limitation) == none) {
n199=        var %item $dll(" $+ $scriptdir $+ gtsmirc.dll",WAFindTrack,$hget(GTSDll_settings,WAFolder) $+ $chr(1) $+ * $+ $2- $+ *)
n200=        if (%item > -1) {
n201=          dll " $+ $scriptdir $+ gtsmirc.dll" WACommand jump %item
n202=          .timer $+ $ctime -m 1 250 aud $iif($chan,-c $chan,)
n203=        }
n204=        else echo -a * wa_sync: $2- not found
n205=      }
n206=    }
n207=    else {
n208=      if ($hget(GTSDll_settings,WA_SYNC_limitation) == defined_only) {
n209=        if (!$istok($hget(GTSDll_settings,WA_SYNC_channels),$active,32)) {
n210=          echo -s * Ignored WASync-Message of $nick for channel $active (Active Channel Window)
n211=        }
n212=        else {
n213=          if ($nick ison $active) {
n214=            var %item $dll(" $+ $scriptdir $+ gtsmirc.dll",WAFindTrack,$hget(GTSDll_settings,WAFolder) $+ $chr(1) $+ * $+ $2- $+ *)
n215=            if (%item > -1) {
n216=              dll " $+ $scriptdir $+ gtsmirc.dll" WACommand jump %item
n217=              .timer $+ $ctime -m 1 250 aud $iif($chan,-c $chan,)
n218=            }
n219=            else echo -a * wa_sync: $2- not found
n220=          }
n221=          else { echo -s * Ignored WASync-Message of $nick for channel $active (Active Channel Window) }
n222=        }
n223=      }
n224=      if ($hget(GTSDll_settings,WA_SYNC_limitation) == all_except) {
n225=        if ($istok($hget(GTSDll_settings,WA_SYNC_channels),$active,32)) {
n226=          echo -s * Ignored WASync-Message of $nick for channel $active (Active Channel Window)
n227=        }
n228=        else {
n229=          if ($nick ison $active) {
n230=            var %item $dll(" $+ $scriptdir $+ gtsmirc.dll",WAFindTrack,$hget(GTSDll_settings,WAFolder) $+ $chr(1) $+ * $+ $2- $+ *)
n231=            if (%item > -1) {
n232=              dll " $+ $scriptdir $+ gtsmirc.dll" WACommand jump %item
n233=              .timer $+ $ctime -m 1 250 aud $iif($chan,-c $chan,)
n234=            }
n235=            else echo -a * wa_sync: $2- not found
n236=          }
n237=          else { echo -s * Ignored WASync-Message of $nick for channel $active (Active Channel Window) }
n238=        }
n239=      }
n240=      if ($hget(GTSDll_settings,WA_SYNC_limitation) == none) {
n241=        var %item $dll(" $+ $scriptdir $+ gtsmirc.dll",WAFindTrack,$hget(GTSDll_settings,WAFolder) $+ $chr(1) $+ * $+ $2- $+ *)
n242=        if (%item > -1) {
n243=          dll " $+ $scriptdir $+ gtsmirc.dll" WACommand jump %item
n244=          .timer $+ $ctime -m 1 250 aud $iif($chan,-c $chan,)
n245=        }
n246=        else echo -a * wa_sync: $2- not found
n247=      }
n248=    }
n249=  }
n250=}
n251=
n252=;####################################################
n253=;##  /vdinfo -ecm [channel|window] [text]          ##
n254=;####################################################
n255=;##                                                ##
n256=;##  -e echo-mode                                  ##
n257=;##  -s strip colors                               ##
n258=;##  -c output to specific channel/window          ##
n259=;##  -m adds [text] to the end of output           ##
n260=;##                                                ##
n261=;####################################################
n262=
n263=alias vdinfo {
n264=  var %message $FormatMessage(cl_vdinfo $+ $chr(1) $+ $dll(" $+ $scriptdir $+ gtsmirc.dll",GetVDubInfo,_))
n265=  if (%message != $null) {
n266=    var %cnt_vdinfo $hget(GTSDll_settings,cnt_vdinfo)
n267=    inc %cnt_vdinfo
n268=    .hadd GTSDll_settings cnt_vdinfo %cnt_vdinfo
n269=    SendMsg %message $+ $chr(1) $+ vdinfo $+ $chr(1) $+ $1-
n270=  }
n271=  else echo -a * VirtualDub is not running or is not encoding
n272=}
n273=
n274=;####################################################
n275=;##  /eminfo -ec [channel|window] [text]           ##
n276=;####################################################
n277=;##                                                ##
n278=;##  -e echo-mode                                  ##
n279=;##  -s strip colors                               ##
n280=;##  -c output to specific channel/window          ##
n281=;##  -m adds [text] to the end of output           ##
n282=;##                                                ##
n283=;####################################################
n284=
n285=alias eminfo {
n286=  var %message $FormatMessage(cl_emule $+ $chr(1) $+ $GetEmuleData)
n287=  if (%message != $null) {
n288=    if (Error:* !iswm $gettok(%message,2,1)) {
n289=      var %cnt_eminfo $hget(GTSDll_settings,cnt_eminfo)
n290=      inc %cnt_eminfo
n291=      .hadd GTSDll_settings cnt_eminfo %cnt_eminfo
n292=      SendMsg %message $+ $chr(1) $+ eminfo $+ $chr(1) $+ $1-
n293=    }
n294=    else { echo -a * /eminfo: $gettok(%message,2,1) }
n295=  }
n296=  else echo -a * /eminfo: unhandled error
n297=}
n298=
n299=;####################################################
n300=;##  /dcinfo -ec [channel|window] [text]           ##
n301=;####################################################
n302=;##                                                ##
n303=;##  -e echo-mode                                  ##
n304=;##  -s strip colors                               ##
n305=;##  -c output to specific channel/window          ##
n306=;##  -m adds [text] to the end of output           ##
n307=;##                                                ##
n308=;####################################################
n309=
n310=alias dcinfo {
n311=  var %message $FormatMessage(cl_dcplusplus $+ $chr(1) $+ $dll(" $+ $scriptdir $+ gtsmirc.dll",GetDCPlusPlusInfo,_))
n312=  if (%message != $null) {
n313=    if ($exists($hget(GTSDll_settings,DCPlusPlusFolder) $+ DCPlusPlus.xml)) {
n314=      var %cnt_dcinfo $hget(GTSDll_settings,cnt_dcinfo)
n315=      inc %cnt_dcinfo
n316=      hadd GTSDll_settings cnt_dcinfo %cnt_dcinfo
n317=      SendMsg %message $+ $chr(1) $+ dcinfo $+ $chr(1) $+ $1-
n318=    }
n319=    else echo -a * GTSdll Error: DCPlusPlus Folder not set or invalid
n320=  }
n321=  else echo -a * DCPlusPlus is not running
n322=}
n323=
n324=;########################################################
n325=;##  /btinfo -ecti [channel|window] [torrrent#] [text] ##
n326=;########################################################
n327=;##                                                    ##
n328=;##  -e echo-mode                                      ##
n329=;##  -s strip colors                                   ##
n330=;##  -c output to specific channel/window              ##
n331=;##  -t show totals only                               ##
n332=;##  -m adds [text] to the end of output               ##
n333=;##  -i show only torrent #                            ##
n334=;##                                                    ##
n335=;########################################################
n336=alias btinfo {
n337=  if ($1) {
n338=    if ($left($1,1) == $chr(45)) {
n339=      if (t isin $1) { var %gtsdll.cmdparam.ok 1 | var %gtsdll.cmdparam.totalsonly 1 }
n340=      if ((i isin $1) && ($2 isnum)) { var %gtsdll.cmdparam.ok 1 | var %gtsdll.cmdparam.torrent $2 }
n341=    }
n342=    else { echo -a * /btinfo: Invalid parameters | return }
n343=  }
n344=  var %mode 0
n345=  if ($hget(GTSDll_settings,bt_use_az) == 1) {
n346=    if ($hget(GTSDll_settings,az.tmp.getting_info) != 1) {
n347=      echo -a Getting Azureus stats ...
n348=      if ($exists(" $+ $scriptdir $+ az.cache.tmp $+ ")) .remove " $+ $scriptdir $+ az.cache.tmp $+ "
n349=      .sockopen gtsdll.az.request $hget(GTSDll_settings,az_ip) $hget(GTSDll_settings,az_port)
n350=      .hadd GTSDll_settings az.tmp.getting_info 1
n351=      .hadd GTSDll_settings az.tmp.params $1-
n352=      return
n353=    }
n354=  }
n355=  if ($hget(GTSDll_settings,az.tmp.getting_info) == 1) {
n356=    .hdel GTSDll_settings az.tmp.getting_info
n357=    .hdel GTSDll_settings az.tmp.params
n358=    var %mode 2
n359=  }
n360=  :trymodestart
n361=  var %torrent 0
n362=  inc %mode
n363=  if (%mode == 1) { var %dllcall GetBTInfo }
n364=  else {
n365=    if (%mode == 3) {
n366=      var %dllcall GetAZInfo
n367=      var %cfgfile $scriptdir $+ az.cache.tmp
n368=    }
n369=    else {
n370=      var %cfgfile $hget(GTSdll_settings,bt_config_file)
n371=      if (%cfgfile) { var %dllcall GetCustomListViewInfo }
n372=      else { echo -a * BitTorrent is not running | return }
n373=    }
n374=  }
n375=  var %btmsg $dll(" $+ $scriptdir $+ gtsmirc.dll",$(%dllcall),0 $+ $chr(1) $+ %cfgfile)
n376=  var %btcount $gettok(%btmsg,3,1)
n377=  if (*ERROR* iswm %btmsg) {
n378=    echo -a * Error: %btmsg
n379=    return
n380=  }
n381=  var %btcnt 0
n382=  .hadd GTSDll_settings tmp_TotDl 0
n383=  .hadd GTSDll_settings tmp_TotUp 0
n384=  .hadd GTSDll_settings tmp_bt_cnt 0
n385=  if (%btcount > 0) {
n386=    :btnext
n387=    inc %btcnt
n388=    var %btmsg $dll(" $+ $scriptdir $+ gtsmirc.dll",$(%dllcall),$(%btcnt) $+ $chr(1) $+ %cfgfile)
n389=    if ($gettok(%btmsg,2,1) == SKIP) {
n390=      if (%gtsdll.cmdparam.torrent != $null) inc %gtsdll.cmdparam.torrent
n391=      goto btnext
n392=    }
n393=    var %message $FormatMessage(cl_bt $+ $chr(1) $+ %btmsg)
n394=    if (%gtsdll.cmdparam.totalsonly != 1) {
n395=      if (%message != $null) {
n396=        if (%gtsdll.cmdparam.torrent != $null) {
n397=          if (%gtsdll.cmdparam.torrent == %btcnt) { SendMsg %message $+ $chr(1) $+ btinfo $+ $chr(1) $+ $1- }
n398=        }
n399=        else {
n400=        SendMsg %message $+ $chr(1) $+ btinfo $+ $chr(1) $+ $1- }
n401=      }
n402=    }
n403=    else {
n404=      if ($gettok(%btmsg,2,1) == done) {
n405=        if (%gtsdll.cmdparam.torrent == $null) {
n406=          if ($hget(GTSDll_settings,tmp_bt_cnt) != 0) {
n407=            set %gts_bt_totalsonly 1
n408=            var %message $FormatMessage(cl_bt $+ $chr(1) $+ %btmsg)
n409=            if (%message != $null) { SendMsg %message $+ $chr(1) $+ btinfo $+ $chr(1) $+ $1- }
n410=            unset %gts_bt_totalsonly
n411=          }
n412=        }
n413=      }
n414=    }
n415=    if ($gettok(%btmsg,2,1) == done) goto btdone
n416=    goto btnext
n417=    :btdone
n418=    var %cnt_btinfo $hget(GTSDll_settings,cnt_btinfo)
n419=    inc %cnt_btinfo
n420=    hadd GTSDll_settings cnt_btinfo %cnt_btinfo
n421=    if ($hget(GTSDll_settings,tmp_bt_cnt) == 0) { echo -a * /btinfo: No active downloads | return }
n422=  }
n423=  else if (%mode == 2) { echo -a * BitTorrent is not running }
n424=  else goto trymodestart
n425=}
n426=
n427=alias -l SendMsg {
n428=  var %message $gettok($1-,1,1)
n429=  var %calledcmd $gettok($1-,2,1)
n430=  var %param1 $gettok($gettok($1-,3,1),1,32)
n431=  var %param2 $gettok($gettok($1-,3,1),2,32)
n432=  var %param3 $gettok($gettok($1-,3,1),3-98,32)
n433=  if (%param1) {
n434=    if ($left(%param1,1) == $chr(45)) {
n435=      if (s isin %param1) %message = $strip(%message,c)
n436=      if (c isin %param1) {
n437=        var %gtsdll.cmdparam.ok 1
n438=        if (%param2) {
n439=          if (m isin %param1) {
n440=            var %x1 $pos($(%param1),c,1)
n441=            var %x2 $pos($(%param1),m,1)
n442=            if (%x1 > %x2) { echo -a * / $+ %calledcmd $+ : Invalid parameters - c parameter can't be behind m parameter | return }
n443=            else { var %gtsdll.cmdparam.channel %param2 }
n444=          }
n445=          else { var %gtsdll.cmdparam.channel %param2 }
n446=        }
n447=        else { echo -a * / $+ %calledcmd $+ : Invalid parameters | return }
n448=        if (m isin %param1) {
n449=          var %message %message  $+ %param3
n450=        }
n451=      }
n452=      else {
n453=        if (m isin %param1) {
n454=          var %message %message  $+ %param2 %param3
n455=        }
n456=      }
n457=      if (e isin %param1) { var %gtsdll.cmdparam.ok 1 | var %gtsdll.cmdparam.echo 1 }
n458=    }
n459=    else { echo -a * / $+ %calledcmd $+ : Invalid parameters | return }
n460=  }
n461=  if (($active != Status Window) || ((%gtsdll.cmdparam.channel != $null) || (%gtsdll.cmdparam.echo == 1))) {
n462=    if (%message != $null) {
n463=      var %temp %message
n464=      :begin
n465=      if ([br] isin %temp) {
n466=        var %gts.br.found 1
n467=        var %x $pos(%temp,[br],1)
n468=        if (%x != $null) {
n469=          var %message $left(%temp,$calc($(%x) -1))
n470=          var %temp $right(%temp,$calc($len(%temp) - $(%x) - 3))
n471=        }
n472=      }
n473=      else {
n474=        var %gts.br.found 0
n475=        var %message %temp
n476=      }
n477=      if (c isincs $gettok($chan($iif(%gtsdll.cmdparam.channel,%gtsdll.cmdparam.channel,$active)).mode,1,32)) var %message = $strip(%message,c)
n478=      if (%gtsdll.cmdparam.echo == 1) {
n479=        echo $iif(%gtsdll.cmdparam.channel,%gtsdll.cmdparam.channel,-a) %message
n480=      }
n481=      else if ($hget(GTSDll_settings,cl_mode) == me)  {
n482=        describe $iif(%gtsdll.cmdparam.channel,%gtsdll.cmdparam.channel,$active) %message
n483=      }
n484=      else {  msg $iif(%gtsdll.cmdparam.channel,%gtsdll.cmdparam.channel,$active) %message }
n485=      if (%gts.br.found == 1) goto begin
n486=    }
n487=  }
n488=  else { echo -a * / $+ %calledcmd $+ : You are not on a channel }
n489=}
n490=
n491=alias -l GetEmuleData {
n492=  var %prefloc $hget(GTSDll_settings,EMuleFolder) $+ config\preferences.ini
n493=  var %try 1
n494=  :begin
n495=  if ($exists(" $+ $(%prefloc) $+ ")) {
n496=    var %totaldown = $readini(" $+ $(%prefloc) $+ ",statistics,totaldownloadedbytes),%totalup = $readini(" $+ $(%prefloc) $+ ",statistics,totaluploadedbytes)
n497=    if ($exists(" $+ $hget(GTSDll_settings,EMuleFolder) $+ onlinesig.dat)) {
n498=      var %line1 = $read("  $+ $hget(GTSDll_settings,EMuleFolder) $+ onlinesig.dat",1),%line2 = $read("  $+ $hget(GTSDll_settings,EMuleFolder) $+ onlinesig.dat",2)
n499=      var %eserver $gettok(%line1,2,124)
n500=      var %eip $gettok(%line1,3,124) $+ : $+ $gettok(%line1,4,124)
n501=      if (!%eserver) { var %eserver not connected | var %eip n/a }
n502=      var %edl $gettok(%line2,1,124)
n503=      if (%edl) { var %edl %edl $+ KB/s }
n504=      else { var %edl 0.0KB/s }
n505=      var %eul $gettok(%line2,2,124)
n506=      if (%eul) { var %eul %eul $+ KB/s }
n507=      else { var %eul 0.0KB/s }
n508=      var %equeue $gettok(%line2,3,124)
n509=      if (!%equeue) { var %equeue 0 }
n510=      var %etdn $bytes(%totaldown,3).suf
n511=      var %etup $bytes(%totalup,3).suf
n512=      return EMule $+ $chr(1) $+ %eserver $+ $chr(1) $+ %eip $+ $chr(1) $+ %edl $+ $chr(1) $+ %eul $+ $chr(1) $+ %equeue $+ $chr(1) $+ %etdn $+ $chr(1) $+ %etup
n513=    }
n514=    else { return Error: onlinesig.dat not found, please set the correct directory in settings and make sure the "online signature" option is enabled in your eMule options }
n515=  }
n516=  else {
n517=    if (%try == 1) {
n518=      var %try 2
n519=      var %prefloc $hget(GTSDll_settings,EMuleFolder) $+ preferences.ini
n520=      goto begin
n521=    }
n522=    else { return Error: preferences.ini not found, please set the correct directory in settings. }
n523=  }
n524=}
n525=;########################################################
n526=;##  /grInfo -ecti [channel|window] [download#] [text] ##
n527=;########################################################
n528=;##                                                    ##
n529=;##  -e echo-mode                                      ##
n530=;##  -s strip colors                                   ##
n531=;##  -c output to specific channel/window              ##
n532=;##  -t show totals only                               ##
n533=;##  -m adds [text] to the end of output               ##
n534=;##  -i show only download #                           ##
n535=;##                                                    ##
n536=;########################################################
n537=alias grInfo {
n538=  if ($1) {
n539=    if ($left($1,1) == $chr(45)) {
n540=      if (t isin $1) { var %gtsdll.cmdparam.ok 1 | var %gtsdll.cmdparam.totalsonly 1 }
n541=      if ((i isin $1) && ($2 isnum)) { var %gtsdll.cmdparam.ok 1 | var %gtsdll.cmdparam.item $2 }
n542=    }
n543=    else { echo -a * /grinfo: Invalid parameters | return }
n544=  }
n545=  var %grmsg $dll(" $+ $scriptdir $+ gtsmirc.dll",GetGRInfo,0)
n546=  var %grcnt 0
n547=  hadd GTSDll_settings tmp_TotDl %tmp_TotDl 0
n548=  var %grcount $gettok(%grmsg,3,1)
n549=  if (%grcount > 0) {
n550=    :next
n551=    inc %grcnt
n552=    var %grmsg $dll(" $+ $scriptdir $+ gtsmirc.dll",GetGRInfo,$(%grcnt))
n553=    var %message $FormatMessage(cl_grinfo $+ $chr(1) $+ %grmsg)
n554=    if (%gtsdll.cmdparam.totalsonly != 1) {
n555=      if (%message != $null) {
n556=        if (%gtsdll.cmdparam.item != $null) {
n557=          if (%gtsdll.cmdparam.item == %grcnt) { SendMsg %message $+ $chr(1) $+ grinfo $+ $chr(1) $+ $1- }
n558=        }
n559=        else { SendMsg %message $+ $chr(1) $+ grinfo $+ $chr(1) $+ $1- }
n560=      }
n561=    }
n562=    else {
n563=      if ($gettok(%grmsg,2,1) == done) {
n564=        set %gts_gr_totalsonly 1
n565=        var %message $FormatMessage(cl_grinfo $+ $chr(1) $+ %grmsg)
n566=        unset %gts_gr_totalsonly
n567=        if (%message != $null) { SendMsg %message $+ $chr(1) $+ grinfo $+ $chr(1) $+ $1- }
n568=      }
n569=    }
n570=    if ($gettok(%grmsg,2,1) == done) goto done
n571=    goto next
n572=    :done
n573=    var %cnt_grinfo $hget(GTSDll_settings,cnt_grinfo)
n574=    inc %cnt_grinfo
n575=    hadd GTSDll_settings cnt_grinfo %cnt_grinfo
n576=  }
n577=  else { echo -a * no GetRight downloads found }
n578=}
n579=
n580=;####################################################
n581=;##  /btTotals -ec [channel|window] [text]         ##
n582=;####################################################
n583=;##  (included for backward compatibility)         ##
n584=;##                                                ##
n585=;##  -e echo-mode                                  ##
n586=;##  -s strip colors                               ##
n587=;##  -c output to specific channel/window          ##
n588=;##  -m adds [text] to the end of output           ##
n589=;##                                                ##
n590=;####################################################
n591=
n592=alias btTotals {
n593=  var %param1 $1
n594=  if ($left(%param1,1) == $chr(45)) { var %param1 %param1 $+ t }
n595=  else { var %param1 -t %param1 }
n596=  var %cnt_bttotals $hget(GTSDll_settings,cnt_bttotals)
n597=  inc %cnt_bttotals
n598=  hadd GTSDll_settings cnt_bttotals %cnt_bttotals
n599=  btinfo %param1 $2-
n600=}
n601=
n602=;####################################################
n603=;##  /grTotals -ec [channel|window] [text]         ##
n604=;####################################################
n605=;##  (included for backward compatibility)         ##
n606=;##                                                ##
n607=;##  -e echo-mode                                  ##
n608=;##  -s strip colors                               ##
n609=;##  -c output to specific channel/window          ##
n610=;##  -m adds [text] to the end of output           ##
n611=;##                                                ##
n612=;####################################################
n613=
n614=alias grTotals {
n615=  if ($1) {
n616=    if ($left($1,1) == $chr(45)) {
n617=      if (c isin $1) {
n618=        var %gtsdll.cmdparam.ok 1
n619=        if ($2) { var %gtsdll.cmdparam.channel $2 }
n620=        else { echo -a * /grTotals: Invalid parameters | return }
n621=      }
n622=      if (e isin $1) { var %gtsdll.cmdparam.ok 1 | var %gtsdll.cmdparam.echo 1 }
n623=      if (%gtsdll.cmdparam.ok != 1) { echo -a * /grTotals: Invalid parameters | return }
n624=    }
n625=    else { echo -a * /grTotals: Invalid parameters | return }
n626=  }
n627=  var %cnt_grtotals $hget(GTSDll_settings,cnt_grtotals)
n628=  inc %cnt_grtotals
n629=  hadd GTSDll_settings cnt_grtotals %cnt_grtotals
n630=  grinfo -t $+ $iif(%gtsdll.cmdparam.echo,e,) $+ $iif(%gtsdll.cmdparam.channel,c %gtsdll.cmdparam.channel,)
n631=}
n632=
n633=;####################################################
n634=;##  /vid -ect [channel|window] [text]             ##
n635=;####################################################
n636=;##                                                ##
n637=;##  -e echo-mode                                  ##
n638=;##  -s strip colors                               ##
n639=;##  -c output to specific channel/window          ##
n640=;##  -m adds [text] to the end of output           ##
n641=;##                                                ##
n642=;####################################################
n643=
n644=alias vid {
n645=  var %message $FormatMessage(cl_video $+ $chr(1) $+ $dll(" $+ $scriptdir $+ gtsmirc.dll",GetOpenVideo,_))
n646=  var %cnt_video $hget(GTSDll_settings,cnt_video)
n647=  inc %cnt_video
n648=  hadd GTSDll_settings cnt_video %cnt_video
n649=  if (%message != $null) { SendMsg %message $+ $chr(1) $+ vid $+ $chr(1) $+ $1- }
n650=  else echo -ag * no player running or no file opened
n651=}
n652=
n653=;####################################################
n654=;##  /aud -ec [channel|window] [text]              ##
n655=;####################################################
n656=;##                                                ##
n657=;##  -e echo-mode                                  ##
n658=;##  -s strip colors                               ##
n659=;##  -c output to specific channel/window          ##
n660=;##  -m adds [text] to the end of output           ##
n661=;##                                                ##
n662=;####################################################
n663=
n664=alias aud {
n665=  set %GTS_target $GetParamTarget($1-)
n666=  if ($hget(gtsdll_settings,WAFolder) == $null) {
n667=    var %message $FormatMessage($dll(" $+ $scriptdir $+ gts_fb2k.dll",GetOpenAudio,NOT_USED))
n668=  }
n669=  else {
n670=    var %message $FormatMessage(cl_audpl $+ $chr(1) $+ $dll(" $+ $scriptdir $+ gtsmirc.dll",GetOpenAudio,$hget(GTSDll_settings,WAFolder)))
n671=  }
n672=  unset %GTS_target
n673=  var %cnt_audplay $hget(GTSDll_settings,cnt_audplay)
n674=  inc %cnt_audplay
n675=  hadd GTSDll_settings cnt_audplay %cnt_audplay
n676=  if (%message != $null) { SendMsg %message $+ $chr(1) $+ aud $+ $chr(1) $+ $1- }
n677=  else echo -a * $playerName is not running
n678=}
n679=
n680=;####################################################
n681=;##  /gtsdllinfo -ec [channel|window] [text]       ##
n682=;####################################################
n683=;##                                                ##
n684=;##  -e echo-mode                                  ##
n685=;##  -s strip colors                               ##
n686=;##  -c output to specific channel/window          ##
n687=;##  -m adds [text] to the end of output           ##
n688=;##                                                ##
n689=;####################################################
n690=
n691=alias gtsdllinfo {
n692=  var %head $hget(GTSDll_settings,cl_header)
n693=  var %sep $hget(GTSDll_settings,cl_seperator)
n694=  var %foot $hget(GTSDll_settings,cl_footer)
n695=  var %version $gtsdllver(fullver)
n696=  var %cnt_ad $hget(GTSDll_settings,cnt_ad)
n697=  inc %cnt_ad
n698=  hadd GTSDll_settings cnt_ad %cnt_ad
n699=  var %message %head GTSdll %sep I'm using Version: %version %sep Features: Shows "now playing" and "now downloading" stats for various apps and more %sep get current version at: #gtsdll @ irc.rizon.net %foot
n700=  SendMsg %message $+ $chr(1) $+ gtsdllinfo $+ $chr(1) $+ $1-
n701=}
n702=
n703=;####################################################
n704=;##  /gtsdllcounter -ec [channel|window] [text]    ##
n705=;####################################################
n706=;##                                                ##
n707=;##  -e echo-mode                                  ##
n708=;##  -s strip colors                               ##
n709=;##  -c output to specific channel/window          ##
n710=;##  -m adds [text] to the end of output           ##
n711=;##                                                ##
n712=;####################################################
n713=
n714=alias gtsdllcounter {
n715=  var %head $hget(GTSDll_settings,cl_header)
n716=  var %sep $hget(GTSDll_settings,cl_seperator)
n717=  var %foot $hget(GTSDll_settings,cl_footer)
n718=  var %message %head GTSdll %sep Command counter %sep /aud: $hget(GTSDll_settings,cnt_audplay) %sep /btinfo: $hget(GTSDll_settings,cnt_btinfo) %sep /bttotals: $hget(GTSDll_settings,cnt_bttotals) %sep /dcinfo: $hget(GTSDll_settings,cnt_dcinfo) %sep /eminfo: $hget(GTSDll_settings,cnt_ad) %sep /grinfo: $hget(GTSDll_settings,cnt_grinfo) %sep /gtsdllinfo: $hget(GTSDll_settings,cnt_ad) %sep /vdinfo: $hget(GTSDll_settings,cnt_vdinfo) %sep /vid: $hget(GTSDll_settings,cnt_video) %foot
n719=  SendMsg %message $+ $chr(1) $+ gtsdllcounter $+ $chr(1) $+ $1-
n720=}
n721=
n722=;####################################################
n723=;## socket operation for Azureus support           ##
n724=;####################################################
n725=on *:sockopen:gtsdll.az.request: {
n726=  if ($sockerr) { echo -a Azureus not running or not configured to work with GTSdll $sock($sockname).wsmsg | return }
n727=  ;echo -s Connected ...
n728=  var %len $calc(85 + $len($ticks))
n729=  .hadd GTSDll_settings az.tmp.header 0
n730=  var %a = sockwrite -n gtsdll.az.request
n731=  %a POST /process.cgi HTTP/1.0
n732=  %a Host: www.adv-clan.com
n733=  %a Referer: www.adv-clan.com
n734=  %a Content-Type: text/html
n735=  %a Content-Length: %len
n736=  %a
n737=  %a <REQUEST>
n738=  %a <METHOD>getDownloads</METHOD>
n739=  %a <REQUEST_ID> $+ $ticks $+ </REQUEST_ID>
n740=  %a </REQUEST>
n741=  %a
n742=  %a
n743=}
n744=on *:sockread:gtsdll.az.request: {
n745=  if ($hget(GTSdll_settings,az.tmp.header) == 0 ) {
n746=    sockread %download.temp
n747=    if ($gettok(%download.temp,1,32) == Content-Length:) { .hadd GTSDll_settings az.tmp.size $gettok(%download.temp,2,32) }
n748=    if ($len(%download.temp) < 4) {
n749=      .hadd GTSDll_settings az.tmp.size $calc($hget(GTSdll_settings,az.tmp.size) + $sock($sockname).rcvd)
n750=      .hadd GTSDll_settings az.tmp.header 1
n751=    }
n752=    halt
n753=  }
n754=  :start
n755=  sockread &tempfile
n756=  if ($sockbr == 0) {
n757=    ;echo -s $hget(GTSdll_settings,az.tmp.size) - $sock($sockname).rcvd
n758=    if ($hget(GTSdll_settings,az.tmp.size) == $sock($sockname).rcvd) {
n759=      .hdel GTSDll_settings az.tmp.header
n760=      .hdel GTSDll_settings az.tmp.size
n761=      .unset %download.temp
n762=      ;echo -a done, start analyzing the file ...
n763=      btinfo $hget(GTSDll_settings,az.tmp.params)
n764=    }
n765=    return
n766=  }
n767=  bwrite " $+ $scriptdir $+ az.cache.tmp $+ " -1 &tempfile
n768=  goto start
n769=}
n770=;####################################################
n771=;## /End socket operation for azureus support      ##
n772=;####################################################
n773=
n774=alias -l checkcodec {
n775=  var %FourCCcount $hget(GTSDll_codecs,0).item
n776=  var %xc 1
n777=  while (%xc < %FourCCcount) {
n778=    var %fourcc $hget(GTSDll_codecs,$(%xc)).item
n779=    if ($1 == %fourcc) {
n780=      return $hget(GTSDll_codecs,%xc).data
n781=    }
n782=    inc %xc
n783=  }
n784=  return $1
n785=}
n786=
n787=alias -l NoExt {
n788=  var %tmp $1-
n789=  var %tmp2 $right($1-,3)
n790=  var %tmp3 3
n791=  if ($chr(46) !isin %tmp2) {
n792=    var %tmp2 $right($1-,4)
n793=    var %tmp3 4
n794=  }
n795=  if ($chr(46) !isin %tmp2) {
n796=    var %tmp2 $right($1-,5)
n797=    var %tmp3 5
n798=  }
n799=  if ($chr(46) !isin %tmp2) {
n800=    var %tmp2 $right($1-,6)
n801=    var %tmp3 6
n802=  }
n803=  var %tmp4 .avi .divx .mpg .mpeg .asf .wmv .mp3 .mp2 .ogg
n804=  if (%tmp2 isin %tmp4) {
n805=    var %tmp $left($1-,$(- $+ %tmp3))
n806=  }
n807=  return %tmp
n808=}
n809=
n810=alias -l repInfo {
n811=  ;;####################################################
n812=  ;;##  Re-coded by phaze- to use regular expressions ##
n813=  ;;##  and hopefully speed things up a little bit    ##
n814=  ;;####################################################
n815=  var %placeholder $gettok($1-,1,1)
n816=  var %repby $gettok($1-,2,1)
n817=  var %msg $gettok($1-,3-32,1)
n818=  ;; the following var is used because $regsub returns numbers and mIRC tries to execute those as commands
n819=  var %trash
n820=  ;; the regex below strips only the start and end tags.
n821=  ;; this is used to strip only start and end tags
n822=  var %regex.tag.exists = /(\[\? $+ %placeholder $+ \]|\[[\\\/] $+ %placeholder $+ \])/gi
n823=  ;; this regex strips start and end tags and everything in between them
n824=  ;; this is to clean everything up in one line when no tag is found
n825=  var %regex.no.tag = /\[\? $+ %placeholder $+ \](.*)\[[\/\\] $+ %placeholder $+ \]/i
n826=  ;; this next regex is to check for an open tag
n827=  var %regex.check.open = /\[\? $+ %placeholder $+ \]/i
n828=  ;; this next regex is to check for a close tag
n829=  var %regex.check.close = /\[[\\\/] $+ %placeholder $+ \]/i
n830=  ;; this next regex is just because I can and I want to use $regsub rather than $replace ;)
n831=  var %regex.replace.tag = /\[ $+ %placeholder $+ \]/i
n832=  if (($regex(check_open_tag,%msg,%regex.check.open)) && ($regex(check_close_tag,%msg,%regex.check.close) == 0)) {
n833=    echo -a * /aud: Syntax Error in config-line - missing closing [\ $+ %placeholder $+ $chr(93)
n834=    return
n835=  }
n836=  if ((%repby != no %placeholder) && (n/a* !iswm %repby) && (%repby != None) && (%repby != cbr)) {
n837=    %trash = $regsub(remove_tags,%msg,%regex.tag.exists,,%msg)
n838=    %trash = $regsub(replace_tag,%msg,%regex.replace.tag,%repby,%msg)
n839=  }
n840=  else {
n841=    %trash = $regsub(no_tag,%msg,%regex.no.tag,,%msg)
n842=    %trash = $regsub(replace_tag,%msg,%regex.replace.tag,%repby,%msg)
n843=  }
n844=  return %msg
n845=}
n846=
n847=alias -l getbar {
n848=  var %cl1 $gettok($1-,1,44)
n849=  var %cl2 $gettok($1-,2,44)
n850=  var %cl3 $gettok($1-,3,44)
n851=  var %cnt $gettok($1-,4,44)
n852=  var %char1 $hget(GTSDll_settings,cl_bar_char1)
n853=  var %char2 $hget(GTSDll_settings,cl_bar_char2)
n854=  if (%char1 == $null) var %char1 $chr(124)
n855=  if (%char2 == $null) var %char2 -
n856=  if (c isincs $gettok($chan($active).mode,1,32)) {
n857=    if ($strip(%char1) == $strip(%char2)) {
n858=      var %char1 $chr(166)
n859=      var %char2 -
n860=    }
n861=  }
n862=  var %btext $iif(%cl2 != -1, $+ %cl2,) $+ $str(%char1,$round($calc(%cnt * %cl1 / 100),0)) $+ $iif(%cl3 != -1, $+ %cl3,) $+ $str(%char2,$round($calc((100 - %cnt) * %cl1 / 100),0))
n863=  return %btext
n864=}
n865=
n866=alias -l FormatMessage {
n867=  ;#############################################################
n868=  ;## Video Player                                            ##
n869=  ;#############################################################
n870=  if ($gettok($1-,2,1) == VID) {
n871=    var %tmsg $hget(GTSDll_settings,$gettok($1-,1,1))
n872=
n873=    var %tmsg $replace(%tmsg,[hd],$hget(GTSDll_settings,cl_header))
n874=    var %tmsg $replace(%tmsg,[sep],$hget(GTSDll_settings,cl_seperator))
n875=    var %tmsg $replace(%tmsg,[ft],$hget(GTSDll_settings,cl_footer))
n876=    var %tmsg $replace(%tmsg,[gtsdllad],#gtsdll @ irc.rizon.net)
n877=
n878=    var %pc $gettok($1-,11,1)
n879=
n880=    if ([bar= isin %tmsg) {
n881=      var %bpos $pos(%tmsg,[bar=,1)
n882=      var %bmsg $mid(%tmsg,$calc(%bpos +5),$calc($len(%tmsg) - %bpos -4))
n883=      var %bpos2 $pos(%bmsg,$chr(93),1)
n884=      var %bmsg $mid(%bmsg,1,$calc(%bpos2 -1))
n885=      var %tmsg $replace(%tmsg,$chr(91) $+ bar= $+ %bmsg $+ $chr(93),$getbar(%bmsg $+ $chr(44) $+ %pc))
n886=    }
n887=
n888=    var %tmsg $replace(%tmsg,[pc],$(%pc) $+ %)
n889=    var %tmsg $repInfo(pos $+ $chr(1) $+ $gettok($1-,5,1) $+ $chr(1) $+ %tmsg)
n890=    var %tmsg $repInfo(dur $+ $chr(1) $+ $gettok($1-,6,1) $+ $chr(1) $+ %tmsg)
n891=    var %tmsg $repInfo(size $+ $chr(1) $+ $bytes($gettok($1-,7,1)).suf $+ $chr(1) $+ %tmsg)
n892=    var %tmsg $repInfo(res $+ $chr(1) $+ $gettok($1-,8,1) $+ $chr(1) $+ %tmsg)
n893=    var %tmsg $repInfo(fps $+ $chr(1) $+ $gettok($1-,9,1) fps $+ $chr(1) $+ %tmsg)
n894=    var %tmsg $repInfo(bps $+ $chr(1) $+ ~ $+ $bytes($gettok($1-,10,1)).suf $+ /s $+ $chr(1) $+ %tmsg)
n895=    var %tmsg $repInfo(codec $+ $chr(1) $+ $checkcodec($upper($gettok($1-,12,1))) $+ $chr(1) $+ %tmsg)
n896=
n897=    var %player $gettok($1-,13,1)
n898=    if (%player == BSP) var %tmsg $replace(%tmsg,[player],BSPlayer)
n899=    if (%player == ZPL) var %tmsg $replace(%tmsg,[player],ZoomPlayer)
n900=    if (%player == MPC) var %tmsg $replace(%tmsg,[player],MPClassic)
n901=    if (%player == NUL) var %tmsg $replace(%tmsg,[player],Player)
n902=
n903=    var %vid $gettok($1-,4,1)
n904=    var %title $gettok($1-,14,1)
n905=    var %artist $gettok($1-,15,1)
n906=    ;if ((%title != n/a) && (%artist != n/a)) var %vid %artist - %title
n907=    if ($hget(GTSDll_settings,cl_no_ext) == $true) var %vid $noext(%vid)
n908=    if ($hget(GTSDll_settings,cl_no_uc) == $true) var %vid $replace(%vid,_,$chr(32))
n909=    var %tmsg $replace(%tmsg,[vid],$(%vid))
n910=  }
n911=  ;#############################################################
n912=  ;## VirtualDub Encoding Progress                            ##
n913=  ;#############################################################
n914=  if ($gettok($1-,2,1) == VDInfo) {
n915=    var %tmsg $hget(GTSDll_settings,$gettok($1-,1,1))
n916=
n917=    var %tmsg $replace(%tmsg,[hd],$hget(GTSDll_settings,cl_header))
n918=    var %tmsg $replace(%tmsg,[sep],$hget(GTSDll_settings,cl_seperator))
n919=    var %tmsg $replace(%tmsg,[ft],$hget(GTSDll_settings,cl_footer))
n920=    var %tmsg $replace(%tmsg,[gtsdllad],#gtsdll @ irc.rizon.net)
n921=
n922=    var %pc $gettok($1-,11,1)
n923=    var %pc $left(%pc,-1)
n924=
n925=    if ([bar= isin %tmsg) {
n926=      var %bpos $pos(%tmsg,[bar=,1)
n927=      var %bmsg $mid(%tmsg,$calc(%bpos +5),$calc($len(%tmsg) - %bpos -4))
n928=      var %bpos2 $pos(%bmsg,$chr(93),1)
n929=      var %bmsg $mid(%bmsg,1,$calc(%bpos2 -1))
n930=      var %tmsg $replace(%tmsg,$chr(91) $+ bar= $+ %bmsg $+ $chr(93),$getbar(%bmsg $+ $chr(44) $+ %pc))
n931=    }
n932=    if ($chr(37) !isin %pc) var %pc %pc $+ %
n933=
n934=    var %tmsg $replace(%tmsg,[pc],$(%pc))
n935=    var %tmsg $replace(%tmsg,[framecurrent],$gettok($1-,4,1))
n936=    var %tmsg $replace(%tmsg,[framestotal],$gettok($1-,5,1))
n937=    var %tmsg $replace(%tmsg,[audiocurrent],$gettok($1-,6,1))
n938=    var %tmsg $replace(%tmsg,[audiototal],$gettok($1-,7,1))
n939=    var %tmsg $replace(%tmsg,[vdata1],$gettok($1-,8,1))
n940=    var %tmsg $replace(%tmsg,[vdata2],$gettok($1-,9,1))
n941=    var %tmsg $replace(%tmsg,[adata],$gettok($1-,10,1))
n942=    var %tmsg $replace(%tmsg,[prosize],$gettok($1-,12,1))
n943=    var %tmsg $replace(%tmsg,[fps],$gettok($1-,13,1))
n944=    var %tmsg $replace(%tmsg,[eltime],$gettok($1-,14,1))
n945=    var %tmsg $replace(%tmsg,[estime],$gettok($1-,15,1))
n946=
n947=    var %file $gettok($1-,3,1)
n948=    if ($hget(GTSDll_settings,cl_no_uc) == $true) var %file $replace(%file,_,$chr(32))
n949=    var %tmsg $replace(%tmsg,[file],$(%file))
n950=  }
n951=  ;#############################################################
n952=  ;## BitTorrent                                              ##
n953=  ;#############################################################
n954=  if ((BTInfo == $gettok($1-,2,1)) && ($gettok($1-,3,1) != done)) {
n955=    var %time_est $gettok($gettok($1-,5,1),2,47)
n956=    var %tmsg $hget(GTSDll_settings,$gettok($1-,1,1) $+ info)
n957=
n958=    var %tmsg $replace(%tmsg,[hd],$hget(GTSDll_settings,cl_header))
n959=    var %tmsg $replace(%tmsg,[sep],$hget(GTSDll_settings,cl_seperator))
n960=    var %tmsg $replace(%tmsg,[ft],$hget(GTSDll_settings,cl_footer))
n961=    var %tmsg $replace(%tmsg,[gtsdllad],#gtsdll @ irc.rizon.net)
n962=
n963=    var %pc $gettok($1-,10,1)
n964=    if ($chr(37) !isin %pc) var %pc %pc $+ %
n965=    if (%pc == Seeding) { var %pc 100 }
n966=    else { var %pc $left(%pc,-1) }
n967=    if ($chr(46) isin %pc) var %pc $gettok(%pc,1,46)
n968=
n969=    if ([bar= isin %tmsg) {
n970=      var %bpos $pos(%tmsg,[bar=,1)
n971=      var %bmsg $mid(%tmsg,$calc(%bpos +5),$calc($len(%tmsg) - %bpos -4))
n972=      var %bpos2 $pos(%bmsg,$chr(93),1)
n973=      var %bmsg $mid(%bmsg,1,$calc(%bpos2 -1))
n974=      var %tmsg $replace(%tmsg,$chr(91) $+ bar= $+ %bmsg $+ $chr(93),$getbar(%bmsg $+ $chr(44) $+ %pc))
n975=    }
n976=    if ($chr(37) !isin %pc) var %pc %pc $+ %
n977=
n978=    var %kbsdn $gettok($gettok($1-,6,1),1,1))
n979=    ;; var %dnsuffix $gettok($gettok($1-,6,1),2,32))
n980=    var %tmp_TotDl $hget(GTSDll_settings,tmp_TotDl)
n981=    inc %tmp_TotDl $toBytes(%kbsdn)
n982=    hadd GTSDll_settings tmp_TotDl %tmp_TotDl
n983=    var %tmsg $replace(%tmsg,[kbsdn],$(%kbsdn))
n984=    ;; var %tmsg $replace(%tmsg,[dnsuf],$(%dnsuffix))
n985=
n986=    var %kbsup $gettok($gettok($1-,8,1),1,1))
n987=    ;; var %upsuffix $gettok($gettok($1-,8,1),2,32))
n988=    var %tmp_TotUp $hget(GTSDll_settings,tmp_TotUp)
n989=    inc %tmp_TotUp $toBytes(%kbsup)
n990=    hadd GTSDll_settings tmp_TotUp %tmp_TotUp
n991=    var %tmsg $replace(%tmsg,[kbsup],$(%kbsup))
n992=
n993=    var %tmp_bt_cnt $hget(GTSDll_settings,tmp_bt_cnt)
n994=    inc %tmp_bt_cnt
n995=    hadd GTSDll_settings tmp_bt_cnt %tmp_bt_cnt
n996=
n997=    var %tmsg $repInfo(pc $+ $chr(1) $+ %pc $+ $chr(1) $+ %tmsg)
n998=    var %tmsg $repInfo(tdn $+ $chr(1) $+ $gettok($1-,11,1) $+ $chr(1) $+ %tmsg)
n999=    ;    var %tmsg $repInfo(peers $+ $chr(1) $+ $gettok($1-,12,1) $+ $chr(1) $+ %tmsg)
n1000=    ;    var %tmsg $repInfo(seeds $+ $chr(1) $+ $gettok($1-,13,1) $+ $chr(1) $+ %tmsg)
n1001=    var %tmsg $repInfo(peers $+ $chr(1) $+ $gettok($gettok($1-,12,1),1,32) $+ $chr(1) $+ %tmsg)
n1002=    var %tmsg $repInfo(seeds $+ $chr(1) $+ $gettok($gettok($1-,13,1),1,32) $+ $chr(1) $+ %tmsg)
n1003=    var %tmsg $repInfo(size $+ $chr(1) $+ $gettok($1-,14,1) $+ $chr(1) $+ %tmsg)
n1004=    var %tmsg $repInfo(sr $+ $chr(1) $+ $gettok($1-,15,1) $+ $chr(1) $+ %tmsg)
n1005=    var %tmsg $repInfo(sc $+ $chr(1) $+ $gettok($1-,16,1) $+ $chr(1) $+ %tmsg)
n1006=    var %tmsg $repInfo(dned $+ $chr(1) $+ $gettok($gettok($1-,7,1),1,1) $+ $chr(1) $+ %tmsg)
n1007=    var %tmsg $repInfo(uped $+ $chr(1) $+ $gettok($gettok($1-,9,1),1,1) $+ $chr(1) $+ %tmsg)
n1008=    var %tmp $gettok($1-,5,1)
n1009=    if (%tmp == ∞) var %tmp n/a
n1010=    if (($chr(47) isin %tmp) && (%tmp != n/a)) {
n1011=      var %tmsg $repInfo(eltime $+ $chr(1) $+ $gettok($(%tmp),1,47) $+ $chr(1) $+ %tmsg)
n1012=      var %tmp $right($gettok(%tmp,2,47),$calc($len(%tmp)-1))
n1013=      var %tmsg $repInfo(estime $+ $chr(1) $+ $(%tmp) $+ $chr(1) $+ %tmsg)
n1014=    }
n1015=    else {
n1016=      if (%tmp == $null) { var %tmp n/a }
n1017=      else {
n1018=        var %tmsg $repInfo(eltime $+ $chr(1) $+ n/a $+ $chr(1) $+ %tmsg)
n1019=        var %tmsg $repInfo(estime $+ $chr(1) $+ $(%tmp) $+ $chr(1) $+ %tmsg)
n1020=      }
n1021=    }
n1022=    var %file $gettok($1-,4,1)
n1023=    var %file $replace(%file, MiB,MB)
n1024=    var %tmsg $replace(%tmsg,[client],$gettok($1-,18,1))
n1025=    var %tmsg $replace(%tmsg,[client-],$gettok($gettok($1-,18,1),1,32))
n1026=    if ($hget(GTSDll_settings,cl_no_uc) == $true) var %file $replace(%file,_,$chr(32))
n1027=    var %tmsg $replace(%tmsg,[file],$(%file))
n1028=    if (%gts_bt_totalsonly == 1) var %tmsg = $null
n1029=  }
n1030=  ;#############################################################
n1031=  ;## BitTorrent - if listing is done                         ##
n1032=  ;#############################################################
n1033=  if (*BTInfo?done* iswm $1-) {
n1034=    if (($hget(GTSDll_settings,tmp_bt_cnt) > 1 ) || (%gts_bt_totalsonly == 1)) {
n1035=      var %tmsg $hget(GTSDll_settings,$gettok($1-,1,1) $+ _totals)
n1036=
n1037=      var %tmsg $replace(%tmsg,[hd],$hget(GTSDll_settings,cl_header))
n1038=      var %tmsg $replace(%tmsg,[sep],$hget(GTSDll_settings,cl_seperator))
n1039=      var %tmsg $replace(%tmsg,[ft],$hget(GTSDll_settings,cl_footer))
n1040=      var %tmsg $replace(%tmsg,[gtsdllad],#gtsdll @ irc.rizon.net)
n1041=
n1042=      var %tmsg $replace(%tmsg,[down],$bytes($hget(GTSDll_settings,tmp_TotDl)) $suffix($hget(GTSDll_settings,tmp_TotDl)))
n1043=      ;; var %tmsg $replace(%tmsg,[dnsuf],$suffix($hget(GTSDll_settings,tmp_TotDl)))
n1044=      var %tmsg $replace(%tmsg,[up],$bytes($hget(GTSDll_settings,tmp_TotUp)) $suffix($hget(GTSDll_settings,tmp_TotUp)))
n1045=      ;; var %tmsg $replace(%tmsg,[upsuf],$suffix($hget(GTSDll_settings,tmp_TotUp)))
n1046=      var %tmsg $replace(%tmsg,[count],$hget(GTSDll_settings,tmp_bt_cnt))
n1047=      if (%gts_bt_totalsonly == 1) unset %gts_bt_totalsonly
n1048=  } }
n1049=  if ($gettok($1-,2,1) == ERROR) echo -a * GTSdll Error: $gettok($1-,3,1)
n1050=  ;#############################################################
n1051=  ;## DC++ & oDC & BCDC & ApexDC                              ##
n1052=  ;#############################################################
n1053=  if (DC++* iswm $gettok($1-,2,1)) {
n1054=    var %tmsg $hget(GTSDll_settings,$gettok($1-,1,1))
n1055=
n1056=    var %tmsg $replace(%tmsg,[hd],$hget(GTSDll_settings,cl_header))
n1057=    var %tmsg $replace(%tmsg,[sep],$hget(GTSDll_settings,cl_seperator))
n1058=    var %tmsg $replace(%tmsg,[ft],$hget(GTSDll_settings,cl_footer))
n1059=    var %tmsg $replace(%tmsg,[gtsdllad],#gtsdll @ irc.rizon.net)
n1060=
n1061=    var %tmsg $replace(%tmsg,[slots],$gettok($gettok($1-,3,1),2,32))
n1062=    if (*(ApexDC++) iswm $gettok($1-,2,1)) {
n1063=      var %tmsg $replace(%tmsg,[dl],$gettok($gettok($1-,6,1),3-4,32))
n1064=      var %tmsg $replace(%tmsg,[ul],$gettok($gettok($1-,7,1),3-4,32))
n1065=    }
n1066=    else {
n1067=      var %tmsg $replace(%tmsg,[dl],$gettok($gettok($1-,6,1),2-3,32))
n1068=      var %tmsg $replace(%tmsg,[ul],$gettok($gettok($1-,7,1),2-3,32))
n1069=    }
n1070=    var %tmp $gettok($gettok($1-,6,1),4,32)
n1071=    var %tmp $replace(%tmp,$chr(40),)
n1072=    var %tmp $replace(%tmp,$chr(41),)
n1073=    var %tmsg $replace(%tmsg,[dsl],$(%tmp))
n1074=    var %tmp $gettok($gettok($1-,7,1),4,32)
n1075=    var %tmp $replace(%tmp,$chr(40),)
n1076=    var %tmp $replace(%tmp,$chr(41),)
n1077=    var %tmsg $replace(%tmsg,[usl],$(%tmp))
n1078=    var %tmsg $replace(%tmsg,[dled],$gettok($gettok($1-,4,1),2-3,32))
n1079=    var %tmsg $replace(%tmsg,[uled],$gettok($gettok($1-,5,1),2-3,32))
n1080=
n1081=    if (*(oDC) iswm $gettok($1-,2,1)) {
n1082=      var %tmsg $replace(%tmsg,[client],oDC)
n1083=    }
n1084=    else if (*(ApexDC++) iswm $gettok($1-,2,1)) {
n1085=      var %tmsg $replace(%tmsg,[client],ApexDC++)
n1086=    }
n1087=    else {
n1088=      var %tmsg $replace(%tmsg,[client],DCPlusPlus)
n1089=    }
n1090=
n1091=    var %tmp1 $read($hget(GTSDll_settings,DCPlusPlusFolder) $+ DCPlusPlus.xml,w,*TotalDownload*)
n1092=    var %totdlled $remove(%tmp1,		<TotalDownload type="int64">)
n1093=    var %totdlled $remove(%totdlled ,</TotalDownload>)
n1094=    var %tmp2 $read($hget(GTSDll_settings,DCPlusPlusFolder) $+ DCPlusPlus.xml,w,*TotalUpload*)
n1095=    var %totulled $remove(%tmp2,		<TotalUpload type="int64">)
n1096=    var %totulled $remove(%totulled ,</TotalUpload>)
n1097=
n1098=    var %tmsg $replace(%tmsg,[tdled],$bytes(%totdlled).suf)
n1099=    var %tmsg $replace(%tmsg,[tuled],$bytes(%totulled).suf)
n1100=    var %tmsg $replace(%tmsg,[tsr],$round($calc(%totulled / %totdlled),2))
n1101=  }
n1102=  ;#############################################################
n1103=  ;## WinAmp                                                  ##
n1104=  ;#############################################################
n1105=  if (($gettok($1-,2,1) == WA2) && ($gettok($1-,3,1) == ID3)) {
n1106=    var %tmsg $hget(GTSDll_settings,$gettok($1-,1,1) $+ _id3present)
n1107=
n1108=    var %tmsg $replace(%tmsg,[hd],$hget(GTSDll_settings,cl_header))
n1109=    var %tmsg $replace(%tmsg,[sep],$hget(GTSDll_settings,cl_seperator))
n1110=    var %tmsg $replace(%tmsg,[ft],$hget(GTSDll_settings,cl_footer))
n1111=    var %tmsg $replace(%tmsg,[gtsdllad],#gtsdll @ irc.rizon.net)
n1112=
n1113=    var %tmsg $replace(%tmsg,[pllen],$gettok($1-,8,1))
n1114=    var %tmsg $replace(%tmsg,[plpos],$gettok($1-,7,1))
n1115=    var %tmsg $replace(%tmsg,[pos],$gettok($1-,5,1))
n1116=
n1117=    var %version $dll(" $+ $scriptdir $+ gtsmirc.dll",GetWAVersion,_)
n1118=    var %version $gettok(%version,1-2,46) $+ $gettok(%version,3,46)
n1119=    var %tmsg $replace(%tmsg,[version],$(%version))
n1120=    var %tmsg $replace(%tmsg,[pc],$gettok($1-,12,1))
n1121=
n1122=    var %length $gettok($1-,6,1))
n1123=    if (%length == 00:-1) { var %length no length }
n1124=    else if ([bar= isin %tmsg) {
n1125=      var %bpos $pos(%tmsg,[bar=,1)
n1126=      var %bmsg $mid(%tmsg,$calc(%bpos +5),$calc($len(%tmsg) - %bpos -4))
n1127=      var %bpos2 $pos(%bmsg,$chr(93),1)
n1128=      var %bmsg $mid(%bmsg,1,$calc(%bpos2 -1))
n1129=      var %tmsg $replace(%tmsg,$chr(91) $+ bar= $+ %bmsg $+ $chr(93),$getbar(%bmsg $+ $chr(44) $+ $gettok($1-,12,1)))
n1130=    }
n1131=
n1132=    var %comment $gettok($1-,17,1)
n1133=    var %genre $gettok($1-,18,1)
n1134=    var %year $gettok($1-,16,1)
n1135=    var %track $gettok($1-,19,1)
n1136=    if ($len(%track) == 1) var %track 0 $+ %track
n1137=    var %title $gettok($1-,14,1)
n1138=    var %artist $gettok($1-,13,1)
n1139=    var %album $gettok($1-,15,1)
n1140=    var %bitrate $gettok($gettok($1-,9,1),1,32)
n1141=    var %vbr $gettok($gettok($1-,9,1),3,32)
n1142=    if (%vbr == $null) var %vbr cbr
n1143=    var %size $bytes($gettok($1-,11,1)).suf
n1144=    if (%size == 0B) var %size no size
n1145=    var %file $gettok($1-,4,1)
n1146=    if (http* iswm %file) { var %http %file }
n1147=    else { var %http no http }
n1148=
n1149=    var %tmsg $replace(%tmsg,[bitrate],$(%bitrate))
n1150=    var %tmsg $repInfo(http $+ $chr(1) $+ %http $+ $chr(1) $+ %tmsg)
n1151=    var %tmsg $repInfo(size $+ $chr(1) $+ %size $+ $chr(1) $+ %tmsg)
n1152=    var %tmsg $repInfo(length $+ $chr(1) $+ %length $+ $chr(1) $+ %tmsg)
n1153=    var %tmsg $repInfo(vbr $+ $chr(1) $+ %vbr $+ $chr(1) $+ %tmsg)
n1154=    var %tmsg $repInfo(title $+ $chr(1) $+ %title $+ $chr(1) $+ %tmsg)
n1155=    var %tmsg $repInfo(artist $+ $chr(1) $+ %artist $+ $chr(1) $+ %tmsg)
n1156=    var %tmsg $repInfo(album $+ $chr(1) $+ %album $+ $chr(1) $+ %tmsg)
n1157=    var %tmsg $repInfo(comment $+ $chr(1) $+ %comment $+ $chr(1) $+ %tmsg)
n1158=    var %tmsg $repInfo(genre $+ $chr(1) $+ %genre $+ $chr(1) $+ %tmsg)
n1159=    var %tmsg $repInfo(year $+ $chr(1) $+ %year $+ $chr(1) $+ %tmsg)
n1160=    var %tmsg $repInfo(track $+ $chr(1) $+ %track $+ $chr(1) $+ %tmsg)
n1161=    var %tmsg $repInfo(res $+ $chr(1) $+ $gettok($1-,21,1) $+ $chr(1) $+ %tmsg)
n1162=    var %tmsg $repInfo(fps $+ $chr(1) $+ $gettok($1-,22,1) fps $+ $chr(1) $+ %tmsg)
n1163=    var %tmsg $repInfo(codec $+ $chr(1) $+ $checkcodec($upper($gettok($1-,23,1))) $+ $chr(1) $+ %tmsg)
n1164=    var %tmsg $repInfo(channels $+ $chr(1) $+ $gettok($1-,10,1) $+ $chr(1) $+ %tmsg)
n1165=    var %tmsg $repInfo(layers $+ $chr(1) $+ $gettok($1-,24,1) $+ $chr(1) $+ %tmsg)
n1166=    var %tmsg $repInfo(mpegver $+ $chr(1) $+ $gettok($1-,25,1) $+ $chr(1) $+ %tmsg)
n1167=    var %tmsg $repInfo(srate $+ $chr(1) $+ $gettok($1-,26,1) $+ $chr(1) $+ %tmsg)
n1168=    var %tmsg $repInfo(emphasis $+ $chr(1) $+ $gettok($1-,27,1) $+ $chr(1) $+ %tmsg)
n1169=    var %tmsg $repInfo(encapp $+ $chr(1) $+ $gettok($1-,28,1) $+ $chr(1) $+ %tmsg)
n1170=    var %tmsg $repInfo(ext $+ $chr(1) $+ $lower($gettok($1-,20,1)) $+ $chr(1) $+ %tmsg)
n1171=
n1172=    if ([path= isin %tmsg) {
n1173=      var %path $gettok($1-,29,1)
n1174=      if ([path=1] isin %tmsg) { var %path $gettok(%path,-1,92) | var %tmsg $replace(%tmsg,[path=1],$(%path)) }
n1175=      if ([path=2] isin %tmsg) { var %path $gettok(%path,-2,92) $+ \ $+ $gettok(%path,-1,92) | var %tmsg $replace(%tmsg,[path=2],$(%path)) }
n1176=      if ([path=3] isin %tmsg) { var %path $gettok(%path,-3,92) $+ \ $+ $gettok(%path,-2,92) $+ \ $+ $gettok(%path,-1,92) | var %tmsg $replace(%tmsg,[path=3],$(%path)) }
n1177=      if ([path=4] isin %tmsg) { var %path $gettok(%path,-4,92) $+ \ $+ $gettok(%path,-3,92) $+ \ $+ $gettok(%path,-2,92) $+ \ $+ $gettok(%path,-1,92) | var %tmsg $replace(%tmsg,[path=4],$(%path)) }
n1178=    }
n1179=    var %tmsg $replace(%tmsg,[file],$gettok($1-,4,1))
n1180=    var %tmsg $replace(%tmsg,[player],WinAmp)
n1181=  }
n1182=  ;#############################################################
n1183=  ;## Foobar2000                                              ##
n1184=  ;#############################################################
n1185=  if ($gettok($1-,2,1) == FB2K) {
n1186=    var %tmsg $hget(GTSDll_settings,$gettok($1-,1,1) $+ _id3present)
n1187=
n1188=    var %tmsg $replace(%tmsg,[hd],$hget(GTSDll_settings,cl_header))
n1189=    var %tmsg $replace(%tmsg,[sep],$hget(GTSDll_settings,cl_seperator))
n1190=    var %tmsg $replace(%tmsg,[ft],$hget(GTSDll_settings,cl_footer))
n1191=    var %tmsg $replace(%tmsg,[gtsdllad],#gtsdll @ irc.rizon.net)
n1192=
n1193=    var %tmsg $replace(%tmsg,[pllen],$gettok($1-,8,1))
n1194=    var %tmsg $replace(%tmsg,[plpos],$gettok($1-,7,1))
n1195=    var %tmsg $repInfo(pos $+ $chr(1) $+ $gettok($1-,5,1) $+ $chr(1) $+ %tmsg)
n1196=
n1197=    var %version $gettok($1-,3,1)
n1198=    var %version $gettok(%version,2-,32)
n1199=    var %tmsg $replace(%tmsg,[version],$(%version))
n1200=    var %tmsg $replace(%tmsg,[pc],$gettok($1-,12,1))
n1201=
n1202=    var %length $gettok($1-,6,1))
n1203=    if ($len(%length) < 4) { var %length no length }
n1204=    else if ([bar= isin %tmsg) {
n1205=      var %bpos $pos(%tmsg,[bar=,1)
n1206=      var %bmsg $mid(%tmsg,$calc(%bpos +5),$calc($len(%tmsg) - %bpos -4))
n1207=      var %bpos2 $pos(%bmsg,$chr(93),1)
n1208=      var %bmsg $mid(%bmsg,1,$calc(%bpos2 -1))
n1209=      var %tmsg $replace(%tmsg,$chr(91) $+ bar= $+ %bmsg $+ $chr(93),$getbar(%bmsg $+ $chr(44) $+ $gettok($1-,12,1)))
n1210=    }
n1211=
n1212=    var %comment $gettok($1-,17,1)
n1213=    var %genre $gettok($1-,18,1)
n1214=    var %year $gettok($1-,16,1)
n1215=    var %track $gettok($1-,19,1)
n1216=    if ($len(%track) == 1) var %track 0 $+ %track
n1217=    var %title $gettok($1-,14,1)
n1218=    var %artist $gettok($1-,13,1)
n1219=    var %album $gettok($1-,15,1)
n1220=    var %bitrate $gettok($gettok($1-,9,1),1,32)
n1221=    var %vbr $gettok($gettok($1-,9,1),3,32)
n1222=    var %size $bytes($gettok($1-,11,1)).suf
n1223=    if (%size == 0B) var %size no size
n1224=    var %file $gettok($1-,4,1)
n1225=    if (http* iswm %file) { var %http %file }
n1226=    else { var %http no http }
n1227=    /*
n1228=    if ($utfenabled(%GTS_target)) {
n1229=      var %tmsg $utfencode(%tmsg)
n1230=    }
n1231=    else {
n1232=      var %comment $utfdec(%comment)
n1233=      var %genre $utfdec(%genre)
n1234=      var %year $utfdec(%year)
n1235=      var %track $utfdec(%track)
n1236=      var %title $utfdec(%title)
n1237=      var %artist $utfdec(%artist)
n1238=      var %album $utfdec(%album)
n1239=      var %file $utfdec(%file)
n1240=      var %http $utfdec(%http)
n1241=    }
n1242=    */
n1243=    var %tmsg $replace(%tmsg,[bitrate],$(%bitrate))
n1244=    var %tmsg $repInfo(http $+ $chr(1) $+ %http $+ $chr(1) $+ %tmsg)
n1245=    var %tmsg $repInfo(size $+ $chr(1) $+ %size $+ $chr(1) $+ %tmsg)
n1246=    var %tmsg $repInfo(length $+ $chr(1) $+ %length $+ $chr(1) $+ %tmsg)
n1247=    var %tmsg $repInfo(vbr $+ $chr(1) $+ %vbr $+ $chr(1) $+ %tmsg)
n1248=    var %tmsg $repInfo(title $+ $chr(1) $+ %title $+ $chr(1) $+ %tmsg)
n1249=    var %tmsg $repInfo(artist $+ $chr(1) $+ %artist $+ $chr(1) $+ %tmsg)
n1250=    var %tmsg $repInfo(album $+ $chr(1) $+ %album $+ $chr(1) $+ %tmsg)
n1251=    var %tmsg $repInfo(comment $+ $chr(1) $+ %comment $+ $chr(1) $+ %tmsg)
n1252=    var %tmsg $repInfo(genre $+ $chr(1) $+ %genre $+ $chr(1) $+ %tmsg)
n1253=    var %tmsg $repInfo(year $+ $chr(1) $+ %year $+ $chr(1) $+ %tmsg)
n1254=    var %tmsg $repInfo(track $+ $chr(1) $+ %track $+ $chr(1) $+ %tmsg)
n1255=    var %tmsg $repInfo(codec $+ $chr(1) $+ $checkcodec($upper($gettok($1-,21,1))) $+ $chr(1) $+ %tmsg)
n1256=    var %tmsg $repInfo(channels $+ $chr(1) $+ $gettok($1-,10,1) $+ $chr(1) $+ %tmsg)
n1257=    var %tmsg $repInfo(srate $+ $chr(1) $+ $gettok($1-,22,1) $+ $chr(1) $+ %tmsg)
n1258=    var %tmsg $repInfo(ext $+ $chr(1) $+ $lower($gettok($1-,20,1)) $+ $chr(1) $+ %tmsg)
n1259=
n1260=    var %tmsg $repInfo(res $+ $chr(1) $+ n/a $+ $chr(1) $+ %tmsg)
n1261=    var %tmsg $repInfo(fps $+ $chr(1) $+ n/a $+ $chr(1) $+ %tmsg)
n1262=    var %tmsg $repInfo(codec $+ $chr(1) $+ n/a $+ $chr(1) $+ %tmsg)
n1263=    var %tmsg $repInfo(layers $+ $chr(1) $+ n/a $+ $chr(1) $+ %tmsg)
n1264=    var %tmsg $repInfo(mpegver $+ $chr(1) $+ n/a $+ $chr(1) $+ %tmsg)
n1265=    var %tmsg $repInfo(emphasis $+ $chr(1) $+ n/a $+ $chr(1) $+ %tmsg)
n1266=    var %tmsg $repInfo(encapp $+ $chr(1) $+ n/a $+ $chr(1) $+ %tmsg)
n1267=
n1268=    if ([path= isin %tmsg) {
n1269=      var %path $gettok($1-,23,1)
n1270=      if ([path=1] isin %tmsg) { var %path $gettok(%path,-1,92) | var %tmsg $replace(%tmsg,[path=1],$(%path)) }
n1271=      if ([path=2] isin %tmsg) { var %path $gettok(%path,-2,92) $+ \ $+ $gettok(%path,-1,92) | var %tmsg $replace(%tmsg,[path=2],$(%path)) }
n1272=      if ([path=3] isin %tmsg) { var %path $gettok(%path,-3,92) $+ \ $+ $gettok(%path,-2,92) $+ \ $+ $gettok(%path,-1,92) | var %tmsg $replace(%tmsg,[path=3],$(%path)) }
n1273=      if ([path=4] isin %tmsg) { var %path $gettok(%path,-4,92) $+ \ $+ $gettok(%path,-3,92) $+ \ $+ $gettok(%path,-2,92) $+ \ $+ $gettok(%path,-1,92) | var %tmsg $replace(%tmsg,[path=4],$(%path)) }
n1274=    }
n1275=
n1276=    var %tmsg $replace(%tmsg,[file],$gettok($1-,4,1))
n1277=    var %tmsg $replace(%tmsg,[player],$gettok($gettok($1-,3,1),1,32))
n1278=  }
n1279=  ;#############################################################
n1280=  ;## eMule                                                   ##
n1281=  ;#############################################################
n1282=  if ($gettok($1-,2,1) == EMule)  {
n1283=    var %tmsg $hget(GTSDll_settings,$gettok($1-,1,1))
n1284=
n1285=    var %tmsg $replace(%tmsg,[hd],$hget(GTSDll_settings,cl_header))
n1286=    var %tmsg $replace(%tmsg,[sep],$hget(GTSDll_settings,cl_seperator))
n1287=    var %tmsg $replace(%tmsg,[ft],$hget(GTSDll_settings,cl_footer))
n1288=    var %tmsg $replace(%tmsg,[gtsdllad],#gtsdll @ irc.rizon.net)
n1289=
n1290=    var %tmsg $replace(%tmsg,[server],$gettok($1-,3,1))
n1291=    var %tmsg $repInfo(ip $+ $chr(1) $+ $gettok($1-,4,1) $+ $chr(1) $+ %tmsg)
n1292=    var %tmsg $replace(%tmsg,[dn],$gettok($1-,5,1))
n1293=    var %tmsg $replace(%tmsg,[up],$gettok($1-,6,1))
n1294=    var %tmsg $replace(%tmsg,[queues],$gettok($1-,7,1))
n1295=    var %tmsg $replace(%tmsg,[tdn],$gettok($1-,8,1))
n1296=    var %tmsg $replace(%tmsg,[tup],$gettok($1-,9,1))
n1297=  }
n1298=  ;#############################################################
n1299=  ;## GetRight                                                ##
n1300=  ;#############################################################
n1301=  if ($gettok($1-,2,1) == GRInfo)  {
n1302=    var %tmsg $hget(GTSDll_settings,$gettok($1-,1,1))
n1303=    var %tmsg $replace(%tmsg,[hd],$hget(GTSDll_settings,cl_header))
n1304=    var %tmsg $replace(%tmsg,[sep],$hget(GTSDll_settings,cl_seperator))
n1305=    var %tmsg $replace(%tmsg,[ft],$hget(GTSDll_settings,cl_footer))
n1306=    var %tmsg $replace(%tmsg,[gtsdllad],#gtsdll @ irc.rizon.net)
n1307=
n1308=    var %tpos $pos(%tmsg,[?totals],1)
n1309=    if ($gettok($1-,3,1) == done) {
n1310=      var %count $gettok($1-,4,1)
n1311=      if ((%count > 1) || (%gts_gr_totalsonly == 1)) {
n1312=        if (%tpos != $null) var %tmsg $right(%tmsg,$calc($len(%tmsg) - $(%tpos) +1))
n1313=        var %tmsg $replace(%tmsg,[?totals],)
n1314=        var %tmsg $replace(%tmsg,[/totals],)
n1315=        var %tmsg $replace(%tmsg,[\totals],)
n1316=        var %tmsg $replace(%tmsg,[/totals],)
n1317=        var %tmsg $replace(%tmsg,[count],$(%count))
n1318=        var %tmsg $replace(%tmsg,[down],$hget(GTSDll_settings,tmp_TotDl) $+ KB/s)
n1319=      }
n1320=      else return
n1321=    }
n1322=    else {
n1323=      if (%tpos != $null) var %tmsg $left(%tmsg,$calc($(%tpos) - 1))
n1324=      var %pc $gettok($1-,5,1)
n1325=      var %pc $replace(%pc,$chr(37),)
n1326=      if (([bar= isin %tmsg) && (%pc != n/a)) {
n1327=        var %bpos $pos(%tmsg,[bar=,1)
n1328=        var %bmsg $mid(%tmsg,$calc(%bpos +5),$calc($len(%tmsg) - %bpos -4))
n1329=        var %bpos2 $pos(%bmsg,$chr(93),1)
n1330=        var %bmsg $mid(%bmsg,1,$calc(%bpos2 -1))
n1331=        var %tmsg $replace(%tmsg,$chr(91) $+ bar= $+ %bmsg $+ $chr(93),$getbar(%bmsg $+ $chr(44) $+ $(%pc)))
n1332=      }
n1333=      else { var %tmsg $replace(%tmsg,$chr(91) $+ bar= $+ %bmsg $+ $chr(93),))) }
n1334=
n1335=      var %kbsdn $gettok($1-,9,1)
n1336=      if (%kbsdn == n/a) var %kbsdn 0
n1337=      if (k isin %kbsdn) var %gts.div k
n1338=      if (m isin %kbsdn) var %gts.div m
n1339=      if (g isin %kbsdn) var %gts.div g
n1340=      var %kbsdn $replace(%kbsdn,/sec,)
n1341=      var %kbsdn $replace(%kbsdn,/s,)
n1342=      var %kbsdn $replace(%kbsdn,b,)
n1343=      var %kbsdn $replace(%kbsdn,k,)
n1344=      var %kbsdn $replace(%kbsdn,m,)
n1345=      var %kbsdn $replace(%kbsdn,g,)
n1346=      if (g isin %gts.div) var %kbsdn $calc(%kbsdn * 1000000)
n1347=      if (m isin %gts.div) var %kbsdn $calc(%kbsdn * 1000)
n1348=      if (%gts.div == $null) var %kbsdn $calc(%kbsdn / 1000)
n1349=      if ($gettok($1-,4,1) == 1) hadd GTSDll_settings tmp_TotDl 0
n1350=      var %tmp_TotDl $hget(GTSDll_settings,tmp_TotDl)
n1351=      inc %tmp_TotDl %kbsdn $calc(%kbsdn * 1000000)
n1352=      hadd GTSDll_settings tmp_TotDl %tmp_TotDl
n1353=
n1354=      var %tmsg $repInfo(pc $+ $chr(1) $+ $gettok($1-,5,1) $+ $chr(1) $+ %tmsg)
n1355=      var %tmsg $repInfo(tdn $+ $chr(1) $+ $gettok($1-,6,1) $+ $chr(1) $+ %tmsg)
n1356=      var %tmsg $repInfo(size $+ $chr(1) $+ $gettok($1-,7,1) $+ $chr(1) $+ %tmsg)
n1357=      var %tmsg $repInfo(estime $+ $chr(1) $+ $gettok($1-,8,1) $+ $chr(1) $+ %tmsg)
n1358=      var %tmsg $repInfo(kbsdn $+ $chr(1) $+ $gettok($1-,9,1) $+ $chr(1) $+ %tmsg)
n1359=      var %tmsg $repInfo(url $+ $chr(1) $+ $gettok($1-,10,1) $+ $chr(1) $+ %tmsg)
n1360=
n1361=      var %file $gettok($1-,4,1)
n1362=      if ($hget(GTSDll_settings,cl_no_uc) == $true) var %file $replace(%file,_,$chr(32))
n1363=      var %tmsg $replace(%tmsg,[file],$(%file))
n1364=    }
n1365=  }
n1366=  ;#############################################################
n1367=  ;## DCC                                                     ##
n1368=  ;#############################################################
n1369=  if ($gettok($1-,1,1) == cl_dcc)  {
n1370=    var %tmsg $hget(GTSDll_settings,$gettok($1-,1,1))
n1371=
n1372=    if ([bar= isin %tmsg) {
n1373=      var %pc = $remove($gettok($1-,8,1), $chr(37))
n1374=      var %bpos $pos(%tmsg,[bar=,1)
n1375=      var %bmsg $mid(%tmsg,$calc(%bpos +5),$calc($len(%tmsg) - %bpos -4))
n1376=      var %bpos2 $pos(%bmsg,$chr(93),1)
n1377=      var %bmsg $mid(%bmsg,1,$calc(%bpos2 -1))
n1378=      var %tmsg $replace(%tmsg,$chr(91) $+ bar= $+ %bmsg $+ $chr(93),$getbar(%bmsg $+ $chr(44) $+ %pc))
n1379=    }
n1380=
n1381=    var %tmsg $replace(%tmsg,[hd],$hget(GTSDll_settings,cl_header))
n1382=    var %tmsg $replace(%tmsg,[sep],$hget(GTSDll_settings,cl_seperator))
n1383=    var %tmsg $replace(%tmsg,[ft],$hget(GTSDll_settings,cl_footer))
n1384=    var %tmsg $replace(%tmsg,[gtsdllad],#gtsdll @ irc.rizon.net)
n1385=
n1386=    var %tmsg $replace(%tmsg,[type],$gettok($1-,2,1))
n1387=    var %tmsg $replace(%tmsg,[nick],$gettok($1-,3,1))
n1388=    var %tmsg $replace(%tmsg,[size],$gettok($1-,5,1))
n1389=    ;;var %tmsg $replace(%tmsg,[rcvd],$gettok($1-,6,1))
n1390=    var %tmsg $repInfo(rcvd $+ $chr(1) $+ $gettok($1-,6,1) $+ $chr(1) $+ %tmsg)
n1391=    var %tmsg $repInfo(sent $+ $chr(1) $+ $gettok($1-,7,1) $+ $chr(1) $+ %tmsg)
n1392=    var %tmsg $replace(%tmsg,[pc],$gettok($1-,8,1))
n1393=    var %tmsg $replace(%tmsg,[speed],$gettok($1-,9,1))
n1394=    var %tmsg $replace(%tmsg,[eltime],$gettok($1-,10,1))
n1395=    var %tmsg $replace(%tmsg,[estime],$gettok($1-,11,1))
n1396=    var %tmsg $replace(%tmsg,[num],$gettok($1-,12,1))
n1397=    var %tmsg $replace(%tmsg,[network],$gettok($1-,13,1))
n1398=
n1399=    var %file $gettok($1-,4,1)
n1400=    if ($hget(GTSDll_settings,cl_no_uc) == $true) var %file $replace(%file,_,$chr(32))
n1401=    var %tmsg $replace(%tmsg,[file],$(%file))
n1402=  }
n1403=  if ($gettok($1-,1,1) == cl_dcctotals)  {
n1404=    var %tmsg $hget(GTSDll_settings,$gettok($1-,1,1))
n1405=
n1406=    var %tmsg $replace(%tmsg,[hd],$hget(GTSDll_settings,cl_header))
n1407=    var %tmsg $replace(%tmsg,[sep],$hget(GTSDll_settings,cl_seperator))
n1408=    var %tmsg $replace(%tmsg,[ft],$hget(GTSDll_settings,cl_footer))
n1409=    var %tmsg $replace(%tmsg,[gtsdllad],#gtsdll @ irc.rizon.net)
n1410=
n1411=    var %tmsg $replace(%tmsg,[type],$gettok($1-,2,1))
n1412=    var %tmsg $replace(%tmsg,[tdccs],$gettok($1-,3,1))
n1413=    var %tmsg $replace(%tmsg,[tspeed],$gettok($1-,4,1))
n1414=  }
n1415=  ;#############################################################
n1416=  ;## End DCC                                                 ##
n1417=  ;#############################################################
n1418=  if (Error* iswm $gettok($1-,2,1)) var %tmsg $1-
n1419=  return %tmsg
n1420=}
n1421=
n1422=;#############################################################
n1423=;## Settings Dialog                                         ##
n1424=;#############################################################
n1425=dialog -l gtsdll_settings {
n1426=  title "GTSdll - Settings"
n1427=  size -1 -1 268 164
n1428=  option dbu
n1429=  tab "General", 1, 0 0 265 143
n1430=  edit "", 6, 8 30 219 10, tab 1 autohs
n1431=  text "Folder of DC++ (if not installed, leave it blank)", 7, 8 21 112 8, tab 1
n1432=  check "Use Built-In PopUps", 8, 14 113 61 10, tab 1
n1433=  button "Browse", 36, 230 30 30 10, tab 1
n1434=  text "Folder of WinAmp (2.x/5) (if not installed, leave it blank)", 23, 8 72 151 8, tab 1
n1435=  edit "", 46, 8 80 219 10, tab 1 autohs
n1436=  button "Browse", 47, 230 80 30 10, tab 1
n1437=  edit "", 63, 8 50 219 10, tab 1 autohs
n1438=  button "Browse", 64, 230 50 30 10, tab 1
n1439=  text "Used config file for Multi-BitTorrent Client (leave it blank, if not used)", 65, 8 42 167 8, tab 1
n1440=  text "Note: some options are disabled, because they require Win2k, XP or newer", 66, 10 135 240 8, hide tab 1 center
n1441=  text "Folder of eMule (if not installed, leave it blank)", 9, 8 92 151 8, tab 1
n1442=  edit "", 68, 8 100 219 10, tab 1 autohs
n1443=  button "Browse", 69, 230 100 30 10, tab 1
n1444=  check "Dynamic Popups (note: cpu intensive)", 74, 79 113 135 10, tab 1
n1445=  check "Automatically check for updates on start. If Update found:", 5, 14 124 152 10, tab 1
n1446=  check "Update", 83, 168 124 29 10, tab 1
n1447=  check "Ask how to Proceed", 84, 198 124 65 10, tab 1
n1448=  check "Enable Azureus support (please read the Readme file in the extras directory for details)", 85, 9 60 220 9, tab 1
n1449=  tab "Colors", 4
n1450=  box "Preview Area", 10, 2 16 263 31, tab 4
n1451=  text "Header [hd]", 12, 8 52 31 8, tab 4
n1452=  text "Seperator [sep]", 13, 79 52 48 8, tab 4
n1453=  text "Footer [ft]", 14, 150 52 30 8, tab 4
n1454=  radio "Use '/me'", 16, 226 52 38 10, tab 4
n1455=  radio "Use '/say'", 17, 226 61 36 10, tab 4
n1456=  edit "", 18, 7 60 68 10, tab 4 autohs
n1457=  edit "", 19, 78 60 68 10, tab 4 autohs
n1458=  edit "", 20, 149 60 68 10, tab 4 autohs
n1459=  box "", 48, 2 46 219 27, tab 4
n1460=  box "", 49, 223 46 42 27, tab 4
n1461=  edit "", 45, 5 93 257 19, tab 4 multi autohs hsbar
n1462=  check "hide extension if format supported (video player only)", 51, 4 116 143 10, tab 4
n1463=  check "remove underscores", 52, 194 116 61 10, tab 4
n1464=  box "Advanced", 50, 2 74 263 40, tab 4
n1465=  box "", 15, 2 112 263 15, tab 4
n1466=  combo 56, 92 130 96 56, tab 4 sort size edit drop
n1467=  button "save theme", 60, 227 130 37 11, tab 4
n1468=  text "Progressbar-Chars:", 59, 3 132 48 8, tab 4
n1469=  edit "|", 57, 51 130 19 10, tab 4 autohs
n1470=  edit "-", 58, 70 130 19 10, tab 4 autohs
n1471=  box "", 61, 2 125 89 17, tab 4
n1472=  button "load theme", 62, 189 130 37 11, tab 4
n1473=  combo 44, 5 82 257 54, tab 4 size drop
n1474=  tab "About", 115
n1475=  text "GTSdll by GTS", 21, 7 20 65 8, tab 115
n1476=  text v0.0.0.0, 22, 7 29 68 8, tab 115
n1477=  link "", 42, 7 39 99 8, tab 115
n1478=  link "http://www.gts-stuff.com", 41, 7 48 99 8, tab 115
n1479=  box "", 37, 5 115 150 24, tab 115
n1480=  ;text "newest Version:", 39, 7 120 71 8, tab 115
n1481=  button "check for updates", 38, 7 122 71 15, tab 115
n1482=  ;button "Update", 55, 80 129 71 8, tab 115
n1483=  ;text "click on 'check for updates'...", 40, 80 121 71 8, tab 115
n1484=  button "Join #gtsdll@irc.rizon.net", 24, 183 130 81 9, tab 115
n1485=  box "", 31, 182 15 81 111, tab 115
n1486=  text "/vid", 30, 188 94 25 8, tab 115
n1487=  text "/vdinfo", 72, 188 86 25 8, tab 115
n1488=  text "/gtsdllinfo", 29, 188 78 25 8, tab 115
n1489=  text "/grinfo", 75, 188 70 25 8, tab 115
n1490=  text "/eminfo", 70, 188 62 25 8, tab 115
n1491=  text "/dcinfo", 28, 188 54 25 8, tab 115
n1492=  text "/bttotals", 11, 188 46 25 8, tab 115
n1493=  text "/btinfo", 26, 188 38 25 8, tab 115
n1494=  text "/aud", 53, 188 30 25 8, tab 115
n1495=  text "Commands:", 25, 187 21 33 8, tab 115
n1496=  text "counter:", 27, 227 21 25 8, tab 115
n1497=  text "0", 54, 228 30 30 8, tab 115
n1498=  text "0", 32, 228 38 30 8, tab 115
n1499=  text "0", 67, 228 46 30 8, tab 115
n1500=  text "0", 33, 228 54 30 8, tab 115
n1501=  text "0", 71, 228 62 30 8, tab 115
n1502=  text "0", 76, 228 70 30 8, tab 115
n1503=  text "0", 34, 228 78 30 8, tab 115
n1504=  text "0", 73, 228 86 30 8, tab 115
n1505=  text "0", 35, 228 94 30 8, tab 115
n1506=  box "Connection", 77, 5 91 150 25, tab 115
n1507=  text "NOTE: Do NOT change this unless you know what your doing!", 78, 6 84 165 8, tab 115
n1508=  edit "", 79, 23 101 88 10, tab 115 autohs
n1509=  edit "", 80, 130 101 22 10, tab 115
n1510=  text "Port:", 81, 114 102 14 8, tab 115
n1511=  text "Site:", 82, 8 102 15 8, tab 115
n1512=  box "Azureus Options", 86, 5 61 168 19, tab 115
n1513=  text "Port:", 87, 9 69 27 8, tab 115
n1514=  edit "", 88, 38 68 31 10, tab 115
n1515=  text "IP:", 89, 74 69 25 8, tab 115
n1516=  edit "", 90, 105 68 65 10, tab 115
n1517=  button "&Ok", 2, 185 149 37 12, ok
n1518=  button "&Cancel", 3, 226 149 37 12, cancel
n1519=  button "Help", 43, 3 149 37 12
n1520=}
n1521=
n1522=;#########################################################
n1523=;## Dialog Handling START                               ##
n1524=;#########################################################
n1525=alias GTSDllSettings {
n1526=  dialog -m gtsdll_settings gtsdll_settings
n1527=  if ($1 == about) { did -f gtsdll_settings 115 }
n1528=  did -o gtsdll_settings 6 1 $hget(GTSDll_settings,DCPlusPlusFolder)
n1529=  did -o gtsdll_settings 46 1 $hget(GTSDll_settings,WAFolder)
n1530=  did -o gtsdll_settings 63 1 $hget(GTSDll_settings,bt_config_file)
n1531=  did -o gtsdll_settings 68 1 $hget(GTSDll_settings,EMuleFolder)
n1532=  if ($hget(GTSDll_settings,UsePopups)) did -c gtsdll_settings 8
n1533=  if ($hget(GTSDll_settings,UseDynamicPopups)) did -c gtsdll_settings 74
n1534=  if ($did(gtsdll_settings,8).state) { did -e gtsdll_settings 74 }
n1535=  else { did -b gtsdll_settings 74 }
n1536=  if ($hget(GTSDll_settings,au_checkonstart)) {
n1537=    did -c gtsdll_settings 5
n1538=    did -e gtsdll_settings 83
n1539=    did -e gtsdll_settings 84
n1540=  }
n1541=  else {
n1542=    did -b gtsdll_settings 83
n1543=    did -b gtsdll_settings 84
n1544=  }
n1545=  if ($hget(GTSDll_settings,au_ask_user)) { did -c gtsdll_settings 84 }
n1546=  else { did -c gtsdll_settings 83 }
n1547=  if ($hget(GTSDll_settings,bt_use_az) == 1) {
n1548=    did -c gtsdll_settings 85
n1549=    ;#########################################
n1550=    ; if is azu selected disale boxes
n1551=    ;#########################################
n1552=    did -b gtsdll_settings 63
n1553=    did -b gtsdll_settings 64
n1554=    ;################################
n1555=    ; end
n1556=    ;################################
n1557=  }
n1558=  else {
n1559=    did -e gtsdll_settings 63
n1560=    did -e gtsdll_settings 64
n1561=  }
n1562=  did -o gtsdll_settings 88 1 $hget(GTSDll_settings,az_port)
n1563=  did -o gtsdll_settings 90 1 $hget(GTSDll_settings,az_ip)
n1564=  did -o gtsdll_settings 18 1 $hget(GTSDll_settings,cl_header)
n1565=  did -o gtsdll_settings 19 1 $hget(GTSDll_settings,cl_seperator)
n1566=  did -o gtsdll_settings 20 1 $hget(GTSDll_settings,cl_footer)
n1567=  did -a gtsdll_settings 44 BitTorrent
n1568=  did -a gtsdll_settings 44 BitTorrent Totals
n1569=  did -a gtsdll_settings 44 DC++
n1570=  did -a gtsdll_settings 44 eMule
n1571=  did -a gtsdll_settings 44 GetRight
n1572=  did -a gtsdll_settings 44 Video Player
n1573=  did -a gtsdll_settings 44 VirtualDub Encoding Status
n1574=  did -a gtsdll_settings 44 Audio Player
n1575=  did -a gtsdll_settings 44 DCC
n1576=  did -a gtsdll_settings 44 DCC Totals
n1577=  did -c gtsdll_settings 44 1
n1578=  ;  did -b gtsdll_settings 55
n1579=  did -o gtsdll_settings 56 0 >[select theme]<
n1580=  did -o gtsdll_settings 57 1 $hget(GTSDll_settings,cl_bar_char1)
n1581=  did -o gtsdll_settings 58 1 $hget(GTSDll_settings,cl_bar_char2)
n1582=  did -a gtsdll_settings 79 $hget(GTSDll_settings,Site)
n1583=  did -a gtsdll_settings 80 $hget(GTSDll_settings,Port)
n1584=  var %i1 $findfile(" $+ $scriptdir $+ GTSdll-themes,*.cfg,0)
n1585=  var %i0 0
n1586=  while (%i0 < %i1) {
n1587=    inc %i0
n1588=    set -u0 %gtsdll_tfile $left($gettok($findfile(" $+ $scriptdir $+ GTSdll-themes $+ ",*.cfg,%i0),-1,92),-4)
n1589=    did -a gtsdll_settings 56 %gtsdll_tfile
n1590=  }
n1591=  set %gts_cl_bt_n $hget(GTSDll_settings,cl_btinfo)
n1592=  did -ra gtsdll_settings 45 %gts_cl_bt_n
n1593=  set %gts_cl_bt_totals  $hget(GTSDll_settings,cl_bt_totals)
n1594=  set %gts_cl_video $hget(GTSDll_settings,cl_video)
n1595=  set %gts_cl_dcplusplus $hget(GTSDll_settings,cl_dcplusplus)
n1596=  set %gts_cl_header $hget(GTSDll_settings,cl_header)
n1597=  set %gts_cl_seperator $hget(GTSDll_settings,cl_seperator)
n1598=  set %gts_cl_footer $hget(GTSDll_settings,cl_footer)
n1599=  set %gts_cl_no_ext $hget(GTSDll_settings,cl_no_ext)
n1600=  set %gts_cl_no_uc $hget(GTSDll_settings,cl_no_uc)
n1601=  set %gts_cl_audpl_id3present $hget(GTSDll_settings,cl_audpl_id3present)
n1602=  set %gts_cl_emule $hget(GTSDll_settings,cl_emule)
n1603=  set %gts_cl_grinfo $hget(GTSDll_settings,cl_grinfo)
n1604=  set %gts_cl_vdinfo $hget(GTSDll_settings,cl_vdinfo)
n1605=  set %gts_cl_dcc $hget(GTSDll_settings,cl_dcc)
n1606=  set %gts_cl_dcctotals $hget(GTSDll_settings,cl_dcctotals)
n1607=  set %gts_cl_bar_char1 $hget(GTSDll_settings,cl_bar_char1)
n1608=  set %gts_cl_bar_char2 $hget(GTSDll_settings,cl_bar_char2)
n1609=  if ($hget(GTSDll_settings,cl_no_ext)) did -c gtsdll_settings 51
n1610=  if ($hget(GTSDll_settings,cl_no_uc)) did -c gtsdll_settings 52
n1611=  if ($hget(GTSDll_settings,cl_mode) == me) {
n1612=    did -c gtsdll_settings 16
n1613=  }
n1614=  else {
n1615=    did -c gtsdll_settings 17
n1616=  }
n1617=  did -o gtsdll_settings 22 1 v $+ $gtsdllver(fullver)
n1618=  did -o gtsdll_settings 32 1 $hget(GTSDll_settings,cnt_btinfo)
n1619=  did -o gtsdll_settings 67 1 $hget(GTSDll_settings,cnt_bttotals)
n1620=  did -o gtsdll_settings 33 1 $hget(GTSDll_settings,cnt_dcinfo)
n1621=  did -o gtsdll_settings 34 1 $hget(GTSDll_settings,cnt_ad)
n1622=  did -o gtsdll_settings 35 1 $hget(GTSDll_settings,cnt_video)
n1623=  did -o gtsdll_settings 54 1 $hget(GTSDll_settings,cnt_audplay)
n1624=  did -o gtsdll_settings 71 1 $hget(GTSDll_settings,cnt_eminfo)
n1625=  did -o gtsdll_settings 76 1 $hget(GTSDll_settings,cnt_grinfo)
n1626=  did -o gtsdll_settings 73 1 $hget(GTSDll_settings,cnt_vdinfo)
n1627=
n1628=  if (($os == 95) || ($os == 98) || ($os == ME)) {
n1629=    did -o gtsdll_settings 6 1
n1630=    did -o gtsdll_settings 63 1
n1631=    did -b gtsdll_settings 6
n1632=    did -b gtsdll_settings 63
n1633=    did -b gtsdll_settings 36
n1634=    did -b gtsdll_settings 64
n1635=    did -v gtsdll_settings 66
n1636=  }
n1637=  GTSDll.ShowPreview enable
n1638=  dll " $+ $scriptdir $+ gtsmirc.dll" DockPreviewWindow 10 $+ $chr(1) $+ $window(@GTSdll_ShowPreview).hwnd
n1639=  dialog -v gtsdll_settings
n1640=  GTSDll.ShowPreview refresh
n1641=}
n1642=
n1643=alias -l GTSDll.ShowPreview {
n1644=  if ($1 == enable) {
n1645=    window -c @GTSdll_ShowPreview
n1646=    window -hk0do +dL @GTSdll_ShowPreview 0 0 0 0
n1647=  }
n1648=  if ($1 == refresh) {
n1649=    var %sel $did(gtsdll_settings,44,1).sel
n1650=    if (%sel == 1) var %message $FormatMessage(cl_btBTInfo1Big_test_file_for_GTSDll.avi0 min 12 sec / allocating0 kB/s0.00 MiB0 kB/s0.00 MiB7%Seeding002912.160.550 :-|n/an/aClient v0.00)
n1651=    if (%sel == 2) { set %gts_bt_totalsonly 1 | var %message $FormatMessage(cl_btBTInfodone3) | unset %gts_bt_totalsonly }
n1652=    if (%sel == 3) var %message $FormatMessage(cl_dcplusplusDC++0.18Slots: 0/3D: 379 MBU: 226 MBD: 15 kB/s (2) $+ U: 12 B/s (3))
n1653=    if (%sel == 4) var %message $FormatMessage(cl_emuleEMuleRazorback195.245.244.243:46610.0KB/s0.0KB/s017.6GB7.97GB)
n1654=    if (%sel == 5) {
n1655=      var %message $FormatMessage(cl_grinfoGRInfo1Big_test_file_for_gtsdll.zip58%81.90MB140.72MB0:15:2365.2KB/shttp://localhost/Big_test_file_for_gtsdll.zip)
n1656=      clear @GTSdll_ShowPreview
n1657=      SendMsg %message $+ $chr(1) $+ btinfo $+ $chr(1) $+ -ec @GTSdll_ShowPreview
n1658=      var %message $FormatMessage(cl_grinfoGRInfodone2)
n1659=      SendMsg %message $+ $chr(1) $+ btinfo $+ $chr(1) $+ -ec @GTSdll_ShowPreview
n1660=      var %message $null
n1661=    }
n1662=    if (%sel == 6) var %message $FormatMessage(cl_videoVIDAVIBig_test_file_for_GTSDll.avi00:0233:22242155520640x48023,9761209470DIVXNUL)
n1663=    if (%sel == 7) var %message $FormatMessage(cl_vdinfoVDInfoBig_test_file_for_GTSdll.avi60011113252104338196810175.9MB72KB/s49.1MB53.0%424.66MB13.0 fps1:19:572:30:53)
n1664=    if (%sel == 8) var %message $FormatMessage(cl_audplWA2ID3another_testfile_for_gtsdll.mp300:0900:361663199320 kbpsStereo147456025ArtistTitleAlbum2002CommentGenre1mp3n/an/an/aLayer IIIMPEG 144KHzNoneFhGD:\MP3\Artist\Title\)
n1665=    if (%sel == 9) {
n1666=      clear @GTSdll_ShowPreview
n1667=      var %message $FormatMessage(cl_dccGetphaze-Gentoo.iso15 MB1 MBno sent45%14 Kb/s15 Minutes40 Minutes1Network/Server)
n1668=      if (%message != $null) SendMsg %message $+ $chr(1) $+ dccinfo $+ $chr(1) $+ -ec @GTSdll_ShowPreview
n1669=      var %message $FormatMessage(cl_dccSendphaze-Gentoo.iso15 MBno rcvd1 MB45%14 Kb/s15 Minutes40 Minutes1Network/Server)
n1670=      if (%message != $null) SendMsg %message $+ $chr(1) $+ dccinfo $+ $chr(1) $+ -ec @GTSdll_ShowPreview
n1671=      unset %message
n1672=    }
n1673=    if (%sel == 10) var %message $FormatMessage(cl_dcctotalsGet21.42 Mb/s)
n1674=    if (%message != $null) { clear @GTSdll_ShowPreview | SendMsg %message $+ $chr(1) $+ btinfo $+ $chr(1) $+ -ec @GTSdll_ShowPreview }
n1675=  }
n1676=  if ($1 == disable) window -c @GTSdll_ShowPreview
n1677=}
n1678=
n1679=on 1:DIALOG:gtsdll_settings:sclick:2: {
n1680=  ;OK BUTTON
n1681=  unset %gts_cl_bt_n
n1682=  unset %gts_cl_bt_totals
n1683=  unset %gts_cl_video
n1684=  unset %gts_cl_emule
n1685=  unset %gts_cl_grinfo
n1686=  unset %gts_cl_vdinfo
n1687=  unset %gts_cl_dcplusplus
n1688=  unset %gts_cl_header
n1689=  unset %gts_cl_seperator
n1690=  unset %gts_cl_footer
n1691=  unset %gts_cl_no_ext
n1692=  unset %gts_cl_no_uc
n1693=  unset %gts_cl_audpl_id3present
n1694=  unset %gts_cl_bar_char1
n1695=  unset %gts_cl_bar_char2
n1696=  unset %gts_cl_dcc
n1697=  unset %gts_cl_dcctotals
n1698=  .hadd GTSDll_settings DCPlusPlusFolder $did(gtsdll_settings,6).text
n1699=  .hadd GTSDll_settings WAFolder $did(gtsdll_settings,46).text
n1700=  .hadd GTSDll_settings bt_config_file $did(gtsdll_settings,63).text
n1701=  .hadd GTSDll_settings EMuleFolder $did(gtsdll_settings,68).text
n1702=  .hadd GTSDll_settings Site $did(gtsdll_settings,79)
n1703=  .hadd GTSDll_settings Port $did(gtsdll_settings,80)
n1704=  if ($did(gtsdll_settings,8).state) {
n1705=    .hadd GTSDll_settings UsePopups $true
n1706=  }
n1707=  else {
n1708=    .hadd GTSDll_settings UsePopups $false
n1709=  }
n1710=  if ($did(gtsdll_settings,74).state) {
n1711=    .hadd GTSDll_settings UseDynamicPopups $true
n1712=  }
n1713=  else {
n1714=    .hadd GTSDll_settings UseDynamicPopups $false
n1715=  }
n1716=  if ($did(gtsdll_settings,5).state) {
n1717=    .hadd GTSDll_settings au_checkonstart $true
n1718=  }
n1719=  else {
n1720=    .hadd GTSDll_settings au_checkonstart $false
n1721=  }
n1722=  if ($did(gtsdll_settings,83).state) {
n1723=    .hadd GTSDll_settings au_ask_user $false
n1724=  }
n1725=  if ($did(gtsdll_settings,84).state) {
n1726=    .hadd GTSDll_settings au_ask_user $true
n1727=  }
n1728=  if ($did(gtsdll_settings,85).state) {
n1729=    .hadd GTSDll_settings bt_use_az 1
n1730=  }
n1731=  else {
n1732=    .hadd GTSDll_settings bt_use_az 0
n1733=  }
n1734=  var %txt $did(gtsdll_settings,88).text
n1735=  if (%txt != $null) if (%txt !isnum 1-65536) var %txt 6884
n1736=  .hadd GTSDll_settings az_port %txt
n1737=  .hadd GTSDll_settings az_ip $did(gtsdll_settings,90).text
n1738=  .hadd GTSDll_settings cl_header $did(gtsdll_settings,18).text
n1739=  .hadd GTSDll_settings cl_seperator $did(gtsdll_settings,19).text
n1740=  .hadd GTSDll_settings cl_footer $did(gtsdll_settings,20).text
n1741=  if ($did(gtsdll_settings,16).state) {
n1742=    .hadd GTSDll_settings cl_mode me
n1743=  }
n1744=  else {
n1745=    .hadd GTSDll_settings cl_mode say
n1746=  }
n1747=  .hsave -o GTSDll_settings " $+ $scriptdir $+ gtsdll.cfg"
n1748=  if ($hget(GTSDll_settings,UsePopups) == $false) { .disable #GTSDLL.PopUp }
n1749=  else { .enable #GTSDLL.PopUp }
n1750=  GTSDll.ShowPreview disable
n1751=}
n1752=on 1:DIALOG:gtsdll_settings:sclick:3: {
n1753=  .hadd GTSDll_settings cl_btinfo %gts_cl_bt_n
n1754=  .hadd GTSDll_settings cl_bt_totals %gts_cl_bt_totals
n1755=  .hadd GTSDll_settings cl_video %gts_cl_video
n1756=  .hadd GTSDll_settings cl_emule %gts_cl_emule
n1757=  .hadd GTSDll_settings cl_grinfo %gts_cl_grinfo
n1758=  .hadd GTSDll_settings cl_vdinfo %gts_cl_vdinfo
n1759=  .hadd GTSDll_settings cl_dcplusplus %gts_cl_dcplusplus
n1760=  .hadd GTSDll_settings cl_header %gts_cl_header
n1761=  .hadd GTSDll_settings cl_seperator %gts_cl_seperator
n1762=  .hadd GTSDll_settings cl_footer %gts_cl_footer
n1763=  .hadd GTSDll_settings cl_no_ext %gts_cl_no_ext
n1764=  .hadd GTSDll_settings cl_no_uc %gts_cl_no_uc
n1765=  .hadd GTSDll_settings cl_dcc %gts_cl_dcc
n1766=  .hadd GTSDll_settings cl_dcctotals %gts_cl_dcctotals
n1767=  .hadd GTSDll_settings cl_audpl_id3present %gts_cl_audpl_id3present
n1768=  .hadd GTSDll_settings cl_bar_char1 %gts_cl_bar_char1
n1769=  .hadd GTSDll_settings cl_bar_char2 %gts_cl_bar_char2
n1770=
n1771=  unset %gts_cl_bt_n
n1772=  unset %gts_cl_bt_totals
n1773=  unset %gts_cl_video
n1774=  unset %gts_cl_emule
n1775=  unset %gts_cl_grinfo
n1776=  unset %gts_cl_vdinfo
n1777=  unset %gts_cl_dcplusplus
n1778=  unset %gts_cl_audpl_id3present
n1779=  unset %gts_cl_bar_char1
n1780=  unset %gts_cl_bar_char2
n1781=  unset %gts_cl_dcc
n1782=  unset %gts_cl_dcctotals
n1783=
n1784=  unset %gts_cl_header
n1785=  unset %gts_cl_seperator
n1786=  unset %gts_cl_footer
n1787=  unset %gts_cl_no_ext
n1788=  unset %gts_cl_no_uc
n1789=  GTSDll.ShowPreview disable
n1790=}
n1791=
n1792=on 1:DIALOG:gtsdll_settings:sclick:8: {
n1793=  if ($did(gtsdll_settings,8).state) { did -e gtsdll_settings 74 }
n1794=  else { did -b gtsdll_settings 74 }
n1795=}
n1796=;########################################################
n1797=; Enable Azu and disable browse button and edit
n1798=;########################################################
n1799=on 1:DIALOG:gtsdll_settings:sclick:85: {
n1800=  if ($did(gtsdll_settings,85).state) {
n1801=    did -br gtsdll_settings 63
n1802=    did -b gtsdll_settings 64
n1803=  }
n1804=  else {
n1805=    did -e gtsdll_settings 63
n1806=    did -e gtsdll_settings 64
n1807=  }
n1808=}
n1809=;########################################################
n1810=; End of azu enable/disable settings
n1811=;########################################################
n1812=on 1:DIALOG:gtsdll_settings:edit:18: {
n1813=  .hadd GTSDll_settings cl_header $did(gtsdll_settings,18).text
n1814=  GTSDll.ShowPreview refresh
n1815=}
n1816=on 1:DIALOG:gtsdll_settings:edit:19: {
n1817=  .hadd GTSDll_settings cl_seperator $did(gtsdll_settings,19).text
n1818=  GTSDll.ShowPreview refresh
n1819=}
n1820=on 1:DIALOG:gtsdll_settings:edit:20: {
n1821=  .hadd GTSDll_settings cl_footer $did(gtsdll_settings,20).text
n1822=  GTSDll.ShowPreview refresh
n1823=}
n1824=on 1:DIALOG:gtsdll_settings:sclick:24: {
n1825=  var %totalservers $scid(0)
n1826=  var %scounter 0
n1827=  var %tppl 0
n1828=  :lp1
n1829=  inc %scounter
n1830=  if ($scid(%scounter) == $null) {
n1831=    inc %totalservers
n1832=    goto lp1
n1833=  }
n1834=  if (rizon isin $scid(%scounter).server) {
n1835=    scid %scounter
n1836=    join #gtsdll
n1837=    var %joinedgtsdll 1
n1838=  }
n1839=  if (%scounter >= %totalservers) goto nt2
n1840=  goto lp1
n1841=  :nt2
n1842=  scid -r
n1843=  if (%joinedgtsdll != 1) { server -m irc.rizon.net -i $nick $anick $email $nick -j #gtsdll }
n1844=}
n1845=on 1:DIALOG:gtsdll_settings:sclick:36: { did -o gtsdll_settings 6 1 $sdir(D:\,Please Select your DC++ Folder (If installed)) }
n1846=on 1:DIALOG:gtsdll_settings:sclick:38: {
n1847=  if ($did(gtsdll_settings,38).text == check for updates) {
n1848=    ;first update the hash table
n1849=    .hadd GTSDll_settings Site $did(gtsdll_settings,79)
n1850=    .hadd GTSDll_settings Port $did(gtsdll_settings,80)
n1851=    ;use the site and port from the hashtable
n1852=    checkupd
n1853=  }
n1854=  else {
n1855=    .run http://update.gts-stuff.com/changes.txt
n1856=  }
n1857=}
n1858=on 1:DIALOG:gtsdll_settings:sclick:41: { .run http://www.gts-stuff.com/ }
n1859=
n1860=on 1:DIALOG:gtsdll_settings:sclick:43: { .run "http://www.gts-stuff.com/index.php/board,7.0.html" }
n1861=on 1:DIALOG:gtsdll_settings:sclick:44: {
n1862=  var %sel $did(gtsdll_settings,44,1).sel
n1863=  if (%sel == 1) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_btinfo)
n1864=  if (%sel == 2) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_bt_totals)
n1865=  if (%sel == 3) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_dcplusplus)
n1866=  if (%sel == 4) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_emule)
n1867=  if (%sel == 5) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_grinfo)
n1868=  if (%sel == 6) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_video)
n1869=  if (%sel == 7) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_vdinfo)
n1870=  if (%sel == 8) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_audpl_id3present)
n1871=  if (%sel == 9) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_dcc)
n1872=  if (%sel == 10) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_dcctotals)
n1873=  GTSDll.ShowPreview refresh
n1874=}
n1875=on 1:DIALOG:gtsdll_settings:edit:45: {
n1876=  var %sel $did(gtsdll_settings,44,1).sel
n1877=  if (%sel == 1) .hadd GTSDll_settings cl_btinfo $did(gtsdll_settings,45).text
n1878=  if (%sel == 2) .hadd GTSDll_settings cl_bt_totals $did(gtsdll_settings,45).text
n1879=  if (%sel == 3) .hadd GTSDll_settings cl_dcplusplus $did(gtsdll_settings,45).text
n1880=  if (%sel == 4) .hadd GTSDll_settings cl_emule $did(gtsdll_settings,45).text
n1881=  if (%sel == 5) .hadd GTSDll_settings cl_grinfo $did(gtsdll_settings,45).text
n1882=  if (%sel == 6) .hadd GTSDll_settings cl_video $did(gtsdll_settings,45).text
n1883=  if (%sel == 7) .hadd GTSDll_settings cl_vdinfo $did(gtsdll_settings,45).text
n1884=  if (%sel == 8) .hadd GTSDll_settings cl_audpl_id3present $did(gtsdll_settings,45).text
n1885=  if (%sel == 9) .hadd GTSDll_settings cl_dcc $did(gtsdll_settings,45).text
n1886=  if (%sel == 10) .hadd GTSDll_settings cl_dcctotals $did(gtsdll_settings,45).text
n1887=  GTSDll.ShowPreview refresh
n1888=}
n1889=on 1:DIALOG:gtsdll_settings:sclick:47: { did -o gtsdll_settings 46 1 $sdir(D:\,Please Select your WinAmp Folder (If installed)) }
n1890=on 1:DIALOG:gtsdll_settings:sclick:51: {
n1891=  if ($did(gtsdll_settings,51).state) {
n1892=    .hadd GTSDll_settings cl_no_ext $true
n1893=  }
n1894=  else {
n1895=    .hadd GTSDll_settings cl_no_ext $false
n1896=  }
n1897=  GTSDll.ShowPreview refresh
n1898=}
n1899=on 1:DIALOG:gtsdll_settings:sclick:52: {
n1900=  if ($did(gtsdll_settings,52).state) {
n1901=    .hadd GTSDll_settings cl_no_uc $true
n1902=  }
n1903=  else {
n1904=    .hadd GTSDll_settings cl_no_uc $false
n1905=  }
n1906=  GTSDll.ShowPreview refresh
n1907=}
n1908=on 1:DIALOG:gtsdll_settings:sclick:62: {
n1909=  ;#########################################################
n1910=  ;## Load Theme                                          ##
n1911=  ;#########################################################
n1912=  if ($exists(" $+ $scriptdir $+ GTSdll-themes\ $+ $did(gtsdll_settings,56,$did(gtsdll_settings,56,1).sel).text $+ .cfg")) {
n1913=    .hload GTSDll_settings " $+ $scriptdir $+ GTSdll-themes\ $+ $did(gtsdll_settings,56,$did(gtsdll_settings,56,1).sel).text $+ .cfg"
n1914=    did -o gtsdll_settings 18 1 $hget(GTSDll_settings,cl_header)
n1915=    did -o gtsdll_settings 19 1 $hget(GTSDll_settings,cl_seperator)
n1916=    did -o gtsdll_settings 20 1 $hget(GTSDll_settings,cl_footer)
n1917=    did -o gtsdll_settings 57 1 $hget(GTSDll_settings,cl_bar_char1)
n1918=    did -o gtsdll_settings 58 1 $hget(GTSDll_settings,cl_bar_char2)
n1919=
n1920=    if ($hget(GTSDll_settings,cl_no_ext)) { did -c gtsdll_settings 51 }
n1921=    else { did -u gtsdll_settings 51 }
n1922=    if ($hget(GTSDll_settings,cl_no_uc)) { did -c gtsdll_settings 52 }
n1923=    else { did -u gtsdll_settings 52 }
n1924=    if ($hget(GTSDll_settings,cl_mode) == me) {
n1925=      did -c gtsdll_settings 16
n1926=      did -u gtsdll_settings 17
n1927=    }
n1928=    else {
n1929=      did -u gtsdll_settings 16
n1930=      did -c gtsdll_settings 17
n1931=    }
n1932=    var %sel $did(gtsdll_settings,44,1).sel
n1933=    if (%sel == 1) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_btinfo)
n1934=    if (%sel == 2) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_bt_totals)
n1935=    if (%sel == 3) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_dcplusplus)
n1936=    if (%sel == 4) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_emule)
n1937=    if (%sel == 5) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_grinfo)
n1938=    if (%sel == 6) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_video)
n1939=    if (%sel == 7) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_vdinfo)
n1940=    if (%sel == 8) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_audpl_id3present)
n1941=    if (%sel == 9) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_dcc)
n1942=    if (%sel == 10) did -ra gtsdll_settings 45 $hget(GTSDll_settings,cl_dcctotals)
n1943=    GTSDll.ShowPreview refresh
n1944=  }
n1945=  else { var %dummy $input(Theme ' $+ $did(gtsdll_settings,56,0) $+ ' not found.,ido,Error) }
n1946=
n1947=}
n1948=on 1:DIALOG:gtsdll_settings:edit:57: {
n1949=  .hadd GTSDll_settings cl_bar_char1 $did(gtsdll_settings,57).text
n1950=  GTSDll.ShowPreview refresh
n1951=}
n1952=on 1:DIALOG:gtsdll_settings:edit:58: {
n1953=  .hadd GTSDll_settings cl_bar_char2 $did(gtsdll_settings,58).text
n1954=  GTSDll.ShowPreview refresh
n1955=}
n1956=on 1:DIALOG:gtsdll_settings:sclick:64: { did -o gtsdll_settings 63 1 $sfile(" $+ $scriptdir $+ config\",Please select a configuration file...) }
n1957=;#########################################################
n1958=;## Save Theme function                                 ##
n1959=;#########################################################
n1960=
n1961=alias -l SaveTheme {
n1962=  if (($pos($1-,\)) || ($pos($1-,/)) || ($pos($1-,:)) || ($pos($1-,*)) || ($pos($1-,?)) || ($pos($1-,")) || ($pos($1-,<)) || ($pos($1-,>)) || ($pos($1-,$chr(124)))) {
n1963=    var %dummy $input(Because of filename limitations you cannot use the following characters inside theme-names: $crlf \ / : * ? " < > $chr(124),wdo,Error)
n1964=    return
n1965=  }
n1966=  var %tname $1-
n1967=  var %tfname $scriptdir $+ GTSdll-Themes\ $+ %tname $+ .cfg
n1968=  if ($exists(" $+ %tfname $+ ")) {
n1969=    if ($?!="Overwrite existing theme? " != $true) { return }
n1970=  }
n1971=  write -c " $+ $(%tfname) $+ " cl_audpl_id3present
n1972=  var %f write -a " $+ $(%tfname) $+ "
n1973=  %f $iif($hget(GTSDll_settings,cl_audpl_id3present),$hget(GTSDll_settings,cl_audpl_id3present),$crlf)
n1974=  %f cl_bar_char1
n1975=  %f $iif($hget(GTSDll_settings,cl_bar_char1),$hget(GTSDll_settings,cl_bar_char1),$crlf)
n1976=  %f cl_bar_char2
n1977=  %f $iif($hget(GTSDll_settings,cl_bar_char2),$hget(GTSDll_settings,cl_bar_char2),$crlf)
n1978=  %f cl_video
n1979=  %f $iif($hget(GTSDll_settings,cl_video),$hget(GTSDll_settings,cl_video),$crlf)
n1980=  %f cl_emule
n1981=  %f $iif($hget(GTSDll_settings,cl_emule),$hget(GTSDll_settings,cl_emule),$crlf)
n1982=  %f cl_grinfo
n1983=  %f $iif($hget(GTSDll_settings,cl_grinfo),$hget(GTSDll_settings,cl_grinfo),$crlf)
n1984=  %f cl_vdinfo
n1985=  %f $iif($hget(GTSDll_settings,cl_vdinfo),$hget(GTSDll_settings,cl_vdinfo),$crlf)
n1986=  %f cl_btinfo
n1987=  %f $iif($hget(GTSDll_settings,cl_btinfo),$hget(GTSDll_settings,cl_btinfo),$crlf)
n1988=  %f cl_bt_totals
n1989=  %f $iif($hget(GTSDll_settings,cl_bt_totals),$hget(GTSDll_settings,cl_bt_totals),$crlf)
n1990=  %f cl_dcplusplus
n1991=  %f $iif($hget(GTSDll_settings,cl_dcplusplus),$hget(GTSDll_settings,cl_dcplusplus),$crlf)
n1992=  %f cl_header
n1993=  %f $iif($hget(GTSDll_settings,cl_header),$hget(GTSDll_settings,cl_header),$crlf)
n1994=  %f cl_seperator
n1995=  %f $iif($hget(GTSDll_settings,cl_seperator),$hget(GTSDll_settings,cl_seperator),$crlf)
n1996=  %f cl_footer
n1997=  %f $iif($hget(GTSDll_settings,cl_footer),$hget(GTSDll_settings,cl_footer),$crlf)
n1998=  %f cl_no_ext
n1999=  %f $iif($hget(GTSDll_settings,cl_no_ext),$hget(GTSDll_settings,cl_no_ext),$crlf)
n2000=  %f cl_no_uc
n2001=  %f $iif($hget(GTSDll_settings,cl_no_uc),$hget(GTSDll_settings,cl_no_uc),$crlf)
n2002=  %f cl_mode
n2003=  %f $iif($hget(GTSDll_settings,cl_mode),$hget(GTSDll_settings,cl_mode),$crlf)
n2004=  %f cl_dcc
n2005=  %f $iif($hget(GTSDll_settings,cl_dcc),$hget(GTSDll_settings,cl_dcc),$crlf)
n2006=  %f cl_dcctotals
n2007=  %f $iif($hget(GTSDll_settings,cl_dcctotals),$hget(GTSDll_settings,cl_dcctotals),$crlf)
n2008=  return $true
n2009=}
n2010=;#########################################################
n2011=;## Save Theme Button                                   ##
n2012=;#########################################################
n2013=on 1:DIALOG:gtsdll_settings:sclick:60: {
n2014=  if ($SaveTheme($did(gtsdll_settings,56,0)) == $true) {
n2015=    if ($didwm(gtsdll_settings,56,$did(gtsdll_settings,56,0)) == 0) {
n2016=      did -a gtsdll_settings 56 $did(gtsdll_settings,56,0)
n2017=    }
n2018=  }
n2019=}
n2020=on 1:DIALOG:gtsdll_settings:sclick:69: { did -o gtsdll_settings 68 1 $sdir(D:\,Please select your eMule Folder) }
n2021=
n2022=on 1:DIALOG:gtsdll_settings:sclick:5: {
n2023=  if ($did(gtsdll_settings,5).state) {
n2024=    did -e gtsdll_settings 83
n2025=    did -e gtsdll_settings 84
n2026=  }
n2027=  else {
n2028=    did -b gtsdll_settings 83
n2029=    did -b gtsdll_settings 84
n2030=  }
n2031=}
n2032=on 1:DIALOG:gtsdll_settings:sclick:83: {
n2033=  if ($did(gtsdll_settings,83).state) { did -u gtsdll_settings 84 }
n2034=  else { did -c gtsdll_settings 84 }
n2035=}
n2036=on 1:DIALOG:gtsdll_settings:sclick:84: {
n2037=  if ($did(gtsdll_settings,84).state) { did -u gtsdll_settings 83 }
n2038=  else { did -c gtsdll_settings 83 }
n2039=}
n2040=
n2041=;#########################################################
n2042=;## Sync Configuration ...                              ##
n2043=;#########################################################
n2044=dialog -l sync_configure {
n2045=  title "Configure VIDSync and WASync"
n2046=  size -1 -1 166 138
n2047=  option dbu
n2048=  box "VIDSync", 3, 2 1 80 121
n2049=  box "WASync", 1, 85 1 80 121
n2050=  check "Enabled", 2, 6 8 50 10
n2051=  check "Enabled", 4, 90 8 50 10
n2052=  check "Without Limitation", 5, 6 17 63 10
n2053=  check "Without Limitation", 6, 90 17 57 10
n2054=  combo 9, 6 54 71 56, sort size
n2055=  combo 10, 89 54 71 56, sort size
n2056=  button "Add", 11, 6 109 34 9
n2057=  button "Remove", 12, 44 109 34 9
n2058=  button "Add", 13, 89 109 34 9
n2059=  button "Remove", 14, 126 109 34 9
n2060=  check "all except these channels", 15, 6 35 71 10
n2061=  check "all except these channels", 16, 90 35 71 10
n2062=  check "these channels only", 17, 6 44 62 10
n2063=  check "these channels only", 18, 90 44 62 10
n2064=  button "OK", 19, 127 124 37 12, ok cancel
n2065=  text "Limited to ...", 7, 6 27 32 8
n2066=  text "Limited to ...", 20, 90 27 32 8
n2067=}
n2068=
n2069=alias GTSdll.SyncSettings {
n2070=  dialog -m sync_configure sync_configure
n2071=  ;VIDSync ...
n2072=  if ($hget(GTSDll_settings,VID_SYNC_limitation) == none) {
n2073=    did -c sync_configure 5
n2074=  }
n2075=  if ($hget(GTSDll_settings,VID_SYNC_limitation) == all_except) {
n2076=    did -c sync_configure 15
n2077=  }
n2078=  if ($hget(GTSDll_settings,VID_SYNC_limitation) == defined_only) {
n2079=    did -c sync_configure 17
n2080=  }
n2081=  var %x 1
n2082=  while (%x <= $numtok($hget(GTSDll_settings,VID_SYNC_channels),32)) {
n2083=    did -a sync_configure 9 $gettok($hget(GTSDll_settings,VID_SYNC_channels),$(%x),32)
n2084=    inc %x
n2085=  }
n2086=  if ($hget(GTSDll_settings,VID_SYNC) != on) {
n2087=    did -b sync_configure 5
n2088=    did -b sync_configure 7
n2089=    did -b sync_configure 15
n2090=    did -b sync_configure 17
n2091=    did -b sync_configure 9
n2092=    did -b sync_configure 11
n2093=    did -b sync_configure 12
n2094=  }
n2095=  else {
n2096=    did -c sync_configure 2
n2097=    if ($did(sync_configure,5).state) {
n2098=      did -b sync_configure 7
n2099=      did -b sync_configure 15
n2100=      did -b sync_configure 17
n2101=      did -b sync_configure 9
n2102=      did -b sync_configure 11
n2103=      did -b sync_configure 12
n2104=    }
n2105=  }
n2106=  if ((!$did(sync_configure,15).state) && (!$did(sync_configure,17).state)) did -c sync_configure 17
n2107=  ;WASync
n2108=  if ($hget(GTSDll_settings,WA_SYNC_limitation) == none) {
n2109=    did -c sync_configure 6
n2110=  }
n2111=  if ($hget(GTSDll_settings,WA_SYNC_limitation) == all_except) {
n2112=    did -c sync_configure 16
n2113=  }
n2114=  if ($hget(GTSDll_settings,WA_SYNC_limitation) == defined_only) {
n2115=    did -c sync_configure 18
n2116=  }
n2117=  var %x 1
n2118=  while (%x <= $numtok($hget(GTSDll_settings,WA_SYNC_channels),32)) {
n2119=    did -a sync_configure 10 $gettok($hget(GTSDll_settings,WA_SYNC_channels),$(%x),32)
n2120=    inc %x
n2121=  }
n2122=  if ($hget(GTSDll_settings,WA_jump_state) != on) {
n2123=    did -b sync_configure 6
n2124=    did -b sync_configure 20
n2125=    did -b sync_configure 16
n2126=    did -b sync_configure 18
n2127=    did -b sync_configure 10
n2128=    did -b sync_configure 13
n2129=    did -b sync_configure 14
n2130=  }
n2131=  else {
n2132=    did -c sync_configure 4
n2133=    if ($did(sync_configure,6).state) {
n2134=      did -b sync_configure 20
n2135=      did -b sync_configure 16
n2136=      did -b sync_configure 18
n2137=      did -b sync_configure 10
n2138=      did -b sync_configure 13
n2139=      did -b sync_configure 14
n2140=    }
n2141=  }
n2142=  if ((!$did(sync_configure,16).state) && (!$did(sync_configure,18).state)) did -c sync_configure 18
n2143=}
n2144=on 1:DIALOG:sync_configure:sclick:2: {
n2145=  ;Vidsync enabled checkbox
n2146=  if ($did(sync_configure,2).state) {
n2147=    did -e sync_configure 5
n2148=    if (!$did(sync_configure,5).state) {
n2149=      did -e sync_configure 7
n2150=      did -e sync_configure 15
n2151=      did -e sync_configure 17
n2152=      did -e sync_configure 9
n2153=      did -e sync_configure 11
n2154=      did -e sync_configure 12
n2155=    }
n2156=  }
n2157=  else {
n2158=    did -b sync_configure 5
n2159=    did -b sync_configure 7
n2160=    did -b sync_configure 15
n2161=    did -b sync_configure 17
n2162=    did -b sync_configure 9
n2163=    did -b sync_configure 11
n2164=    did -b sync_configure 12
n2165=  }
n2166=}
n2167=
n2168=on 1:DIALOG:sync_configure:sclick:4: {
n2169=  ;WAsync enabled checkbox
n2170=  if ($did(sync_configure,4).state) {
n2171=    did -e sync_configure 6
n2172=    if (!$did(sync_configure,6).state) {
n2173=      did -e sync_configure 20
n2174=      did -e sync_configure 16
n2175=      did -e sync_configure 18
n2176=      did -e sync_configure 10
n2177=      did -e sync_configure 13
n2178=      did -e sync_configure 14
n2179=    }
n2180=  }
n2181=  else {
n2182=    did -b sync_configure 6
n2183=    did -b sync_configure 20
n2184=    did -b sync_configure 16
n2185=    did -b sync_configure 18
n2186=    did -b sync_configure 10
n2187=    did -b sync_configure 13
n2188=    did -b sync_configure 14
n2189=  }
n2190=}
n2191=on 1:DIALOG:sync_configure:sclick:5: {
n2192=  ;Vidsync Without Limitation Checkbox
n2193=  if (!$did(sync_configure,5).state) {
n2194=    did -e sync_configure 7
n2195=    did -e sync_configure 15
n2196=    did -e sync_configure 17
n2197=    did -e sync_configure 9
n2198=    did -e sync_configure 11
n2199=    did -e sync_configure 12
n2200=  }
n2201=  else {
n2202=    did -b sync_configure 7
n2203=    did -b sync_configure 15
n2204=    did -b sync_configure 17
n2205=    did -b sync_configure 9
n2206=    did -b sync_configure 11
n2207=    did -b sync_configure 12
n2208=  }
n2209=}
n2210=on 1:DIALOG:sync_configure:sclick:6: {
n2211=  ;WAsync Without Limitation Checkbox
n2212=  if (!$did(sync_configure,6).state) {
n2213=    did -e sync_configure 20
n2214=    did -e sync_configure 16
n2215=    did -e sync_configure 18
n2216=    did -e sync_configure 10
n2217=    did -e sync_configure 13
n2218=    did -e sync_configure 14
n2219=  }
n2220=  else {
n2221=    did -b sync_configure 20
n2222=    did -b sync_configure 16
n2223=    did -b sync_configure 18
n2224=    did -b sync_configure 10
n2225=    did -b sync_configure 13
n2226=    did -b sync_configure 14
n2227=  }
n2228=}
n2229=on 1:DIALOG:sync_configure:sclick:15: {
n2230=  ;Vidsync "all except these channels" checkbox
n2231=  if ($did(sync_configure,15).state) { did -u sync_configure 17 }
n2232=  else { did -c sync_configure 17 }
n2233=}
n2234=on 1:DIALOG:sync_configure:sclick:17: {
n2235=  ;Vidsync "these channels only" checkbox
n2236=  if ($did(sync_configure,17).state) { did -u sync_configure 15 }
n2237=  else { did -c sync_configure 15 }
n2238=}
n2239=on 1:DIALOG:sync_configure:sclick:16: {
n2240=  ;WAsync "all except these channels" checkbox
n2241=  if ($did(sync_configure,16).state) { did -u sync_configure 18 }
n2242=  else { did -c sync_configure 18 }
n2243=}
n2244=on 1:DIALOG:sync_configure:sclick:18: {
n2245=  ;WAsync "these channels only" checkbox
n2246=  if ($did(sync_configure,18).state) { did -u sync_configure 16 }
n2247=  else { did -c sync_configure 16 }
n2248=}
n2249=alias -l CheckChannelName {
n2250=  if ($pos($1-,$chr(32))) {
n2251=    var %dummy $input(Channelnames cannot contain spaces,wdo,Error)
n2252=    return $false
n2253=  }
n2254=  else return $true
n2255=}
n2256=on 1:DIALOG:sync_configure:sclick:11: {
n2257=  ;Vidsync Add Button
n2258=  if ($did(sync_configure,9,0).text != $null) {
n2259=    if ($CheckChannelName($did(sync_configure,9,0).text)) {
n2260=      var %text $did(sync_configure,9,0).text
n2261=      if (#* !iswm %text) var %text $chr(35) $+ %text
n2262=      var %listitems $didtok(sync_configure,9,32)
n2263=      if (!$istok(%listitems,%text,32)) {
n2264=        did -a sync_configure 9 %text
n2265=        did -o sync_configure 9 0
n2266=      }
n2267=    }
n2268=  }
n2269=}
n2270=on 1:DIALOG:sync_configure:sclick:13: {
n2271=  ;WAsync Add Button
n2272=  if ($did(sync_configure,10,0).text != $null) {
n2273=    if ($CheckChannelName($did(sync_configure,10,0).text)) {
n2274=      var %text $did(sync_configure,10,0).text
n2275=      if (#* !iswm %text) var %text $chr(35) $+ %text
n2276=      var %listitems $didtok(sync_configure,10,32)
n2277=      if (!$istok(%listitems,%text,32)) {
n2278=        did -a sync_configure 10 %text
n2279=        did -o sync_configure 10 0
n2280=      }
n2281=    }
n2282=  }
n2283=}
n2284=on 1:DIALOG:sync_configure:sclick:12: {
n2285=  ;Vidsync remove button
n2286=  if ($did(sync_configure,9,1).sel != $null) {
n2287=    did -d sync_configure 9 $did(sync_configure,9,1).sel
n2288=  }
n2289=}
n2290=on 1:DIALOG:sync_configure:sclick:14: {
n2291=  ;WAsync remove button
n2292=  if ($did(sync_configure,10,1).sel != $null) {
n2293=    did -d sync_configure 10 $did(sync_configure,10,1).sel
n2294=  }
n2295=}
n2296=on 1:DIALOG:sync_configure:sclick:19: {
n2297=  ;Close button
n2298=  ;saving VidSync-Settings
n2299=  if ($did(sync_configure,2).state) { .hadd GTSDll_settings VID_SYNC on }
n2300=  else { .hadd GTSDll_settings VID_SYNC off }
n2301=  if ($did(sync_configure,15).state) { .hadd GTSDll_settings VID_SYNC_limitation all_except }
n2302=  if ($did(sync_configure,17).state) { .hadd GTSDll_settings VID_SYNC_limitation defined_only }
n2303=  if ($did(sync_configure,5).state) { .hadd GTSDll_settings VID_SYNC_limitation none }
n2304=  .hadd GTSDll_settings VID_SYNC_channels $didtok(sync_configure,9,32)
n2305=  ;saving WASync-Settings
n2306=  if ($did(sync_configure,4).state) { .hadd GTSDll_settings WA_jump_state on }
n2307=  else { .hadd GTSDll_settings WA_jump_state off }
n2308=  if ($did(sync_configure,16).state) { .hadd GTSDll_settings WA_SYNC_limitation all_except }
n2309=  if ($did(sync_configure,18).state) { .hadd GTSDll_settings WA_SYNC_limitation defined_only }
n2310=  if ($did(sync_configure,6).state) { .hadd GTSDll_settings WA_SYNC_limitation none }
n2311=  .hadd GTSDll_settings WA_SYNC_channels $didtok(sync_configure,10,32)
n2312=}
n2313=;#########################################################
n2314=;## Dialog Handling END                                 ##
n2315=;#########################################################
n2316=
n2317=alias GTSdllinit {
n2318=  if ($version > 5.99) {
n2319=    if ($exists(" $+ $scriptdir $+ gtsdll.cfg")) {
n2320=      if ($hget(GTSDll_settings) != GTSDll_settings) .hmake GTSDll_settings 100
n2321=      .hload GTSDll_settings " $+ $scriptdir $+ gtsdll.cfg"
n2322=      if ($hget(GTSDll_codecs) != GTSDll_codecs) .hmake GTSDll_codecs 400
n2323=      .hload GTSDll_codecs " $+ $scriptdir $+ FourCC.tbl"
n2324=      ;for ppl who upgraded...
n2325=      if ($hget(GTSDll_settings,cl_video) == $null) .hadd GTSDll_settings cl_video [hd] [player] [sep] [[bar=20,7,5]7] [vid] [sep] [pos] / [dur][?res] [sep] [res][\res] [?fps][sep] [fps] [\fps][sep] [bps] [sep] [size] [ft] [?codec][codec] -[\codec]
n2326=      if ($hget(GTSDll_settings,cl_vdinfo) == $null) .hadd GTSDll_settings cl_vdinfo [hd] VDub Status [sep] [[bar=20,7,5]7] [file] [sep] [pc] [sep] Encoding frame [framecurrent] of [framestotal] and audio sample [audiocurrent] of [audiototal] [sep] Video data: [vdata1]([vdata2]) [sep] Audio data: [adata] [sep] Proj. size: [prosize] [sep] Rate: [fps] [sep] Elapsed: [eltime] [sep] Estimated: [estime] [ft]
n2327=      if ($hget(GTSDll_settings,cl_emule) == $null) .hadd GTSDll_settings cl_emule [hd] eMule [sep] Server: [server] [?ip]([ip])[\ip] [sep] Down: [dn] [sep] Up: [up] [sep] Queues: [queues] [sep] Total DL/UL: [tdn]/[tup] [ft]
n2328=      if ($hget(GTSDll_settings,cl_btinfo) == $null) .hadd GTSDll_settings cl_btinfo [hd] BitTorrent [sep] [[bar=20,7,5]7] [file][?size] ([size] MB)[\size] [sep] [pc] [sep] Down: [kbsdn] KB/s [sep] Up: [kbsup] KB/s [?peers][sep] Peers/Seeds [peers]/[seeds] [\peers][?estime][sep] [estime][\estime] [ft]
n2329=      if ($hget(GTSDll_settings,cl_bt_totals) == $null) .hadd GTSDll_settings cl_bt_totals [hd] Total Bandwith Used by [count] Torrents [sep] Down: [down] KB/s [sep] Up: [up] KB/s [ft] [gtsdllad]
n2330=      if ($hget(GTSDll_settings,cl_dcplusplus) == $null) .hadd GTSDll_settings cl_dcplusplus [hd] [client] [sep] Down: [dl] ([dsl]) ([dled]) [sep] Up: [ul] ([usl]) ([uled]) [sep] Free Slots: [slots] [sep] Total Downloaded / Uploaded: [tdled] / [tuled] [ft] [gtsdllad]
n2331=      if ($hget(GTSDll_settings,cl_grinfo) == $null) .hadd GTSDll_settings cl_grinfo [hd] GetRight [sep] [[bar=20,7,5]7] [file] [?size]([size]) [/size][sep] [pc] [?kbsdn][sep] Speed: [kbsdn] [/kbsdn][?estime][sep] Time left: [estime] [/estime][ft][?totals][hd] Total Bandwith Used by [count] GetRight Downloads [sep] [down] [ft][/totals]
n2332=      if ($hget(GTSDll_settings,cl_no_ext) == $null) .hadd GTSDll_settings cl_no_ext $true
n2333=      if ($hget(GTSDll_settings,cl_no_uc) == $null) .hadd GTSDll_settings cl_no_uc $true
n2334=      if ($hget(GTSDll_settings,cl_audpl_id3present) == $null) .hadd GTSDll_settings cl_audpl_id3present [hd] [player] [sep] [artist] - [album] ([year]) - [title] [sep] [pos] / [length] [sep] [genre] [sep] ([plpos]/[pllen]) [sep] [bitrate] kbps [sep] [size] [ft] [gtsdllad]
n2335=      if ($hget(GTSDll_settings,cl_dcc) == $null) .hadd GTSDll_settings cl_dcc [hd] DCC [type] #[num] [sep] File: [file] ([size]) [sep] Nick: [nick] [sep] Speed: [speed] [sep] [?rcvd]Recieved: [rcvd][/rcvd] [?sent]Sent: [sent][/sent] ([pc]) [sep] Elapsed: [eltime] [sep] Left: [estime] [ft]
n2336=      if ($hget(GTSDll_settings,cl_dcctotals) == $null) .hadd GTSDll_settings cl_dcctotals [hd] DCC [type] [sep] Total: [tdccs] [sep] Total Speed: [tspeed] [ft]
n2337=      if ($hget(GTSDll_settings,au_checkonstart) == $null) .hadd GTSDll_settings au_checkonstart $true
n2338=      if ($hget(GTSDll_settings,au_ask_user) == $null) .hadd GTSDll_settings au_ask_user $true
n2339=      .hadd GTSDll_settings Site update.gts-stuff.com
n2340=      if ($hget(GTSDll_settings,Port) == $null) .hadd GTSDll_settings Port 80
n2341=      if ($hget(GTSDll_settings,az_port) == $null) .hadd GTSDll_settings az_port 6884
n2342=      if ($hget(GTSDll_settings,az_ip) == $null) .hadd GTSDll_settings az_ip 127.0.0.1
n2343=      if ($hget(GTSDll_settings,VID_SYNC_limitation) == $null) .hadd GTSDll_settings VID_SYNC_limitation none
n2344=      if ($hget(GTSDll_settings,WA_SYNC_limitation) == $null) .hadd GTSDll_settings WA_SYNC_limitation none
n2345=      ; remove useless junk from previous versions ...
n2346=      if ($hget(GTSDll_settings,cl_bt_exp) != $null) .hdel GTSDll_settings cl_bt_exp
n2347=      if ($hget(GTSDll_settings,cl_bsplay_unsupportet) != $null) .hdel GTSDll_settings cl_bsplay_unsupportet
n2348=      if ($hget(GTSDll_settings,cl_bsplay_supportet_asf) != $null) .hdel GTSDll_settings cl_bsplay_supportet_asf
n2349=      if ($hget(GTSDll_settings,cl_audpl_noid3) != $null) .hdel GTSDll_settings cl_audpl_noid3
n2350=      if ($hget(GTSDll_settings,cl_bt_n) != $null) .hdel GTSDll_settings cl_bt_n
n2351=      if ($hget(GTSDll_settings,cl_bsplay_supportet) != $null) .hdel GTSDll_settings cl_bsplay_supportet
n2352=      if ($hget(GTSDll_settings,cl_bt_exp_nodlul) != $null) .hdel GTSDll_settings cl_bt_exp_nodlul
n2353=      if ($hget(GTSDll_settings,cl_bt_n_nodlul) != $null) .hdel GTSDll_settings cl_bt_n_nodlul
n2354=    }
n2355=    else {
n2356=      if ($hget(GTSDll_settings) != GTSDll_settings) .hmake GTSDll_settings 100
n2357=      if ($hget(GTSDll_codecs) != GTSDll_codecs) .hmake GTSDll_codecs 400
n2358=      .hload GTSDll_codecs " $+ $scriptdir $+ FourCC.tbl"
n2359=      ; Default settings
n2360=      .hadd GTSDll_settings DCPlusPlusFolder
n2361=      .hadd GTSDll_settings UsePopups $true
n2362=      .hadd GTSDll_settings UseDynamicPopups $false
n2363=      .hload GTSDll_settings " $+ $scriptdir $+ GTSdll-Themes\GTS (Default).cfg"
n2364=      .hadd GTSDll_settings WAFolder $dll(" $+ $scriptdir $+ gtsmirc.dll",GetWAFolder,_)
n2365=      .hadd GTSDll_settings cnt_video 0
n2366=      .hadd GTSDll_settings cnt_btinfo 0
n2367=      .hadd GTSDll_settings cnt_dcinfo 0
n2368=      .hadd GTSDll_settings cnt_audplay 0
n2369=      .hadd GTSDll_settings cnt_ad 0
n2370=      .hadd GTSDll_settings Site update.gts-stuff.com
n2371=      .hadd GTSDll_settings Port 80
n2372=      .hadd GTSDll_settings az_port 6884
n2373=      .hadd GTSDll_settings az_ip 127.0.0.1
n2374=      .hadd GTSDll_settings VID_SYNC_limitation none
n2375=      .hadd GTSDll_settings WA_SYNC_limitation none
n2376=      .hsave -o GTSDll_settings " $+ $scriptdir $+ gtsdll.cfg"
n2377=      GTSdllSettings
n2378=    }
n2379=    if ($hget(GTSDll_settings,UsePopups) == $false) { .disable #GTSDLL.PopUp }
n2380=    else { .enable #GTSDLL.PopUp }
n2381=    echo -s Loaded GTSdll v $+ $dll(" $+ $scriptdir $+ gtsmirc.dll",GetDLLVersion,$scriptdir $+ gtsmirc.dll)
n2382=    if (($os == 95) || ($os == 98) || ($os == ME)) {
n2383=      echo -s Please note that some features of GTSdll are disabled, because they need Windows 2000, XP or newer
n2384=    }
n2385=    if ($hget(GTSDll_settings,au_checkonstart)) {
n2386=      checkupd
n2387=    }
n2388=  }
n2389=  else {
n2390=    echo -s * Cannot load gtsdll.ini - mIRC 6.0 or higher required
n2391=    .unload -rs gtsdll.ini
n2392=  }
n2393=}
n2394=
n2395=on 1:START: {
n2396=  gtsdllinit
n2397=}
n2398=
n2399=on 1:UNLOAD: {
n2400=  if ($hget(GTSDll_settings) = GTSDll_settings) {
n2401=    .hsave -o GTSDll_settings " $+ $scriptdir $+ gtsdll.cfg"
n2402=    .hfree GTSDll_settings
n2403=    .hfree GTSDll_codecs
n2404=    unset %gtsdll.echoonlymode
n2405=    if (%GTS-reload) { .unset %GTS-reload | .timer 1 2 .load -rs " $+ $scriptdir $+ gtsdll.ini $+ " }
n2406=  }
n2407=}
n2408=
n2409=on 1:EXIT: {
n2410=  .hsave -o GTSDll_settings " $+ $scriptdir $+ gtsdll.cfg"
n2411=  .hfree GTSDll_settings
n2412=  .hfree GTSDll_codecs
n2413=}
n2414=
n2415=alias -l ifbt {
n2416=  if ($hget(GTSDll_settings,bt_use_az) == 1) { return $true }
n2417=  var %mode 0
n2418=  :trymodestart
n2419=  inc %mode
n2420=  if (%mode == 1) { var %dllcall GetBTInfo }
n2421=  else {
n2422=    var %cfgfile $hget(GTSdll_settings,bt_config_file)
n2423=    if (%cfgfile) { var %dllcall GetCustomListViewInfo }
n2424=    else { return }
n2425=  }
n2426=  var %btmsg $dll(" $+ $scriptdir $+ gtsmirc.dll",$(%dllcall),0 $+ $chr(1) $+ %cfgfile)
n2427=  var %btcount $gettok(%btmsg,3,1)
n2428=  if (%btcount > 0) { return $true }
n2429=  else if (%mode == 2) { return $false }
n2430=  else goto trymodestart
n2431=}
n2432=
n2433=alias -l ifgr {
n2434=  var %grmsg $dll(" $+ $scriptdir $+ gtsmirc.dll",GetGRInfo,0)
n2435=  var %grcount $gettok(%grmsg,3,1)
n2436=  if (%grcount > 0) { return $true }
n2437=  else return $false
n2438=}
n2439=
n2440=alias -l grpopup {
n2441=  if ($hget(GTSDll_settings,UseDynamicPopups)) {
n2442=    if ($1 == begin) return ..-
n2443=    if ($1 isnum) {
n2444=      var %grmsg $dll(" $+ $scriptdir $+ gtsmirc.dll",GetGRInfo,0)
n2445=      var %grcount $gettok(%grmsg,3,1)
n2446=      if (*ERROR* iswm %btmsg) { return }
n2447=      var %grcnt 0
n2448=      if (%grcount > 0) {
n2449=        :grnext
n2450=        inc %grcnt
n2451=        var %grmsg $dll(" $+ $scriptdir $+ gtsmirc.dll",GetGRInfo,$(%grcnt))
n2452=        if ($gettok(%grmsg,2,1) == done) return
n2453=        if ($1 == %grcnt) { return .. $+ $1 $+ . $gettok(%grmsg,3,1) : grinfo -i $+ $iif(%gtsdll.echoonlymode,e,) $1 }
n2454=        goto grnext
n2455=        :grdone
n2456=      }
n2457=      else return
n2458=    }
n2459=    if ($1 == end) return -
n2460=  }
n2461=}
n2462=
n2463=alias -l btpopup {
n2464=  if ($hget(GTSDll_settings,UseDynamicPopups)) {
n2465=    if ($1 == begin) return ..-
n2466=    if ($1 isnum) {
n2467=      var %mode 0
n2468=      var %torrent $1
n2469=      :trymodestart
n2470=      inc %mode
n2471=      if (%mode == 1) { var %dllcall GetBTInfo }
n2472=      else {
n2473=        var %cfgfile $hget(GTSdll_settings,bt_config_file)
n2474=        if (%cfgfile) { var %dllcall GetCustomListViewInfo }
n2475=        else { return }
n2476=      }
n2477=      var %btmsg $dll(" $+ $scriptdir $+ gtsmirc.dll",$(%dllcall),0 $+ $chr(1) $+ %cfgfile)
n2478=      var %btcount $gettok(%btmsg,3,1)
n2479=      if (*ERROR* iswm %btmsg) { return }
n2480=      var %btcnt 0
n2481=      if (%btcount > 0) {
n2482=        :btnext
n2483=        inc %btcnt
n2484=        var %btmsg $dll(" $+ $scriptdir $+ gtsmirc.dll",$(%dllcall),$(%btcnt) $+ $chr(1) $+ %cfgfile)
n2485=        if ($gettok(%btmsg,2,1) == SKIP) { inc %torrent | goto btnext }
n2486=        if ($gettok(%btmsg,2,1) == done) goto btdone
n2487=        if (%torrent == %btcnt) { return .. $+ $1 $+ . $gettok(%btmsg,3,1) : btinfo -i $+ $iif(%gtsdll.echoonlymode,e,) $1 }
n2488=        goto btnext
n2489=        :btdone
n2490=      }
n2491=      else if (%mode == 2) { return }
n2492=      else goto trymodestart
n2493=    }
n2494=    if ($1 == end) return -
n2495=  }
n2496=}
n2497=
n2498=#GTSDLL.PopUp on
n2499=menu channel,query {
n2500=  GTSDLL
n2501=  /*
n2502=  .$iif(!$ifbt,$style(2)) BitTorrent Status
n2503=  ..Show all: btinfo $iif(%gtsdll.echoonlymode,-e,)
n2504=  ..$submenu($btpopup($1))
n2505=  ..Totals: bttotals $iif(%gtsdll.echoonlymode,-e,)
n2506=  .$iif(!$ifgr,$style(2)) GetRight Downloads
n2507=  ..Show all : grinfo $iif(%gtsdll.echoonlymode,-e,)
n2508=  ..$submenu($grpopup($1))
n2509=  ..Totals: grtotals $iif(%gtsdll.echoonlymode,-e,)
n2510=  .-
n2511=  .$iif(!$ifget,$style(2)) DCC Gets
n2512=  ..Show All: getinfo $iif(%gtsdll.echoonlymode,-e,)
n2513=  ..$submenu($dccgetpopup($1))
n2514=  ..Show Totals: gettotals $iif(%gtsdll.echoonlymode,-e,)
n2515=  .$iif(!$ifsend,$style(2)) DCC Sends
n2516=  ..Show All: sendinfo $iif(%gtsdll.echoonlymode,-e,)
n2517=  ..$submenu($dccsendpopup($1))
n2518=  ..Show Totals: sendtotals $iif(%gtsdll.echoonlymode,-e,)
n2519=  .$iif(!$ifdcc,$style(2)) Both
n2520=  ..Show All: dccinfo $iif(%gtsdll.echoonlymode,-e,)
n2521=  ..Show Totals: dcctotals $iif(%gtsdll.echoonlymode,-e,)
n2522=  .-
n2523=  .DC++ Status: dcinfo $iif(%gtsdll.echoonlymode,-e,)
n2524=  .eMule Status: eminfo $iif(%gtsdll.echoonlymode,-e,)
n2525=  .VDub Encoding Status: vdinfo $iif(%gtsdll.echoonlymode,-e,)
n2526=  .-
n2527=  .Show Version / Ad: gtsdllinfo $iif(%gtsdll.echoonlymode,-e,)
n2528=  .Command Counter: gtsdllcounter $iif(%gtsdll.echoonlymode,-e,)
n2529=  .-
n2530=  */
n2531=  .Settings
n2532=  ..$iif(%gtsdll.echoonlymode,$style(1),$style(0)) Quiet Mode : if (%gtsdll.echoonlymode == 1) set %gtsdll.echoonlymode 0 | else set %gtsdll.echoonlymode 1
n2533=  ..-
n2534=  ..GTSdll Settings: GTSDllSettings
n2535=  ..$iif($hget(GTSDLL_settings,WAFolder) == $null,$style(2),$style(0)) VIDSync && WASync Settings: GTSdll.SyncSettings
n2536=  /*
n2537=  ..-
n2538=  ..Check for Updates: checkupd
n2539=  .-
n2540=  .Video Player Controls
n2541=  ..Play: vidplay
n2542=  ..Pause: vidpause
n2543=  ..Stop: vidstop
n2544=  ..-
n2545=  ..$iif($hget(GTSDll_settings,VID_SYNC) == on,$style(1),$style(0)) Enable VIDSync : if ($hget(GTSDll_settings,VID_SYNC) == on) vidsync disable | else vidsync enable
n2546=  .Video Player Status: vid $iif(%gtsdll.echoonlymode,-e,)
n2547=  */
n2548=  .-
n2549=  .$iif($hget(GTSDLL_settings,WAFolder) == $null,$style(2),$style(0)) Audio Player Controls
n2550=  ..Play: wa play
n2551=  ..Pause: wa pause
n2552=  ..Stop: wa stop
n2553=  ..Stop (with fadeout): wa fstop
n2554=  ..Stop after current track: wa stopifdone
n2555=  ..-
n2556=  ..Next Track: wa next
n2557=  ..Previous Track: wa prev
n2558=  ..-
n2559=  ..Jump to File: wa find
n2560=  ..Jump to Track: wa jump $$?="Enter a Number"
n2561=  ..Search: wa jumpto $$?="Enter a Search-String"
n2562=  ..-
n2563=  ..$iif($hget(GTSDll_settings,WA_jump_state) == on,$style(1),$style(0)) Enable WASync : if ($hget(GTSDll_settings,WA_jump_state) == on) wa disable sync | else wa enable sync
n2564=  .Audio Player Status: aud $iif(%gtsdll.echoonlymode,-e,)
n2565=}
n2566=#GTSDLL.PopUp end
n2567=
n2568=;;##########################################################
n2569=;;##  Below are all the aliases for DCC stuff (by phaze-) ##
n2570=;;##########################################################
n2571=
n2572=alias getinfo {
n2573=  if ($get(0) == 0) { echo -a * you don't have any dcc gets | return }
n2574=  if ((i isin $1) && (c isin $1) && ($3 !isnum)) { echo -a * last parameter must be a number | return }
n2575=  elseif ((i isin $1) && (c !isin $1) && ($2 !isnum)) { echo -a * last parameter must be a number | return }
n2576=  elseif ((i isin $1) && (c isin $1) && ($3 isnum)) var %counter = $3
n2577=  elseif ((i isin $1) && (c !isin $1) && ($2 isnum)) var %counter = $2
n2578=  else var %counter = 1
n2579=  var %total.speed = 0
n2580=  var %active = 0
n2581=  while (%counter <= $get(0)) {
n2582=    if (i !isin $1) && (($get(%counter).status != active)) { inc %counter | continue }
n2583=    var %file = $iif($hget(GTSDll_settings,cl_no_uc),$replace($get(%counter).file,_,$chr(32)),$get(%counter).file)
n2584=    if ((i isin $1) && ($get(%counter).status != active)) { echo -a * %file from $get(%counter) isn't active! | return }
n2585=    if (i !isin $1) inc %active
n2586=    else %active = %counter
n2587=    if ($get(%counter).size >= $calc(1024*1024*1024)) var %size = $round($calc($get(%counter).size / (1024*1024*1024)),2) GB
n2588=    elseif ($get(%counter).size >= $calc(1024*1024)) var %size = $round($calc($get(%counter).size / (1024*1024)),2) MB
n2589=    elseif ($get(%counter).size < $calc(1024*1024)) var %size = $round($calc($get(%counter).size / 1024),2) KB
n2590=    if ($get(%counter).rcvd >= $calc(1024*1024*1024)) var %rcvd = $round($calc($get(%counter).rcvd / (1024*1024*1024)),2) GB
n2591=    elseif ($get(%counter).rcvd >= $calc(1024*1024)) var %rcvd = $round($calc($get(%counter).rcvd / (1024*1024)),2) MB
n2592=    elseif ($get(%counter).rcvd < $calc(1024*1024)) var %rcvd = $round($calc($get(%counter).rcvd / 1024),2) KB
n2593=    if ($get(%counter).cps >= $calc(1024*1024)) var %speed = $round($calc($get(%counter).cps / (1024*1024)),2) Mb/s
n2594=    elseif ($get(%counter).cps < $calc(1024*1024)) var %speed = $round($calc($get(%counter).cps / 1024),2) Kb/s
n2595=    var %eta $duration($calc(($get(%counter).size - $get(%counter).rcvd )/ $get(%counter).cps ))
n2596=    %total.speed = %total.speed + $get(%counter).cps
n2597=    var %network $scid($get(%counter).cid).network
n2598=    if (%network == $null) var %network $scid($get(%counter).cid).server
n2599=    if (%network == $null) var %network Unknown
n2600=    var %message $formatmessage(cl_dccGet $+ $get(%counter) $+  $+ %file $+  $+ %size $+  $+ %rcvd $+  $+ no sent $+  $+ $get(%counter).pc $+ % $+  $+ %speed $+  $+ $duration($get(%counter).secs) $+  $+ %eta $+  $+ %active $+  $+ %network)
n2601=    SendMsg %message $+ $chr(1) $+ getinfo $+ $chr(1) $+ $1-
n2602=    if (i isin $1) break
n2603=    inc %counter
n2604=  }
n2605=  if ((i !isin $1) && (t !isin $1) && (%active > 1)) {
n2606=    if (%active == 0) { echo -a * you don't have any active dcc sends | return }
n2607=    if (%total.speed >= $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / (1024*1024)),2) Mb/s
n2608=    elseif (%total.speed < $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / 1024),2) Kb/s
n2609=    var %message $formatmessage(cl_dcctotalsGet $+ %active $+  $+ %total.speed)
n2610=    SendMsg %message $+ $chr(1) $+ getinfo $+ $chr(1) $+ $1-
n2611=  }
n2612=}
n2613=
n2614=alias sendinfo {
n2615=  if ($send(0) == 0) { echo -a * you don't have any dcc sends | return }
n2616=  if ((i isin $1) && (c isin $1) && ($3 !isnum)) { echo -a * last parameter must be a number | return }
n2617=  elseif ((i isin $1) && (c !isin $1) && ($2 !isnum)) { echo -a * last parameter must be a number | return }
n2618=  elseif ((i isin $1) && (c isin $1) && ($3 isnum)) var %counter = $3
n2619=  elseif ((i isin $1) && (c !isin $1) && ($2 isnum)) var %counter = $2
n2620=  else var %counter = 1
n2621=  var %total.speed = 0
n2622=  var %active = 0
n2623=  while (%counter <= $send(0)) {
n2624=    if (i !isin $1) && (($send(%counter).status != active)) { inc %counter | continue }
n2625=    var %file = $iif($hget(GTSDll_settings,cl_no_uc),$replace($send(%counter).file,_,$chr(32)),$send(%counter).file)
n2626=    if ((i isin $1) && ($send(%counter).status != active)) { echo -a * %file to $send(%counter) isn't active! | return }
n2627=    if (i !isin $1) inc %active
n2628=    else %active = %counter
n2629=    if ($send(%counter).size >= $calc(1024*1024*1024)) var %size = $round($calc($send(%counter).size / (1024*1024*1024)),2) GB
n2630=    elseif ($send(%counter).size >= $calc(1024*1024)) var %size = $round($calc($send(%counter).size / (1024*1024)),2) MB
n2631=    elseif ($send(%counter).size < $calc(1024*1024)) var %size = $round($calc($send(%counter).size / 1024),2) KB
n2632=    if ($send(%counter).sent >= $calc(1024*1024*1024)) var %sent = $round($calc($send(%counter).sent / (1024*1024*1024)),2) GB
n2633=    elseif ($send(%counter).sent >= $calc(1024*1024)) var %sent = $round($calc($send(%counter).sent / (1024*1024)),2) MB
n2634=    elseif ($send(%counter).sent < $calc(1024*1024)) var %sent = $round($calc($send(%counter).sent / 1024),2) KB
n2635=    if ($send(%counter).cps >= $calc(1024*1024)) var %speed = $round($calc($send(%counter).cps / (1024*1024)),2) Mb/s
n2636=    elseif ($send(%counter).cps < $calc(1024*1024)) var %speed = $round($calc($send(%counter).cps / 1024),2) Kb/s
n2637=    var %eta $duration($calc(($send(%counter).size - $send(%counter).sent )/ $send(%counter).cps ))
n2638=    %total.speed = %total.speed + $send(%counter).cps
n2639=    var %network $scid($send(%counter).cid).network
n2640=    if (%network == $null) var %network $scid($send(%counter).cid).server
n2641=    if (%network == $null) var %network Unknown
n2642=    var %message $formatmessage(cl_dccSend $+ $send(%counter) $+  $+ %file $+  $+ %size $+  $+ no rcvd $+  $+ %sent $+  $+ $send(%counter).pc $+ % $+  $+ %speed $+  $+ $duration($send(%counter).secs) $+  $+ %eta $+  $+ %active $+  $+ %network)
n2643=    SendMsg %message $+ $chr(1) $+ sendinfo $+ $chr(1) $+ $1-
n2644=    if (i isin $1) break
n2645=    inc %counter
n2646=  }
n2647=  if ((i !isin $1) && (t !isin $1) && (%active > 1)) {
n2648=    if (%active == 0) { echo -a * you don't have any active dcc sends | return }
n2649=    if (%total.speed >= $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / (1024*1024)),2) Mb/s
n2650=    elseif (%total.speed < $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / 1024),2) Kb/s
n2651=    var %message $formatmessage(cl_dcctotalsSend $+ %active $+  $+ %total.speed)
n2652=    SendMsg %message $+ $chr(1) $+ sendinfo $+ $chr(1) $+ $1-}
n2653=  }
n2654=}
n2655=
n2656=alias gettotals {
n2657=  if ($get(0) == 0) { echo -a * you don't have any dcc gets | return }
n2658=  var %counter = 1
n2659=  var %total.speed = 0
n2660=  var %active = 0
n2661=  while (%counter <= $get(0)) {
n2662=    if ($get(%counter).status != active) { inc %counter | continue }
n2663=    inc %active
n2664=    %total.speed = %total.speed + $get(%counter).cps
n2665=    inc %counter
n2666=  }
n2667=  if (%active == 0) { echo -a * you don't have any active dcc gets | return }
n2668=  if (%total.speed >= $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / (1024*1024)),2) Mb/s
n2669=  elseif (%total.speed < $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / 1024),2) Kb/s
n2670=  var %message $formatmessage(cl_dcctotalsGet $+ %active $+  $+ %total.speed)
n2671=  SendMsg %message $+ $chr(1) $+ getinfo $+ $chr(1) $+ $1-}
n2672=}
n2673=
n2674=alias sendtotals {
n2675=  if ($send(0) == 0) { echo -a * you don't have any dcc sends | return }
n2676=  var %counter = 1
n2677=  var %total.speed = 0
n2678=  var %active = 0
n2679=  while (%counter <= $send(0)) {
n2680=    if ($send(%counter).status != active) { inc %counter | continue }
n2681=    inc %active
n2682=    %total.speed = %total.speed + $send(%counter).cps
n2683=    inc %counter
n2684=  }
n2685=  if (%active == 0) { echo -a * you don't have any active dcc sends | return }
n2686=  if (%total.speed >= $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / (1024*1024)),2) Mb/s
n2687=  elseif (%total.speed < $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / 1024),2) Kb/s
n2688=  var %message $formatmessage(cl_dcctotalsSend $+ %active $+  $+ %total.speed)
n2689=  SendMsg %message $+ $chr(1) $+ sendinfo $+ $chr(1) $+ $1-}
n2690=}
n2691=
n2692=alias -l dccgetpopup {
n2693=  if ($hget(GTSDll_settings,UseDynamicPopups)) {
n2694=    if ($1 == begin) { set %dcc.popup.get.count 0 | return - }
n2695=    if ($1 isnum) {
n2696=      if ($get($1) == $null) return
n2697=      if ($get($1).status == active) {
n2698=        inc %dcc.popup.get.count
n2699=        return %dcc.popup.get.count $+ . $+ $left($get($1),10) -> $left($get($1).file,25) : getinfo $iif(%gtsdll.echoonlymode,-ei,-i) $1
n2700=      }
n2701=    }
n2702=  }
n2703=  if ($1 == end) { unset %dcc.popup.get.count | return - }
n2704=}
n2705=
n2706=alias -l dccsendpopup {
n2707=  if ($hget(GTSDll_settings,UseDynamicPopups)) {
n2708=    if ($1 == begin) { set %dcc.popup.send.count 0 | return - }
n2709=    if ($1 isnum) {
n2710=      if ($send($1) == $null) return
n2711=      if ($send($1).status == active) {
n2712=        inc %dcc.popup.send.count
n2713=        return %dcc.popup.send.count $+ . $+ $left($send($1),10) -> $left($send($1).file,25) : sendinfo $iif(%gtsdll.echoonlymode,-ei,-i) $1
n2714=      }
n2715=    }
n2716=  }
n2717=  if ($1 == end) { unset %dcc.popup.send.count | return - }
n2718=}
n2719=
n2720=alias -l ifdcc {
n2721=  var %counter = 1
n2722=  while (%counter <= $get(0)) {
n2723=    if ($get(%counter).status == active) { var %get = $true | break }
n2724=    inc %counter
n2725=  }
n2726=  if (%get == $null) return $false
n2727=  %counter = 1
n2728=  while (%counter <= $send(0)) {
n2729=    if (($send(%counter).status == active) && (%get != $null)) { return $true }
n2730=    inc %counter
n2731=  }
n2732=  return $false
n2733=}
n2734=
n2735=alias -l ifget {
n2736=  var %counter = 1
n2737=  while (%counter <= $get(0)) {
n2738=    if ($get(%counter).status == active) return true
n2739=    inc %counter
n2740=  }
n2741=  return $false
n2742=}
n2743=
n2744=alias -l ifsend {
n2745=  var %counter = 1
n2746=  while (%counter <= $send(0)) {
n2747=    if ($send(%counter).status == active) return true
n2748=    inc %counter
n2749=  }
n2750=  return $false
n2751=}
n2752=
n2753=alias dccinfo {
n2754=  if (($get(0) == 0) && ($send(0) == 0)) { echo -a * you don't have any dcc's | return }
n2755=  var %counter = 1
n2756=  var %total.speed = 0
n2757=  var %active = 0
n2758=  var %dcc.count = 0
n2759=  while (%counter <= $get(0)) {
n2760=    if ($get(%counter).status != active) { inc %counter | continue }
n2761=    inc %active
n2762=    inc %dcc.count
n2763=    var %file = $iif($hget(GTSDll_settings,cl_no_uc),$replace($get(%counter).file,_,$chr(32)),$get(%counter).file)
n2764=    if ($get(%counter).size >= $calc(1024*1024*1024)) var %size = $round($calc($get(%counter).size / (1024*1024*1024)),2) GB
n2765=    elseif ($get(%counter).size >= $calc(1024*1024)) var %size = $round($calc($get(%counter).size / (1024*1024)),2) MB
n2766=    elseif ($get(%counter).size < $calc(1024*1024)) var %size = $round($calc($get(%counter).size / 1024),2) KB
n2767=    if ($get(%counter).rcvd >= $calc(1024*1024*1024)) var %rcvd = $round($calc($get(%counter).rcvd / (1024*1024*1024)),2) GB
n2768=    elseif ($get(%counter).rcvd >= $calc(1024*1024)) var %rcvd = $round($calc($get(%counter).rcvd / (1024*1024)),2) MB
n2769=    elseif ($get(%counter).rcvd < $calc(1024*1024)) var %rcvd = $round($calc($get(%counter).rcvd / 1024),2) KB
n2770=    if ($get(%counter).cps >= $calc(1024*1024)) var %speed = $round($calc($get(%counter).cps / (1024*1024)),2) Mb/s
n2771=    elseif ($get(%counter).cps < $calc(1024*1024)) var %speed = $round($calc($get(%counter).cps / 1024),2) Kb/s
n2772=    var %eta $duration($calc(($get(%counter).size - $get(%counter).rcvd )/ $get(%counter).cps ))
n2773=    %total.speed = %total.speed + $get(%counter).cps
n2774=    var %network $scid($get(%counter).cid).network
n2775=    if (%network == $null) var %network $scid($get(%counter).cid).server
n2776=    if (%network == $null) var %network Unknown
n2777=    var %message $formatmessage(cl_dccGet $+ $get(%counter) $+  $+ %file $+  $+ %size $+  $+ %rcvd $+  $+ no sent $+  $+ $get(%counter).pc $+ % $+  $+ %speed $+  $+ $duration($get(%counter).secs) $+  $+ %eta $+  $+ %dcc.count $+  $+ %network)
n2778=    SendMsg %message $+ $chr(1) $+ getinfo $+ $chr(1) $+ $1-
n2779=    inc %counter
n2780=  }
n2781=  %counter = 1
n2782=  %dcc.count = 0
n2783=  while (%counter <= $send(0)) {
n2784=    if ($send(%counter).status != active) { inc %counter | continue }
n2785=    inc %active
n2786=    inc %dcc.count
n2787=    var %file = $iif($hget(GTSDll_settings,cl_no_uc),$replace($send(%counter).file,_,$chr(32)),$send(%counter).file)
n2788=    if ($send(%counter).size >= $calc(1024*1024*1024)) var %size = $round($calc($send(%counter).size / (1024*1024*1024)),2) GB
n2789=    elseif ($send(%counter).size >= $calc(1024*1024)) var %size = $round($calc($send(%counter).size / (1024*1024)),2) MB
n2790=    elseif ($send(%counter).size < $calc(1024*1024)) var %size = $round($calc($send(%counter).size / 1024),2) KB
n2791=    if ($send(%counter).sent >= $calc(1024*1024*1024)) var %sent = $round($calc($send(%counter).sent / (1024*1024*1024)),2) GB
n2792=    elseif ($send(%counter).sent >= $calc(1024*1024)) var %sent = $round($calc($send(%counter).sent / (1024*1024)),2) MB
n2793=    elseif ($send(%counter).sent < $calc(1024*1024)) var %sent = $round($calc($send(%counter).sent / 1024),2) KB
n2794=    if ($send(%counter).cps >= $calc(1024*1024)) var %speed = $round($calc($send(%counter).cps / (1024*1024)),2) Mb/s
n2795=    elseif ($send(%counter).cps < $calc(1024*1024)) var %speed = $round($calc($send(%counter).cps / 1024),2) Kb/s
n2796=    var %eta $duration($calc(($send(%counter).size - $send(%counter).sent )/ $send(%counter).cps ))
n2797=    %total.speed = %total.speed + $send(%counter).cps
n2798=    var %network $scid($send(%counter).cid).network
n2799=    if (%network == $null) var %network $scid($send(%counter).cid).server
n2800=    if (%network == $null) var %network Unknown
n2801=    var %message $formatmessage(cl_dccSend $+ $send(%counter) $+  $+ %file $+  $+ %size $+  $+ no rcvd $+  $+ %sent $+  $+ $send(%counter).pc $+ % $+  $+ %speed $+  $+ $duration($send(%counter).secs) $+  $+ %eta $+  $+ %dcc.count $+  $+ %network)
n2802=    SendMsg %message $+ $chr(1) $+ sendinfo $+ $chr(1) $+ $1-
n2803=    inc %counter
n2804=  }
n2805=  if (%active == 0) { echo -a * you don't have any active dcc's | return }
n2806=  if ((t !isin $1) && (%active > 1)) {
n2807=    if (%total.speed >= $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / (1024*1024)),2) MB/s
n2808=    elseif (%total.speed < $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / 1024),2) KB/s
n2809=    var %message $formatmessage(cl_dcctotalsGet/Send $+ %active $+  $+ %total.speed)
n2810=    SendMsg %message $+ $chr(1) $+ getinfo $+ $chr(1) $+ $1-}
n2811=  }
n2812=}
n2813=
n2814=alias dcctotals {
n2815=  if ($send(0) == 0) { echo -a * you don't have any dcc sends | return }
n2816=  var %counter = 1
n2817=  var %total.speed = 0
n2818=  var %active = 0
n2819=  while (%counter <= $send(0)) {
n2820=    if ($send(%counter).status != active) { inc %counter | continue }
n2821=    inc %active
n2822=    %total.speed = %total.speed + $send(%counter).cps
n2823=    inc %counter
n2824=  }
n2825=  %counter = 1
n2826=  while (%counter <= $get(0)) {
n2827=    if ($get(%counter).status != active) { inc %counter | continue }
n2828=    inc %active
n2829=    %total.speed = %total.speed + $get(%counter).cps
n2830=    inc %counter
n2831=  }
n2832=  if (%active == 0) { echo -a * you don't have any active dcc sends | return }
n2833=  if (%total.speed >= $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / (1024*1024)),2) MB/s
n2834=  elseif (%total.speed < $calc(1024*1024)) var %total.speed = $round($calc(%total.speed / 1024),2) KB/s
n2835=  var %message $formatmessage(cl_dcctotalsGet/Send $+ %active $+  $+ %total.speed)
n2836=  SendMsg %message $+ $chr(1) $+ sendinfo $+ $chr(1) $+ $1-}
n2837=}
n2838=
n2839=;;#############################################################
n2840=;;##  Below are general aliases for BT stuff (by chaosblade) ##
n2841=;;#############################################################
n2842=alias -l toBytes {
n2843=  var %size $gettok($$1-,1,32)
n2844=  var %suffix $gettok($$1-,2,32)
n2845=
n2846=  if (%suffix = kb/s || %suffix = ko/s) { %size = $calc(%size * 1024) }
n2847=  else if (%suffix = mb/s || %suffix = mo/s) { %size = $calc(%size * 1024 * 1024) }
n2848=  else if (%suffix = gb/s || %suffix = go/s) { %size = $calc(%size * 1024 * 1024 * 1024) }
n2849=  else if (%suffix = tb/s || %suffix = to/s) { %size = $calc(%size * 1024 * 1024 * 1024 * 1024) }
n2850=
n2851=  return %size
n2852=}
n2853=
n2854=alias -l suffix {
n2855=  return $remove($bytes($$1).suf,$bytes($$1)) $+ /s
n2856=}
n2857=
n2858=;#############################################################
n2859=;##  MPC Support                                            ##
n2860=;#############################################################
n2861=alias -l MPCSendMsg {
n2862=  var %message $gettok($1-,1,1)
n2863=  set %calledcmd $gettok($1-,2,1)
n2864=  var %param1 $gettok($gettok($1-,3,1),1,32)
n2865=  var %param2 $gettok($gettok($1-,3,1),2,32)
n2866=  var %param3 $gettok($gettok($1-,3,1),3-98,32)
n2867=  if (%param1) {
n2868=    if ($left(%param1,1) == $chr(45)) {
n2869=      if (s isin %param1) %message = $strip(%message,c)
n2870=      if (c isin %param1) {
n2871=        var %gtsdll.cmdparam.ok 1
n2872=        if (%param2) {
n2873=          if (m isin %param1) {
n2874=            var %x1 $pos($(%param1),c,1)
n2875=            var %x2 $pos($(%param1),m,1)
n2876=            if (%x1 > %x2) { echo -a * / $+ %calledcmd $+ : Invalid parameters - c parameter can't be behind m parameter | return }
n2877=            else { var %gtsdll.cmdparam.channel %param2 }
n2878=          }
n2879=          else { var %gtsdll.cmdparam.channel %param2 }
n2880=        }
n2881=        else { echo -a * / $+ %calledcmd $+ : Invalid parameters | return }
n2882=        if (m isin %param1) {
n2883=          var %message %message  $+ %param3
n2884=        }
n2885=      }
n2886=      else {
n2887=        if (m isin %param1) {
n2888=          var %message %message  $+ %param2 %param3
n2889=        }
n2890=      }
n2891=      if (e isin %param1) { var %gtsdll.cmdparam.ok 1 | var %gtsdll.cmdparam.echo 1 }
n2892=    }
n2893=    else { echo -a * / $+ %calledcmd $+ : Invalid parameters | return }
n2894=  }
n2895=
n2896=  if (%message != $null) {
n2897=    var %temp %message
n2898=    :begin
n2899=    if ([br] isin %temp) {
n2900=      var %gts.br.found 1
n2901=      var %x $pos(%temp,[br],1)
n2902=      if (%x != $null) {
n2903=        var %message $left(%temp,$calc($(%x) -1))
n2904=        var %temp $right(%temp,$calc($len(%temp) - $(%x) - 3))
n2905=      }
n2906=    }
n2907=    else {
n2908=      var %gts.br.found 0
n2909=      var %message %temp
n2910=    }
n2911=    if (c isincs $gettok($chan($iif(%gtsdll.cmdparam.channel,%gtsdll.cmdparam.channel,$active)).mode,1,32)) var %message = $strip(%message,c)
n2912=    if (%gtsdll.echoonlymode == 1) {
n2913=      echo $iif(%gtsdll.cmdparam.channel,%gtsdll.cmdparam.channel,-a) %message
n2914=    }
n2915=    else if ($hget(GTSDll_settings,cl_mode) == me)  {
n2916=      describe %message
n2917=    }
n2918=    else { msg %message }
n2919=    if (%gts.br.found == 1) goto begin
n2920=  }
n2921=}
n2922=
n2923=;####################################################
n2924=;##  /mpcvid -ect [channel|window] [text]          ##
n2925=;####################################################
n2926=;##                                                ##
n2927=;##  -e echo-mode                                  ##
n2928=;##  -s strip colors                               ##
n2929=;##  -c output to specific channel/window          ##
n2930=;##  -m adds [text] to the end of output           ##
n2931=;##                                                ##
n2932=;####################################################
n2933=
n2934=alias mpcvid {
n2935=  var %message $FormatMessage(cl_video $+ $chr(1) $+ $dll(" $+ $scriptdir $+ gtsmirc.dll",GetOpenVideo,_))
n2936=  var %cnt_video $hget(GTSDll_settings,cnt_video)
n2937=  inc %cnt_video
n2938=  hadd GTSDll_settings cnt_video %cnt_video
n2939=  if (%message != $null) { SendMsg %message $+ $chr(1) $+ vid $+ $chr(1) $+ $1- }
n2940=  else echo -a * no player running or no file opened
n2941=}
n2942=;####################################################
n2943=;##  /mpcaud -ec [channel|window] [text]           ##
n2944=;####################################################
n2945=;##                                                ##
n2946=;##  -e echo-mode                                  ##
n2947=;##  -s strip colors                               ##
n2948=;##  -c output to specific channel/window          ##
n2949=;##  -m adds [text] to the end of output           ##
n2950=;##                                                ##
n2951=;####################################################
n2952=
n2953=alias mpcaud {
n2954=  var %message $FormatMessage(cl_video $+ $chr(1) $+ $dll(" $+ $scriptdir $+ gtsmirc.dll",GetOpenVideo,_))
n2955=  var %cnt_audplay $hget(GTSDll_settings,cnt_audplay)
n2956=  inc %cnt_audplay
n2957=  hadd GTSDll_settings cnt_audplay %cnt_audplay
n2958=  if (%message != $null) { MPCSendMsg %message $+ $chr(1) $+ aud $+ $chr(1) $+ $1- }
n2959=  else echo -a * no player running or no file opened
n2960=}
n2961=
n2962=;####################################################
n2963=;## Revision or other additional version info can  ##
n2964=;## be stored here.                                ##
n2965=;####################################################
n2966=alias -l revision {
n2967=  ;replace $null by revision number...
n2968=  return $null
n2969=}
n2970=
n2971=alias gtsdllver {
n2972=  if ($1 == fullver) return $dll(" $+ $scriptdir $+ gtsmirc.dll",GetDLLVersion,$scriptdir $+ gtsmirc.dll) $iif($revision > 0, Revision $revision,)
n2973=  if ($1 == numver) {
n2974=    var %version     $remove($dll(" $+ $scriptdir $+ gtsmirc.dll",GetDLLVersion,$scriptdir $+ gtsmirc.dll),.)
n2975=    return %version $+ $iif($revision > 0,. $+ $revision,)
n2976=  }
n2977=}
n2978=
n2979=;####################################################
n2980=;##  New Updater                                   ##
n2981=;####################################################
n2982=alias -l checkupd {
n2983=  .load -rs " $+ $scriptdir $+ gtsupd.mrc"
n2984=  sockclose GTSDLL.updatechecker
n2985=  sockopen GTSDLL.updatechecker $hget(GTSDll_settings,Site) $hget(GTSDll_settings,Port)
n2986=}
n2987=
n2988=/*
n2989=alias -l utfdec {
n2990=  return $dll(" $+ $scriptdir $+ gtsmirc.dll",UTF8Decode,$1-)
n2991=}
n2992=*/
n2993=
n2994=alias GetParamTarget {
n2995=  var %param1 $gettok($gettok($1-,1,1),1,32)
n2996=  var %param2 $gettok($gettok($1-,1,1),2,32)
n2997=  if (%param1) {
n2998=    if ($left(%param1,1) == $chr(45)) {
n2999=      if (c isin %param1) {
n3000=        var %gtsdll.cmdparam.ok 1
n3001=        if (%param2) {
n3002=          if (m isin %param1) {
n3003=            var %x1 $pos($(%param1),c,1)
n3004=            var %x2 $pos($(%param1),m,1)
n3005=            if (%x1 > %x2) { return $active }
n3006=            else { return %param2 }
n3007=          }
n3008=          else { return %param2 }
n3009=        }
n3010=        else { return $active }
n3011=      }
n3012=    }
n3013=    else { return $active }
n3014=  }
n3015=  return $active
n3016=}
n3017=/*
n3018=;####################################################
n3019=;##  $utfenabled(#channel or nick)                 ##
n3020=;####################################################
n3021=alias  utfenabled {
n3022=  if ($1 != $null) {
n3023=    if ($version >= 6.17) { ; utf was added in 6.17
n3024=      ; if utf support is enabled at all
n3025=      if ($readini($mircini,language,utf)) {
n3026=        ; check if utf setting of specified channel / nick is set to "display and encode"
n3027=        if ($gettok($readini($mircini,fonts,f $+ $1),4,44) == 2) {
n3028=          return $true
n3029=        }
n3030=        else if ($gettok($readini($mircini,fonts,f $+ $1),4,44) == 1) {
n3031=          return $false
n3032=        }
n3033=        else if ($gettok($readini($mircini,fonts,f $+ $1),4,44) == 0) {
n3034=          return $false
n3035=        }
n3036=        else if (# isin $1) {  ; if parameter is a channel
n3037=          ; check if default utf setting for channels is set to "display and encode"
n3038=          if ($gettok($readini($mircini,fonts,fchannel),4,44) == 2) {
n3039=            return $true
n3040=          }
n3041=          else return $false
n3042=        }
n3043=        else { ; parameter is not a channel (so its a query window / nickname)
n3044=          if ($gettok($readini($mircini,fonts,fquery),4,44) == 2) {
n3045=            return $true
n3046=          }
n3047=          else return $false
n3048=        }
n3049=      }
n3050=      else return $false
n3051=    }
n3052=    else return $false
n3053=  }
n3054=  else echo -a * $ $+ utfenabled: insufficient parameters
n3055=}
n3056=*/
n3057=;;#############################################################
n3058=;;##  Below are general aliases for Foobar   (by chaosblade) ##
n3059=;;#############################################################
n3060=
n3061=alias -l playerName {
n3062=  if ($hget(gtsdll_settings,WAFolder) == $null) {
n3063=    return foobar2000
n3064=  }
n3065=  else {
n3066=    return WinAmp
n3067=  }
n3068=}
