Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 3rd, 2012  |  syntax: mIRC  |  size: 2.50 KB  |  hits: 26  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /spam {
  2.  
  3.   set %title $dll(r1dll.dll, GetCurrentWinampSong, 0)
  4.   if (%title == 0) {
  5.     /echo $active *** No supported audio player found!
  6.     return
  7.   }
  8.  
  9.   set %kbps $dll(r1dll.dll, GetCurrentWinampSongKbps, 0)
  10.   set %khz $dll(r1dll.dll, GetCurrentWinampSongKHz, 0)
  11.   set %totaltime $dll(r1dll.dll, GetCurrentWinampSongTotalTime, 0)
  12.   set %elapsedtime $dll(r1dll.dll, GetCurrentWinampSongElapsedTime, 0)
  13.   set %channels $dll(r1dll.dll, GetCurrentWinampSongChannels, 0)
  14.   set %filename $dll(r1dll.dll, GetCurrentWinampSongFileName, 0)
  15.  
  16.   set %t_mins 0
  17.   set %e_mins 0
  18.  
  19.   set %t_secs %totaltime
  20.   if (%totaltime == -1) {
  21.     set %fileformat %filename
  22.     goto totalloop
  23.   }
  24.  
  25.   set %filesize 0
  26.  
  27.   if (%filename != $null) {
  28.     set %filesize $file(%filename).size
  29.     set %filesize $round($calc(%filesize / 1024 / 1024),2)
  30.     set %fileformat $upper($gettok(%filename,-1, 46))
  31.   }
  32.  
  33.   :totalloop
  34.   if (%t_secs < 60) {
  35.     goto endtotalloop
  36.   }
  37.   inc %t_mins
  38.   dec %t_secs 60
  39.   goto totalloop
  40.   :endtotalloop
  41.  
  42.   set %e_secs %elapsedtime
  43.   :elapsedloop
  44.   if (%e_secs < 60) {
  45.     goto endelapsedloop
  46.   }
  47.   inc %e_mins
  48.   dec %e_secs 60
  49.   goto elapsedloop
  50.   :endelapsedloop
  51.  
  52.   if (%t_secs < 10) {
  53.     set %filler2 0
  54.   }
  55.   if (%e_secs < 10) {
  56.     set %filler 0
  57.   }
  58.   if (%t_secs <= 0) {
  59.     set %total_string
  60.     if (%fileformat == $null) {
  61.       set %file_string Streaming@ $+ %kbps $+ kbps
  62.       goto ihatemircselse
  63.     }
  64.     if (%kbps == 0) {
  65.       set %file_string Streaming: %filename
  66.       goto ihatemircselse
  67.     }
  68.     set %file_string Streaming: %fileformat @ $+ %kbps $+ kbps
  69.     :ihatemircselse
  70.     goto noset
  71.   }
  72.  
  73.   set %total_string %t_mins $+ : $+ %filler2 $+ %t_secs
  74.   if (%filesize != 0) {
  75.     set %file_string %fileformat $+ @ $+ %kbps $+ kbps, %filesize $+ mb
  76.     goto noset
  77.   }
  78.   set %file_string %fileformat $+ @ $+ %kbps $+ kbps
  79.   :noset
  80.   if (%foobar == 1) {
  81.     /describe $active is playing %title [foobar2k]
  82.     goto duns
  83.   }
  84.   /describe $active is playing %title $chr(91) $+ %total_string $+ $chr(124) $+ %fileformat $+ $chr(124) $+ %kbps $+ kbps $+ $chr(124) $+ $calc(%khz / 1000) $+ kHz $+ $chr(124) $+ %filesize $+ MB $+ $chr(93)
  85.   :duns
  86.   unset %filesize
  87.   unset %file_string
  88.   unset %total_string
  89.   unset %filename
  90.   unset %fileformat
  91.   unset %filler2
  92.   unset %filler
  93.   unset %e_mins
  94.   unset %e_secs
  95.   unset %title
  96.   unset %kbps
  97.   unset %khz
  98.   unset %t_mins
  99.   unset %t_secs
  100.   unset %elapsedtime
  101.   unset %totaltime
  102.   unset %channels
  103. }