home *** CD-ROM | disk | FTP | other *** search
/ napalm.napnet.hu / 2015-02-12.napalm.napnet.hu.tar / napalm.napnet.hu / programok / kommunikacio / mpp700.exe / WinAmp2mIRC.mrc < prev    next >
Text File  |  2003-05-23  |  27KB  |  805 lines

  1. dialog wa2mIRCSetup {
  2.   title "Winamp2mIRC addon for SystemInfo by C}{$, modified by Task"
  3.   size -1 -1 250 157
  4.   option dbu
  5.   tab "Options", 21, 2 2 245 132
  6.   text "Just type /song when a file is playing in winamp and your sorted.", 3, 47 19 156 8, tab 21
  7.   edit "", 4, 48 29 155 10, tab 21 autohs
  8.   text "Change the prefix of the information in the above box.", 5, 50 41 152 8, tab 21 center
  9.   check "Display Length", 12, 47 51 48 10, tab 21
  10.   check "Display BitRate", 7, 95 51 48 10, tab 21
  11.   check "Display Sample Rate", 13, 143 51 61 10, tab 21
  12.   radio "Use /me", 20, 47 61 33 10, tab 21
  13.   radio "Use /ame", 23, 83 61 35 10, tab 21
  14.   radio "Use /say", 29, 125 61 34 10, tab 21
  15.   radio "Use /amsg", 34, 166 61 38 10, tab 21
  16.   box "Auto Song", 36, 10 71 231 22, tab 21
  17.   check "Enable Auto-song", 24, 42 79 54 10, tab 21
  18.   button "Channels", 33, 98 77 37 13, tab 21
  19.   check "Active channel Auto-song", 35, 139 79 77 10, tab 21
  20.   box "Remote Song", 17, 5 93 240 31, tab 21
  21.   check "Enable Remote Song via /ctcp NICKNAME WinAmp2mIRC", 16, 8 101 148 10, tab 21
  22.   text "Remote Song prefix:", 14, 8 113 51 8, tab 21
  23.   edit "", 15, 60 111 182 10, tab 21 autohs
  24.   tab "About", 22
  25.   text "Links:", 25, 49 16 16 8, tab 22
  26.   link "http://www.phucknut.net/scripts", 26, 49 25 81 8, tab 22
  27.   text "- Website for other scripts", 30, 130 25 67 8, tab 22
  28.   link "irchs@btinternet.com", 28, 49 33 53 8, tab 22
  29.   text "- CHS' e-mail address", 31, 102 33 55 8, tab 22
  30.   link "AdamTasker@gubm.com", 27, 49 41 60 8, tab 22
  31.   text "- Task's e-mail address", 32, 110 41 57 8, tab 22
  32.   text "All of this is done using the WinampToMirc.dll. This addon was created by C}{$", 8, 29 72 191 8, tab 22
  33.   link "(irchs@btinternet.com)", 10, 16 82 56 8, tab 22
  34.   text "modified by Task", 9, 73 82 40 8, tab 22
  35.   link "(AdamTasker@gubm.com)", 18, 114 82 64 8, tab 22
  36.   text "and dll by Scott Rennie", 6, 178 82 56 8, tab 22
  37.   text "Please report bugs to the e-mail address provided.", 11, 63 92 126 8, tab 22
  38.   button "E&xit and Save", 2, 65 138 39 16, ok
  39.   button "&Cancel", 19, 106 138 39 16, cancel
  40.   button "&Unload Addon", 1, 147 138 39 16
  41. }
  42.  
  43.  
  44. dialog wa2mIRCChannels {
  45.   title "Channels"
  46.   size -1 -1 96 93
  47.   option dbu
  48.   check "Enabled channel exclusion/inclusion", 1, 1 2 95 10
  49.   radio "Exclude these channels", 2, 1 11 70 10
  50.   radio "Include these channels", 3, 1 20 90 10
  51.   edit "", 4, 0 32 72 10, autohs
  52.   button "&Add", 5, 73 31 22 12
  53.   list 6, 0 42 72 50, size
  54.   button "&Del", 7, 73 45 22 12
  55.   button "&Save", 9, 73 59 22 12
  56.   button "E&xit", 8, 73 80 22 12, ok cancel
  57. }
  58.  
  59. dialog wa2mircunload {
  60.   title "Alert!"
  61.   size -1 -1 142 41
  62.   option dbu
  63.   text "Are you sure you want unload WinAmp2mIRC", 1, 15 1 113 8
  64.   text "Version 1.1b?! Doing this will lose all your", 2, 23 9 98 8
  65.   text "settings for the addon. Do you wish to continue?!", 3, 11 17 120 8
  66.   button "Yes!", 4, 34 27 37 12, ok
  67.   button "No!", 5, 74 27 37 12, cancel
  68. }
  69.  
  70. on 1:dialog:wa2mIRCSetup:init:*:{
  71.   if (%wa2mIRC.messagetype == $null) {
  72.     set %wa2mIRC.messagetype /me
  73.   }
  74.   did -a wa2mIRCSetup 4 %wa2mIRC.prefix
  75.   did -a wa2mIRCSetup 15 %wa2mIRC.RSprefix
  76.   if ( %wa2mIRC.length == on ) {
  77.     did -c wa2mIRCSetup 12
  78.   }
  79.   if ( %wa2mIRC.bitrate == on ) {
  80.     did -c wa2mIRCSetup 7
  81.   }
  82.   if ( %wa2mIRC.samplerate == on ) {
  83.     did -c wa2mIRCSetup 13
  84.   }
  85.   if ( %wa2mIRC.RemoteSong == on ) {
  86.     did -c wa2mIRCSetup 16
  87.   }
  88.   if ( %wa2mIRC.RemoteSong == off ) {
  89.     did -b wa2mIRCSetup 15
  90.   }
  91.   if (%wa2mIRC.Autosong == on) {
  92.     did -c wa2mIRCSetup 24
  93.   }
  94.   if (%WA2mIRC.ActiveAutosong == on) {
  95.     did -c WA2mIRCSetup 35
  96.   }
  97.   if (%WA2mIRC.AutoSong == off) {
  98.     did -b WA2mIRCSetup 33
  99.     did -b WA2mIRCSetup 35
  100.   }
  101.   if ((%WA2mIRC.AutoSong == on) && (%WA2mIRC.ActiveAutosong == on)) {
  102.     did -b WA2mIRCSetup 33
  103.   }
  104.   if ( %wa2mIRC.messagetype == /me ) {
  105.     did -c wa2mIRCSetup 20
  106.   }
  107.   if ( %wa2mIRC.messagetype == /ame ) {
  108.     did -c wa2mIRCSetup 23
  109.   }
  110.   if ( %wa2mIRC.messagetype == /say ) {
  111.     did -c wa2mIRCSetup 29
  112.   }
  113.   if ( %wa2mIRC.messagetype == /amsg ) {
  114.     did -c wa2mIRCSetup 34
  115.   }
  116.   .set %wa2mIRC.version Version 1.1b
  117.   writeini " $+ $scriptdirSystemInfo.ini $+ " wa2mIRC name WinAmp2mIRC by C}{$/Task/Deadpool
  118.   writeini " $+ $scriptdirSystemInfo.ini $+ " wa2mIRC command /wa2mircsetup
  119.   writeini " $+ $scriptdirSystemInfo.ini $+ " wa2mIRC version Version 1.1b
  120. }
  121.  
  122. on 1:dialog:wa2mIRCSetup:sclick:2:{
  123.   set %wa2mIRC.buffer $did(4).text
  124.   set %wa2mIRC.Prefix $strip(%wa2mIRC.buffer,burc)
  125.   set %wa2mIRC.buffer $did(15).text
  126.   set %wa2mIRC.RSprefix $strip(%wa2mIRC.buffer,burc)
  127.   if ( $did(12).state >= 1 ) {
  128.     set %wa2mIRC.length on
  129.   }
  130.   else {
  131.     set %wa2mIRC.length off
  132.   }
  133.   if ( $did(7).state >= 1 ) {
  134.     set %wa2mIRC.bitrate on
  135.   }
  136.   else {
  137.     set %wa2mIRC.bitrate off
  138.   }
  139.   if ( $did(13).state >= 1 ) {
  140.     set %wa2mIRC.samplerate on
  141.   }
  142.   else {
  143.     set %wa2mIRC.samplerate off
  144.   }
  145.   if ( $did(16).state >= 1 ) {
  146.     set %wa2mIRC.RemoteSong on
  147.   }
  148.   else {
  149.     set %wa2mIRC.RemoteSong off
  150.   }
  151.   if ( $did(35).state >= 1 ) {
  152.     set %WA2mIRC.ActiveAutosong on
  153.   }
  154.   else {
  155.     set %WA2mIRC.ActiveAutosong off
  156.   }
  157.   if ( $did(20).state >= 1 ) {
  158.     set %wa2mIRC.messagetype /me
  159.   }
  160.   if ( $did(23).state >= 1 ) {
  161.     set %wa2mIRC.messagetype /ame
  162.   }
  163.   if ( $did(29).state >= 1 ) {
  164.     set %wa2mIRC.messagetype /say
  165.   }
  166.   if ( $did(34).state >= 1 ) {
  167.     set %wa2mIRC.messagetype /amsg
  168.   }
  169.   if ( $did(24).state >= 1 ) {
  170.     set %wa2mIRC.Autosong on
  171.     scid 1 .timerCheckWinamp -io 0 1 /checkwinamp
  172.   }
  173.   else {
  174.     set %wa2mIRC.Autosong off
  175.     scid 1 .timerCheckWinamp off
  176.   }
  177.   if ((%Wa2mIRC.ActiveAutosong == on) || (%wa2mirc.enablechannelfilter == $null)) {
  178.     set %wa2mirc.enablechannelfilter 0
  179.   }
  180. }
  181.  
  182. on 1:dialog:wa2mIRCSetup:sclick:1:{
  183.   /dialog -x wa2mIRCSetup wa2mIRCSetup
  184.   /dialog -m wa2mircunload wa2mircunload
  185. }
  186.  
  187. on 1:dialog:wa2mIRCSetup:sclick:16:{
  188.   if ( $did(wa2mIRCSetup,16).state == 0 ) {
  189.     did -b wa2mIRCSetup 15
  190.   }
  191.   else {
  192.     did -e wa2mIRCSetup 15
  193.   }
  194. }
  195.  
  196. on 1:dialog:WA2mIRCSetup:sclick:24:{
  197.   if ( $did(WA2mIRCSetup,24).state == 0 ) {
  198.     did -b WA2mIRCSetup 33
  199.     did -b WA2mIRCSetup 35
  200.   }
  201.   else {
  202.     if ($did(WA2mIRCSetup,35).state == 1) {
  203.       did -b WA2mIRCSetup 33
  204.     }
  205.     else {
  206.       did -e WA2mIRCSetup 33
  207.     }
  208.     did -e WA2mIRCSetup 35
  209.   }
  210. }
  211.  
  212. on 1:dialog:WA2mIRCSetup:sclick:35:{
  213.   if ( $did(WA2mIRCSetup,35).state == 1 ) {
  214.     did -b WA2mIRCSetup 33
  215.   }
  216.   else {
  217.     did -e WA2mIRCSetup 33
  218.   }
  219. }
  220.  
  221. on 1:dialog:wa2mIRCSetup:sclick:10,28:{
  222.   /run mailto://irchs@btinternet.com
  223. }
  224.  
  225. on 1:dialog:wa2mIRCSetup:sclick:18,27:{
  226.   /run mailto://AdamTasker@gubm.com
  227. }
  228.  
  229. on 1:dialog:wa2mIRCSetup:sclick:26:{
  230.   /run http://www.phucknut.net/scripts
  231. }
  232.  
  233.  
  234. on 1:dialog:wa2mIRCSetup:sclick:33:{
  235.   dialog -m wa2mIRCChannels wa2mIRCChannels
  236. }
  237.  
  238. on 1:dialog:wa2mircunload:sclick:4:{
  239.   unset %wa2mIRC.*
  240.   /echo -a 2*** WinAmp2mIRC Addon unloaded.
  241.   remini " $+ $scriptdirSystemInfo.ini $+ " wa2mIRC
  242.   unload -rs " $+ $script $+ "
  243. }
  244.  
  245. on *:DIALOG:wa2mIRCChannels:INIT:*:{
  246.   tokenize 44 %wa2mIRC.Channels
  247.   set %wa2mIRC.Count 1
  248.   while ( $eval($ $+ %wa2mIRC.Count,2) != $null ) {
  249.     did -a wa2mIRCChannels 6 $eval($ $+ %wa2mIRC.Count,2)
  250.     inc %wa2mIRC.Count
  251.   }
  252.  
  253.   if ( %wa2mIRC.EnableChannelFilter == 1 ) {
  254.     did -c wa2mIRCChannels 1
  255.   }
  256.   if ( %wa2mIRC.ChannelFilterMode == exclude ) {
  257.     did -c wa2mIRCChannels 2
  258.   }
  259.   else {
  260.     did -c wa2mIRCChannels 3
  261.   }
  262. }
  263.  
  264. on *:DIALOG:wa2mIRCChannels:sclick:5:{
  265.   if (($left($did(4).text,1) == $eval(#,0)) && ($findtok($didtok(wa2mIRCChannels,6),$did(4).text,44) == $null)) {
  266.     did -a wa2mIRCChannels 6 $did(4).text
  267.   }
  268. }
  269.  
  270. on *:DIALOG:wa2mIRCChannels:sclick:7:{
  271.   if ( $did(wa2mIRCChannels,6).sel != $null ) {
  272.     did -d wa2mIRCChannels 6 $did(wa2mIRCChannels,6).sel
  273.   }
  274. }
  275.  
  276. on *:DIALOG:wa2mIRCChannels:sclick:9:{
  277.  
  278.   if ( $did(wa2mIRCChannels,1).state >= 1 ) {
  279.     set %wa2mIRC.EnableChannelFilter 1
  280.   }
  281.   else {
  282.     set %wa2mIRC.EnableChannelFilter 0
  283.   }
  284.  
  285.   if ( $did(wa2mIRCChannels,2).state >= 1 ) {
  286.     set %wa2mIRC.ChannelFilterMode exclude
  287.   }
  288.  
  289.   if ( $did(wa2mIRCChannels,3).state >= 1 ) {
  290.     set %wa2mIRC.ChannelFilterMode include
  291.   }
  292.  
  293.   set %wa2mIRC.count 1
  294.   unset %wa2mIRC.buffer2
  295.   while ( $did(6,%wa2mIRC.count).text != $null ) {
  296.     if ( %wa2mIRC.buffer2 == $null ) {
  297.       set %wa2mIRC.buffer2 $did(6,%wa2mIRC.count).text
  298.     }
  299.     else {
  300.       set %wa2mIRC.buffer2 %wa2mIRC.buffer2 $+ , $+ $did(6,%wa2mIRC.count).text
  301.     }
  302.     inc %wa2mIRC.count
  303.   }
  304.  
  305.   if ( %wa2mIRC.buffer2 != $null ) {
  306.     set %wa2mIRC.Channels %wa2mIRC.buffer2
  307.   }
  308.  
  309. }
  310.  
  311. on *:LOAD:{
  312.  
  313.   if ( $isalias(syssetup) != $true ) {
  314.     /echo -ae 2*** There has been an error loading WinAmp2mIRC.  Please check that SystemInfo by C}{$ has been loaded.
  315.     /unload -rs " $+ $script $+ "
  316.   }
  317.  
  318.   if (%wa2mIRC.prefix == $null) /set %wa2mIRC.prefix is currently listening to
  319.   if (%wa2mIRC.RSPrefix == $null) /set %wa2mIRC.RSprefix I'm currently listening to
  320.   if (%wa2mIRC.length == $null) /set %wa2mIRC.length on
  321.   if (%wa2mIRC.bitrate == $null) /set %wa2mIRC.bitrate on
  322.   if (%wa2mIRC.samplerate == $null) /set %wa2mIRC.samplerate on
  323.   if (%wa2mIRC.RemoteSong == $null) /set %wa2mIRC.RemoteSong on
  324.   if (%wa2mIRC.Autosong == $null) /set %wa2mIRC.Autosong off
  325.   if (%wa2mIRC.messagetype == $null) /set %wa2mIRC.messagetype /me
  326.  
  327.   if ( %sys.simpleversion < 0.5 ) {
  328.     /echo -ae 2*** There has been an error loading WinAmp2mIRC. Please grab the latest version of SystemInfo by C}{$ from http://www.phucknut.net/scripts/
  329.     /unload -rs " $+ $script $+ "
  330.   }
  331.  
  332.   .set %wa2mIRC.version Version 1.1b
  333.   writeini " $+ $scriptdirSystemInfo.ini $+ " wa2mIRC name Winamp2mIRC By C}{$/Task
  334.   writeini " $+ $scriptdirSystemInfo.ini $+ " wa2mIRC command /wa2mIRCSetup
  335.   writeini " $+ $scriptdirSystemInfo.ini $+ " wa2mIRC version Version 1.1b
  336.   /echo -ae 2*** WinAmp2mIRC by C}{$/Task was loaded sucessfully.
  337.   /wa2mIRCSetup
  338.  
  339.   :veryend
  340. }
  341.  
  342. on *:CONNECT:{
  343.   if (%wa2mIRC.Autosong == on) {
  344.     scid 1 .timerCheckWinamp -io 0 1 /checkwinamp
  345.   }
  346. }
  347.  
  348. ctcp *:WINAMP2MIRC:*:{
  349.   if (%wa2mIRC.RemoteSong == off) { 
  350.     goto veryend 
  351.   }
  352.   if (%wa2mIRC.RemoteSong == on) {
  353.     setupcolours
  354.     wa2mircoutputstuff
  355.     if ( %sys.removeALLformatting == 1 ) {
  356.       ctcpreply $nick WINAMP2MIRC $strip(%wa2mIRC.output,burc)
  357.     }
  358.     else {
  359.       ctcpreply $nick WINAMP2MIRC %wa2mIRC.output
  360.     }
  361.   }
  362.   :veryend
  363. }
  364.  
  365. alias -l WA2MFilterMessage {
  366.   if ( $1 == -d ) {
  367.  
  368.     if ( $2 == exclude ) {
  369.  
  370.       if ( $scid(0) != $null ) {
  371.         set %wa2mIRC.servercount 0
  372.  
  373.         while ( %wa2mIRC.servercount < $scid(0) ) {
  374.           inc %wa2mIRC.servercount
  375.           .scid -s $scon(%wa2mIRC.servercount)
  376.           unset %wa2mIRC.channelbuffer
  377.           set %wa2mIRC.count 0
  378.           while ( %wa2mIRC.count < $chan(0) ) {
  379.             inc %wa2mIRC.count
  380.             if ( $findtok($3,$chan(%wa2mIRC.count),1,44) == $null ) {
  381.               if ( %wa2mIRC.channelbuffer == $null ) {
  382.                 set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  383.               }
  384.               else {
  385.                 set %wa2mIRC.temp %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  386.                 if ( $len(%wa2mIRC.temp) > 60 ) {
  387.  
  388.                   describe %wa2mIRC.channelbuffer $4-
  389.                   unset %wa2mIRC.channelbuffer
  390.                   set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  391.                 }
  392.                 else {
  393.                   set %wa2mIRC.channelbuffer %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  394.                 }
  395.               }
  396.             }
  397.  
  398.  
  399.           }
  400.           if ( %wa2mIRC.channelbuffer != $null ) {
  401.             describe %wa2mIRC.channelbuffer $4-
  402.           }
  403.         }
  404.         ;END FIRST WHILE
  405.  
  406.       }
  407.       ;ELSE FOR NO MULTISERVER
  408.       else {
  409.         unset %wa2mIRC.channelbuffer
  410.         set %wa2mIRC.count 0
  411.         while ( %wa2mIRC.count < $chan(0) ) {
  412.           inc %wa2mIRC.count
  413.           if ( $findtok($3,$chan(%wa2mIRC.count),1,44) == $null ) {
  414.             if ( %wa2mIRC.channelbuffer == $null ) {
  415.               set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  416.             }
  417.             else {
  418.               set %wa2mIRC.temp %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  419.               if ( $len(%wa2mIRC.temp) > 60 ) {
  420.  
  421.                 describe %wa2mIRC.channelbuffer $4-
  422.                 unset %wa2mIRC.channelbuffer
  423.                 set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  424.               }
  425.               else {
  426.                 set %wa2mIRC.channelbuffer %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  427.               }
  428.             }
  429.           }
  430.  
  431.  
  432.         }
  433.         if ( %wa2mIRC.channelbuffer != $null ) {
  434.           describe %wa2mIRC.channelbuffer $4-
  435.         }
  436.       }
  437.  
  438.     }
  439.  
  440.     ;ELSE FOR INCLUDE CODE
  441.     else {
  442.       if ( $scid(0) != $null ) {
  443.         set %wa2mIRC.servercount 0
  444.  
  445.         while ( %wa2mIRC.servercount < $scid(0) ) {
  446.           inc %wa2mIRC.servercount
  447.           .scid -s $scon(%wa2mIRC.servercount)
  448.           unset %wa2mIRC.channelbuffer
  449.           set %wa2mIRC.count 0
  450.           while ( %wa2mIRC.count < $chan(0) ) {
  451.             inc %wa2mIRC.count
  452.             if ( $findtok($3,$chan(%wa2mIRC.count),1,44) != $null ) {
  453.               if ( %wa2mIRC.channelbuffer == $null ) {
  454.                 set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  455.               }
  456.               else {
  457.                 set %wa2mIRC.temp %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  458.                 if ( $len(%wa2mIRC.temp) > 60 ) {
  459.  
  460.                   describe %wa2mIRC.channelbuffer $4-
  461.                   unset %wa2mIRC.channelbuffer
  462.                   set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  463.                 }
  464.                 else {
  465.                   set %wa2mIRC.channelbuffer %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  466.                 }
  467.               }
  468.             }
  469.  
  470.  
  471.           }
  472.           if ( %wa2mIRC.channelbuffer != $null ) {
  473.             describe %wa2mIRC.channelbuffer $4-
  474.           }
  475.         }
  476.         ;END FIRST WHILE
  477.  
  478.       }
  479.       ;ELSE FOR NO MULTISERVER
  480.       else {
  481.         unset %wa2mIRC.channelbuffer
  482.         set %wa2mIRC.count 0
  483.         while ( %wa2mIRC.count < $chan(0) ) {
  484.           inc %wa2mIRC.count
  485.           if ( $findtok($3,$chan(%wa2mIRC.count),1,44) != $null ) {
  486.             if ( %wa2mIRC.channelbuffer == $null ) {
  487.               set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  488.             }
  489.             else {
  490.               set %wa2mIRC.temp %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  491.               if ( $len(%wa2mIRC.temp) > 60 ) {
  492.  
  493.                 describe %wa2mIRC.channelbuffer $4-
  494.                 unset %wa2mIRC.channelbuffer
  495.                 set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  496.               }
  497.               else {
  498.                 set %wa2mIRC.channelbuffer %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  499.               }
  500.             }
  501.           }
  502.  
  503.  
  504.         }
  505.         if ( %wa2mIRC.channelbuffer != $null ) {
  506.           describe %wa2mIRC.channelbuffer $4-
  507.         }
  508.       }
  509.       ;END INCLUDE SHITE
  510.     }
  511.     ;END DESCRIBE STUFF
  512.     elseif ( $1 == -m ) {
  513.       if ( $2 == exclude ) {
  514.  
  515.         if ( $scid(0) != $null ) {
  516.           set %wa2mIRC.servercount 0
  517.  
  518.           while ( %wa2mIRC.servercount < $scid(0) ) {
  519.             inc %wa2mIRC.servercount
  520.             .scid -s $scon(%wa2mIRC.servercount)
  521.             unset %wa2mIRC.channelbuffer
  522.             set %wa2mIRC.count 0
  523.             while ( %wa2mIRC.count < $chan(0) ) {
  524.               inc %wa2mIRC.count
  525.               if ( $findtok($3,$chan(%wa2mIRC.count),1,44) == $null ) {
  526.                 if ( %wa2mIRC.channelbuffer == $null ) {
  527.                   set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  528.                 }
  529.                 else {
  530.                   set %wa2mIRC.temp %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  531.                   if ( $len(%wa2mIRC.temp) > 60 ) {
  532.  
  533.                     msg %wa2mIRC.channelbuffer $4-
  534.                     unset %wa2mIRC.channelbuffer
  535.                     set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  536.                   }
  537.                   else {
  538.                     set %wa2mIRC.channelbuffer %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  539.                   }
  540.                 }
  541.               }
  542.  
  543.  
  544.             }
  545.             if ( %wa2mIRC.channelbuffer != $null ) {
  546.               msg %wa2mIRC.channelbuffer $4-
  547.             }
  548.           }
  549.           ;END FIRST WHILE
  550.  
  551.         }
  552.         ;ELSE FOR NO MULTISERVER
  553.         else {
  554.           unset %wa2mIRC.channelbuffer
  555.           set %wa2mIRC.count 0
  556.           while ( %wa2mIRC.count < $chan(0) ) {
  557.             inc %wa2mIRC.count
  558.             if ( $findtok($3,$chan(%wa2mIRC.count),1,44) == $null ) {
  559.               if ( %wa2mIRC.channelbuffer == $null ) {
  560.                 set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  561.               }
  562.               else {
  563.                 set %wa2mIRC.temp %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  564.                 if ( $len(%wa2mIRC.temp) > 60 ) {
  565.  
  566.                   msg %wa2mIRC.channelbuffer $4-
  567.                   unset %wa2mIRC.channelbuffer
  568.                   set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  569.                 }
  570.                 else {
  571.                   set %wa2mIRC.channelbuffer %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  572.                 }
  573.               }
  574.             }
  575.  
  576.  
  577.           }
  578.           if ( %wa2mIRC.channelbuffer != $null ) {
  579.             msg %wa2mIRC.channelbuffer $4-
  580.           }
  581.         }
  582.  
  583.       }
  584.       ;ELSE FOR INCLUDE CODE
  585.       else {
  586.         if ( $scid(0) != $null ) {
  587.           set %wa2mIRC.servercount 0
  588.  
  589.           while ( %wa2mIRC.servercount < $scid(0) ) {
  590.             inc %wa2mIRC.servercount
  591.             .scid -s $scon(%wa2mIRC.servercount)
  592.             unset %wa2mIRC.channelbuffer
  593.             set %wa2mIRC.count 0
  594.             while ( %wa2mIRC.count < $chan(0) ) {
  595.               inc %wa2mIRC.count
  596.               if ( $findtok($3,$chan(%wa2mIRC.count),1,44) != $null ) {
  597.                 if ( %wa2mIRC.channelbuffer == $null ) {
  598.                   set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  599.                 }
  600.                 else {
  601.                   set %wa2mIRC.temp %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  602.                   if ( $len(%wa2mIRC.temp) > 60 ) {
  603.  
  604.                     msg %wa2mIRC.channelbuffer $4-
  605.                     unset %wa2mIRC.channelbuffer
  606.                     set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  607.                   }
  608.                   else {
  609.                     set %wa2mIRC.channelbuffer %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  610.                   }
  611.                 }
  612.               }
  613.  
  614.  
  615.             }
  616.             if ( %wa2mIRC.channelbuffer != $null ) {
  617.               msg %wa2mIRC.channelbuffer $4-
  618.             }
  619.           }
  620.           ;END FIRST WHILE
  621.  
  622.         }
  623.         ;ELSE FOR NO MULTISERVER
  624.         else {
  625.           unset %wa2mIRC.channelbuffer
  626.           set %wa2mIRC.count 0
  627.           while ( %wa2mIRC.count < $chan(0) ) {
  628.             inc %wa2mIRC.count
  629.             if ( $findtok($3,$chan(%wa2mIRC.count),1,44) != $null ) {
  630.               if ( %wa2mIRC.channelbuffer == $null ) {
  631.                 set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  632.               }
  633.               else {
  634.                 set %wa2mIRC.temp %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  635.                 if ( $len(%wa2mIRC.temp) > 60 ) {
  636.  
  637.                   msg %wa2mIRC.channelbuffer $4-
  638.                   unset %wa2mIRC.channelbuffer
  639.                   set %wa2mIRC.channelbuffer $chan(%wa2mIRC.count)
  640.                 }
  641.                 else {
  642.                   set %wa2mIRC.channelbuffer %wa2mIRC.channelbuffer $+ , $+ $chan(%wa2mIRC.count)
  643.                 }
  644.               }
  645.             }
  646.  
  647.  
  648.           }
  649.           if ( %wa2mIRC.channelbuffer != $null ) {
  650.             msg %wa2mIRC.channelbuffer $4-
  651.           }
  652.         }
  653.         ;END INCLUDE SHITE
  654.       }
  655.     }
  656.     else {
  657.       echo invalid identifiers specified
  658.     }
  659.  
  660.   }
  661. }
  662.  
  663. alias uninstallwa2mirc {
  664.   dialog -m wa2mircunload wa2mircunload
  665. }
  666.  
  667. alias wa2mIRCSetup {
  668.   dialog -m wa2mIRCSetup wa2mIRCSetup
  669. }
  670.  
  671. alias wa2 song
  672. alias song {
  673.   if (%wa2mIRC.messagetype == $null) {
  674.     set %wa2mIRC.messagetype /me
  675.   }
  676.   setupcolours
  677.   wa2mircoutputstuff
  678.   if ( %sys.removeALLformatting == 1 ) {
  679.     %wa2mirc.messagetype $strip(%wa2mIRC.output,burc)
  680.   }
  681.   else {
  682.     %wa2mIRC.messagetype %wa2mIRC.output
  683.   }
  684. }
  685.  
  686. alias -l wa2mircoutputstuff {
  687.   set %wa2mIRC.output %sys.BoldHeader $+ %sys.UnderLineHeader $+  $+ %sys.HeadColourVar $+ %wa2mIRC.Prefix $+ %sys.UnderLineHeader $+ %sys.BoldHeader $+ : %sys.Underlineenc $+  $+ %sys.encColourVar $+ %sys.Boldenc $+ %sys.encLeftvar $+ %sys.Underlineenc $+ %sys.Boldenc $+  $+ %sys.ValueColourVar $+ %sys.UnderLineValue $+ %sys.BoldValue $+  $+ $+ $right($dll( $scriptdir $+ winamptomirc.dll, GetTitle, _ ),-1) $+ $+ %sys.UnderLineValue $+  $+ %sys.BoldValue $+ %sys.Underlineenc $+ %sys.Boldenc $+  $+ %sys.encColourVar $+ %sys.encRightvar  $+ %sys.Underlineenc $+ %sys.Boldenc 
  688.   if (%wa2mIRC.length == on) { 
  689.     set %wa2mIRC.output %wa2mIRC.output %sys.Boldsep $+ %sys.Underlinesep $+  $+ %sys.sepColourvar $+ %sys.sepWith $+ %sys.Boldsep $+  $+ %sys.Underlinesep %sys.BoldHeader $+ %sys.UnderLineHeader $+  $+ %sys.HeadColourVar $+ Length $+ %sys.UnderLineHeader $+ %sys.BoldHeader $+ : %sys.Underlineenc $+  $+ %sys.encColourVar $+ %sys.Boldenc $+ %sys.encLeftvar $+ %sys.Underlineenc $+ %sys.Boldenc $+  $+ %sys.ValueColourVar $+ %sys.UnderLineValue $+ %sys.BoldValue $+ $+ $dll( $scriptdir $+ winamptomirc.dll, GetLength, _ ) $+ $+ %sys.UnderLineValue $+  $+ %sys.BoldValue $+ %sys.Underlineenc $+ %sys.Boldenc $+  $+ %sys.encColourVar $+ %sys.encRightvar  $+ %sys.Underlineenc $+ %sys.Boldenc 
  690.   }
  691.   if (%wa2mIRC.bitrate == on) { 
  692.     set %wa2mIRC.output %wa2mIRC.output %sys.Boldsep $+ %sys.Underlinesep $+  $+ %sys.sepColourvar $+ %sys.sepWith $+ %sys.Boldsep $+  $+ %sys.Underlinesep %sys.BoldHeader $+ %sys.UnderLineHeader $+  $+ %sys.HeadColourVar $+ BitRate $+ %sys.UnderLineHeader $+ %sys.BoldHeader $+ : %sys.Underlineenc $+  $+ %sys.encColourVar $+ %sys.Boldenc $+ %sys.encLeftvar $+ %sys.Underlineenc $+ %sys.Boldenc $+  $+ %sys.ValueColourVar $+ %sys.UnderLineValue $+ %sys.BoldValue $+ $+ $dll( $scriptdir $+ winamptomirc.dll, GetBitRate, _ ) $+ $+ %sys.UnderLineValue $+  $+ %sys.BoldValue $+ %sys.Underlineenc $+ %sys.Boldenc $+  $+ %sys.encColourVar $+ %sys.encRightvar  $+ %sys.Underlineenc $+ %sys.Boldenc 
  693.   }
  694.   if (%wa2mIRC.samplerate == on) { 
  695.     set %wa2mIRC.output %wa2mIRC.output %sys.Boldsep $+ %sys.Underlinesep $+  $+ %sys.sepColourvar $+ %sys.sepWith $+ %sys.Boldsep $+  $+ %sys.Underlinesep %sys.BoldHeader $+ %sys.UnderLineHeader $+  $+ %sys.HeadColourVar $+ Sample Rate $+ %sys.UnderLineHeader $+ %sys.BoldHeader $+ : %sys.Underlineenc $+  $+ %sys.encColourVar $+ %sys.Boldenc $+ %sys.encLeftvar $+ %sys.Underlineenc $+ %sys.Boldenc $+  $+ %sys.ValueColourVar $+ %sys.UnderLineValue $+ %sys.BoldValue $+ $dll( $scriptdir $+ winamptomirc.dll, GetSampleRate, _ ) $+ %sys.UnderLineValue $+  $+ %sys.BoldValue $+ %sys.Underlineenc $+ %sys.Boldenc $+  $+ %sys.encColourVar $+ %sys.encRightvar  $+ %sys.Underlineenc $+ %sys.Boldenc 
  696.   }
  697. }
  698.  
  699. alias -l wa2mircfilterstuff {
  700.   if (%WA2mIRC.automessagetype == /me) {
  701.     set %WA2mIRC.filter -d
  702.   }
  703.   if (%WA2mIRC.automessagetype == /say) {
  704.     set %WA2mIRC.filter -m
  705.   }
  706. }
  707.  
  708. menu channel {
  709.   Media Overkill
  710.   .WinAmp2mIRC
  711.   ..Winamp2 Setup (/wa2mIRCSetup):/wa2mIRCSetup
  712.   ..Winamp2 Song Report (/wa2 or /song):/song
  713.   .-
  714.   .WinAmp3mIRC
  715.   ..Setup Helper (/WA3setup):/WA3setup
  716.   ..Winamp3 Setup (/WA3mIRCSetup):/WA3mIRCSetup
  717.   ..Winamp3 Song Report (/wa3):/song
  718.   ..-
  719.   ;  .Reload Script:.timer 1 1 /wa2mIRCSetup | /reload -rs " $+ $script $+ "
  720.   ;  .Completely Unload:/uninstallwa2mirc
  721. }
  722.  
  723. menu query {
  724.   Media Overkill
  725.   .WinAmp2mIRC
  726.   ..Setup (/WA2mIRCSetup):/wa2mIRCSetup
  727.   ..-
  728.   ..Remote Song
  729.   ...View Song:ctcp $1 WINAMP2MIRC
  730.   ..-
  731.   ..OMFG SONG (/Song):/song
  732.   .-
  733.   ; .Reload Script:.timer 1 1 /wa2mIRCSetup | /reload -rs " $+ $script $+ "
  734.   ; .Completely Unload:/uninstallwa2mirc
  735. }
  736.  
  737. menu nicklist {
  738.   -
  739.   Media Overkill
  740.   .WinAmp2mIRC
  741.   ..Setup (/wa2mIRCSetup):/wa2mIRCSetup
  742.   ..-
  743.   ..Remote Song
  744.   ...View Song:ctcp $1 WINAMP2MIRC
  745.   .-
  746.   ;.Reload Script:.timer 1 1 /wa2mIRCSetup | /reload -rs " $+ $script $+ "
  747.   ;.Completely Unload:/uninstallwa2mirc
  748. }
  749.  
  750. alias checkwinamp {
  751.   if (($remove($dll($scriptdir $+ winamptomirc.dll,GetTitle,_ ),$chr(32)) != %wa2mirc.title) && ($dll( $scriptdir $+ winamptomirc.dll,GetTitle,_ ) != $null)) {
  752.     setupcolours
  753.     if (%WA2mIRC.messagetype == /me) {
  754.       set %WA2mIRC.message /ame
  755.     }
  756.     if (%WA2mIRC.messagetype == /say) {
  757.       set %WA2mIRC.message /amsg
  758.     }
  759.     if (%WA2mIRC.messagetype == /ame) {
  760.       set %WA2mIRC.automessagetype /me
  761.     }
  762.     if (%WA2mIRC.messagetype == /amsg) {
  763.       set %WA2mIRC.automessagetype /say
  764.     }
  765.     else {
  766.       set %WA2mIRC.automessagetype %WA2mIRC.messagetype
  767.       set %WA2mIRC.message %WA2mirc.messagetype
  768.     }
  769.     wa2mircoutputstuff
  770.     if ( %sys.removeALLformatting == 1 ) {
  771.       if ( %wa2mIRC.EnableChannelFilter == 1 ) {
  772.         wa2mircfilterstuff
  773.         wa2mfiltermessage %WA2mIRC.filter %wa2mIRC.ChannelFilterMode %wa2mIRC.Channels $strip(%wa2mIRC.output,burc)
  774.       }
  775.       if ( %wa2mIRC.EnableChannelFilter == 0) {
  776.         if (%WA2mIRC.ActiveAutosong == on) {
  777.           if (%WA2mIRC.automessagetype == /me) set %WA2mIRC.activemessage /describe
  778.           elseif (%WA2mIRC.automessagetype == /say) set %WA2mIRC.activemessage /msg
  779.           %WA2mIRC.activemessage $active $strip(%WA2mIRC.output,burc)
  780.         }
  781.         else {
  782.           scid -a %WA2mIRC.message $strip(%WA2mIRC.output,burc)
  783.         }
  784.       }
  785.     }
  786.     else {
  787.       if ( %wa2mIRC.EnableChannelFilter == 1 ) {
  788.         wa2mircfilterstuff
  789.         wa2mfiltermessage %wa2mirc.filter %wa2mIRC.ChannelFilterMode %wa2mIRC.Channels %wa2mIRC.output
  790.       }
  791.       if ( %wa2mIRC.EnableChannelFilter == 0 ) {
  792.         if (%WA2mIRC.ActiveAutosong == on) {
  793.           if (%WA2mIRC.automessagetype == /me) set %WA2mIRC.activemessage /describe
  794.           elseif (%WA2mIRC.automessagetype == /say) set %WA2mIRC.activemessage /msg
  795.           %WA2mIRC.activemessage $active %WA2mIRC.output
  796.         }
  797.         else {
  798.           scid -a %WA2mIRC.message %WA2mIRC.output
  799.         }
  800.       }
  801.     }
  802.   }
  803.   set %wa2mirc.title $remove($dll($scriptdir $+ winamptomirc.dll,GetTitle,_),$chr(32))
  804. }
  805.