Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Sep 5th, 2010 | Syntax: None | Size: 12.64 KB | Hits: 22 | Expires: Never
Copy text to clipboard
  1. ; Charset "CP949" (UHC)
  2.  
  3. ; TJetAudio CurrentlySong Show for mIRC
  4. ; JetAudio receive information from the current song output.
  5. ; Copyright (C) 2006-2007 woni | HNO3
  6.  
  7. ; Translation and further customization by CvP, Administrator, COWON America Forums.
  8.  
  9. ;
  10. ; This plugin is free software; you can redistribute it and/or
  11. ; modify it under the terms of the GNU General Public License
  12. ; as published by the Free Software Foundation; either version 2
  13. ; of the License, or (at your option) any later version.
  14. ;
  15. ; This plugin is distributed in the hope that it will be useful,
  16. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. ; GNU General Public License for more details.
  19. ;
  20. ; You should have received a copy of the GNU General Public License
  21. ; along with this plugin; if not, write to the Free Software
  22. ; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  23.  
  24. on *:load {
  25.   set %TJetAudio 1
  26.   set %TJetAudio.CurrentArtist
  27.   set %TJetAudio.CurrentTitle
  28.   set %TJetAudio.Delay 240
  29.   set %TJetAudio.Install 0
  30.  
  31.   set %TJetAudio.Version 0.4.2.2?
  32.  
  33.   TJetAudioHelp
  34. }
  35.  
  36. on *:connect {
  37. }
  38.  
  39. alias ja {
  40.   if (!$1) TJetAudioGetTitle
  41.   elseif ($1 == !TJAInstall) {
  42.     if (%TJetAudio.Install == 0) {
  43.       echo -a !TJAInstall - 07JetAudio automatically display the currently playing song On
  44.     }
  45.     TJetAudioInstall
  46.   }
  47.   elseif ($1 == !TJAInstallFixed) {
  48.     if (%TJetAudio.Install == 0) {
  49.       echo -a !TJAInstallFixed - 07JetAudio automatically display the currently playing song On [ $+ $active channels]
  50.     }
  51.     TJetAudioInstallFixed
  52.   }
  53.   elseif ($1 == !TJAInstallAll) {
  54.     if (%TJetAudio.Install == 0) {
  55.       echo -a !TJAInstallAll - 07JetAudio automatically display the currently playing song On [All Channel]
  56.     }
  57.     TJetAudioInstallAll
  58.   }
  59.   elseif ($1 == !TJAUninstall) {
  60.     if (%TJetAudio.Install != 0) {
  61.       echo -a !TJAUninstall - 07JetAudio automatically display the song currently playing Off
  62.     }
  63.     TJetAudioUninstall
  64.   }
  65.   elseif ($1 == !TJAReinstall) {
  66.     if (%TJetAudio.Install != 0) {
  67.       echo -a !TJAReinstall - 07JetAudio automatically display the currently playing song On [re]
  68.     }
  69.     TJetAudioReinstall
  70.   }
  71.   elseif ($1 == !TJAReinstallFixed) {
  72.     if (%TJetAudio.Install != 0) {
  73.       echo -a !TJAReinstallFixed - 07JetAudio automatically display the currently playing song On [ $+ $active channel re]
  74.     }
  75.     TJetAudioReinstallFixed
  76.   }
  77.   elseif ($1 == !TJAReinstallAll) {
  78.     if (%TJetAudio.Install != 0) {
  79.       echo -a !TJAReinstallAll - 07JetAudio automatically display the currently playing song On [All Channel re]
  80.     }
  81.     TJetAudioReinstallAll
  82.   }
  83.   elseif ($1 == !TJAUnloadDll) {
  84.     echo -a !TJAUnloadDll
  85.     dll -u JetAudio_GetSong.dll
  86.   }
  87.   elseif ($1 == !TJADelay) {
  88.     if ($2 == $null) || ($2 == 0) {
  89.       echo -a !TJADelay - 07JetAudio automatically display the song currently playing, the delay (default 240 seconds)
  90.       set %TJetAudio.Delay 240
  91.       TJetAudioSetDelay
  92.     }
  93.     else {
  94.       echo -a !TJADelay $2 - 07JetAudio automatically display the song currently playing, the delay
  95.       set %TJetAudio.Delay $2
  96.       TJetAudioSetDelay
  97.     }
  98.   }
  99.   elseif ($1 == !TJAHelp) {
  100.     echo -a !TJAHelp
  101.     TJetAudioHelp
  102.   }
  103. }
  104.  
  105. alias -l TJetAudioHelp {
  106.   echo -a 12TJetAudio CurrentlySong Show for mIRC %TJetAudio.Version
  107.   echo -a ¡¡¡¡04!TJAInstall: 12JetAudio display the currently playing song to turn on automatically.
  108.   echo -a ¡¡¡¡04!TJAInstallFixed: 12JetAudio automatically display the currently playing song appears only to install the channel on.
  109.   echo -a ¡¡¡¡04!TJAInstallAll: 12JetAudio automatically display the current playing song and turn it to appear on all channels.
  110.   echo -a ¡¡¡¡04!TJAUninstall: 12JetAudio automatically display the currently playing song off.
  111.   echo -a ¡¡¡¡04!TJAReinstall: 12JetAudio the currently playing song to turn off auto-show feature.
  112.   echo -a ¡¡¡¡04!TJAReinstallFixed: 12JetAudio automatically display the current song to play only to install the channel to show off and on.
  113.   echo -a ¡¡¡¡04!TJAReinstallAll: 12JetAudio automatically display the currently playing song to show off the appetizer to the channel on.
  114.   echo -a ¡¡¡¡04!TJAUnloadDll: 12TJetAudio CurrentlySong Show for mIRC to unload the plug-in DLL.
  115.   echo -a ¡¡¡¡04!TJADelay [time]: 12JetAudio automatically display the currently playing song to set the delay. If you do not enter the time value of the default (240 seconds) is set.
  116.   echo -a ¡¡¡¡04!TJAHelp: 12TJetAudio CurrentlySong Show for mIRC's help output.
  117.   echo -a ¡¡¡¡04!TJACurrent, !TC, !tc, !Á¬°î, ?c, ?°î, @c: 12JetAudio display the currently playing song manually.
  118. }
  119.  
  120. alias -l TJetAudioOpenStatus {
  121.   var %result $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_IsRunning_mIRC, $null)
  122.   if (%result == true) %result = 1
  123.   else %result = 0
  124.   return %result
  125. }
  126.  
  127. alias -l TJetAudioGetTitleReturn {
  128.   var %TJetAudioStatus $TJetAudioOpenStatus(OpenStatus)
  129.   if (%TJetAudioStatus) {
  130.     var %TJetAudioTitle $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetTitle_mIRC, $null)
  131.     return %TJetAudioTitle
  132.   }
  133.   return $null
  134. }
  135.  
  136. alias -l TJetAudioGetArtistReturn {
  137.   var %TJetAudioStatus $TJetAudioOpenStatus(OpenStatus)
  138.   if (%TJetAudioStatus) {
  139.     var %TJetAudioArtist $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetArtist_mIRC, $null)
  140.     return %TJetAudioArtist
  141.   }
  142.   return $null
  143. }
  144.  
  145. alias -l TJetAudioGetArtistTitleReturn {
  146.   var %TJetAudioStatus $TJetAudioOpenStatus(OpenStatus)
  147.   if (%TJetAudioStatus != 0) {
  148.     var %TJetAudioTitle $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetTitle_mIRC, $null)
  149.     var %TJetAudioArtist $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetArtist_mIRC, $null)
  150.     var %TJetAudioRunningTime $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetRunningTime_mIRC, $null)
  151.     var %TJetAudioPlayStatus $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetPlayStatus_mIRC, $null)
  152.     if (%TJetAudioArtist != $null) {
  153.       return %TJetAudioTemp 4[ 7jetAudio 4] 4[14 $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetTrackNumber_mIRC, $null) 4]12 %TJetAudioPlayStatus $+ :3 %TJetAudioArtist 4-9 %TJetAudioTitle 4[14 %TJetAudioRunningTime 4]
  154.     }
  155.     return %TJetAudioTemp 4[ 7jetAudio 4] 4[14 $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetTrackNumber_mIRC, $null) 4]12 %TJetAudioPlayStatus $+ :9 %TJetAudioTitle 4[14 %TJetAudioRunningTime 4]
  156.   }
  157.   return $null
  158. }
  159.  
  160. alias -l TJetAudioGetTitle {
  161.   var %TJetAudioStatus $TJetAudioOpenStatus(OpenStatus)
  162.   if (%TJetAudioStatus != 0) {
  163.     var %TJetAudioTitle $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetTitle_mIRC, $null)
  164.     var %TJetAudioArtist $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetArtist_mIRC, $null)
  165.     if ((%TJetAudioTitle == %TJetAudio.CurrentTitle) && (%TJetAudioArtist == %TJetAudio.CurrentArtist) && (%TJetAudio.Install != 0)) {
  166.       halt
  167.     }
  168.     set %TJetAudio.CurrentTitle %TJetAudioTitle
  169.     set %TJetAudio.CurrentArtist %TJetAudioArtist
  170.     var %TJetAudioArtistTitle $TJetAudioGetArtistTitleReturn()
  171.     if (%TJetAudioArtistTitle != $null) {
  172.       say %TJetAudioArtistTitle
  173.     }
  174.   }
  175. }
  176.  
  177. alias -l TJetAudioGetTitleCurrent {
  178.   var %TJetAudioStatus $TJetAudioOpenStatus(OpenStatus)
  179.   if (%TJetAudioStatus != 0) {
  180.     var %TJetAudioTitle $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetTitle_mIRC, $null)
  181.     var %TJetAudioArtist $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetArtist_mIRC, $null)
  182.     if ((%TJetAudioTitle == %TJetAudio.CurrentTitle) && (%TJetAudioArtist == %TJetAudio.CurrentArtist) && (%TJetAudio.Install != 0)) {
  183.       halt
  184.     }
  185.     set %TJetAudio.CurrentTitle %TJetAudioTitle
  186.     set %TJetAudio.CurrentArtist %TJetAudioArtist
  187.     var %TJetAudioArtistTitle $TJetAudioGetArtistTitleReturn()
  188.     if (%TJetAudioArtistTitle != $null) {
  189.       msg $active %TJetAudioArtistTitle
  190.     }
  191.   }
  192. }
  193.  
  194. alias -l TJetAudioGetTitleAll {
  195.   var %TJetAudioStatus $TJetAudioOpenStatus(OpenStatus)
  196.   if (%TJetAudioStatus) {
  197.     var %TJetAudioTitle $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetTitle_mIRC, $null)
  198.     var %TJetAudioArtist $dll(" $+ $scriptdir $+ JetAudio_GetSong.dll $+ ", JetAudio_GetArtist_mIRC, $null)
  199.     if ((%TJetAudioTitle == %TJetAudio.CurrentTitle) && (%TJetAudioArtist == %TJetAudio.CurrentArtist) && (%TJetAudio.Install != 0)) {
  200.       halt
  201.     }
  202.     set %TJetAudio.CurrentTitle %TJetAudioTitle
  203.     set %TJetAudio.CurrentArtist %TJetAudioArtist
  204.     var %TJetAudioArtistTitle $TJetAudioGetArtistTitleReturn()
  205.     if (%TJetAudioArtistTitle != $null) {
  206.       ame %TJetAudioArtistTitle
  207.     }
  208.   }
  209. }
  210.  
  211. alias -l TJetAudioSongClear {
  212.   set %TJetAudio.CurrentArtist
  213.   set %TJetAudio.CurrentTitle
  214. }
  215.  
  216. alias -l TJetAudioInstall {
  217.   if (%TJetAudio.Install != 0) {
  218.     echo $active 06 JetAudio automatically displays the song currently playing feature is On.
  219.     halt
  220.   }
  221.   TJetAudioSongClear
  222.   TJetAudioGetTitle
  223.   set %TJetAudio.Install 1
  224.   timertja 0 %TJetAudio.Delay TJetAudioGetTitleCurrent
  225. }
  226.  
  227. alias -l TJetAudioInstallFixed {
  228.   if (%TJetAudio.Install != 0) {
  229.     echo $active 06 JetAudio automatically displays the song currently playing feature is On.
  230.     halt
  231.   }
  232.   TJetAudioSongClear
  233.   TJetAudioGetTitle
  234.   set %TJetAudio.Install 3
  235.   timertja 0 %TJetAudio.Delay TJetAudioGetTitle
  236. }
  237.  
  238. alias -l TJetAudioInstallAll {
  239.   if (%TJetAudio.Install != 0) {
  240.     echo $active 06 JetAudio automatically displays the song currently playing feature is On.
  241.     halt
  242.   }
  243.   TJetAudioSongClear
  244.   TJetAudioGetTitleAll
  245.   set %TJetAudio.Install 2
  246.   timertja 0 %TJetAudio.Delay TJetAudioGetTitleAll
  247. }
  248.  
  249. alias -l TJetAudioUninstall {
  250.   if (%TJetAudio.Install == 0) {
  251.     echo $active 06JetAudio will not show the currently playing song (no automatic display).
  252.     halt
  253.   }
  254.   set %TJetAudio.Install 0
  255.   timertja off
  256. }
  257.  
  258. alias -l TJetAudioReinstall {
  259.   if (%TJetAudio.Install == 0) {
  260.     TJetAudioUninstall
  261.     halt
  262.   }
  263.   TJetAudioUninstall
  264.   TJetAudioInstall
  265. }
  266.  
  267. alias -l TJetAudioReinstallFixed {
  268.   if (%TJetAudio.Install == 0) {
  269.     TJetAudioUninstall
  270.     halt
  271.   }
  272.   TJetAudioUninstall
  273.   TJetAudioInstallFixed
  274. }
  275.  
  276. alias -l TJetAudioReinstallAll {
  277.   if (%TJetAudio.Install == 0) {
  278.     TJetAudioUninstall
  279.     halt
  280.   }
  281.   TJetAudioUninstall
  282.   TJetAudioInstallAll
  283. }
  284.  
  285. alias -l TJetAudioSetDelay {
  286.   if (%TJetAudio.Install == 1) {
  287.     TJetAudioReinstall
  288.   }
  289.   elseif (%TJetAudio.Install == 2) {
  290.     TJetAudioReinstallAll
  291.   }
  292.   elseif (%TJetAudio.Install == 3) {
  293.     TJetAudioReinstallFixed
  294.   }
  295. }
  296.  
  297. ctcp 1:TJetAudio: {
  298.   if ($2 == receive) {
  299.     notice $nick 02 is a feature currently under development.
  300.   }
  301.   elseif ($2 == artist) {
  302.     var %TJetAudioArtist = $TJetAudioGetArtistReturn()
  303.     if (%TJetAudioArtist == $null) {
  304.       notice $nick 02 Requested field is unknown.
  305.     }
  306.     else {
  307.       notice $nick (TJetAudio) 04Current Artist02 %TJetAudioArtist
  308.     }
  309.   }
  310.   elseif ($2 == title) {
  311.     var %TJetAudioTitle = $TJetAudioGetTitleReturn()
  312.     if (%TJetAudioTitle == $null) {
  313.       notice $nick 02 Requested field is unknown.
  314.     }
  315.     else {
  316.       notice $nick (TJetAudio) 04Current Title02 %TJetAudioTitle
  317.     }
  318.   }
  319.   elseif ($2 == info) || ($2 == songinfo) {
  320.     var %TJetAudioArtistTitle $TJetAudioGetArtistTitleReturn()
  321.     if (%TJetAudioArtistTitle == $null) {
  322.       notice $nick 02 Requested field is unknown.
  323.     }
  324.     else {
  325.       notice $nick $TJetAudioGetArtistTitleReturn()
  326.     }
  327.   }
  328.   elseif ($2 == help) {
  329.     notice $nick 01/ctcp12 $me 04TJetAudio receive: 02 is currently playing file.
  330.     notice $nick 01/ctcp12 $me 04TJetAudio artist: 02 currently playing song's artist is displayed.
  331.     notice $nick 01/ctcp12 $me 04TJetAudio title: 02 currently playing song's title is displayed.
  332.     notice $nick 01/ctcp12 $me 04TJetAudio info, 01/ctcp12 $me 04TJetAudio songinfo: 02 currently playing song's artist and title are displayed.
  333.     notice $nick 01/ctcp12 $me 04TJetAudio help: 02 tips to display.
  334.   }
  335.   elseif ($2 == $null) {
  336.     notice $nick 04 Please enter the command notice
  337.     notice $nick 01/ctcp12 $me 04TJetAudio help2 can be viewed as a help.
  338.   }
  339.   else {
  340.     notice $nick 04 $+ $2 $+ is a free command.
  341.     notice $nick 01/ctcp12 $me 04TJetAudio help2 can be viewed as a help.
  342.   }
  343. }