mIRC Home    About    Download    Register    News    Help

Print Thread
#144055 05/03/06 10:35 AM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
Hi,
I use mooncloud mp3 to play my music with mirc.
The script is great and works fine.
But..... I want the spam to go to all the channels I'm on and that option is not include with this script.
Now I had a peace of script that does spam all the channels.
It also has a option to rule out a channel if they don't want me to spam.
I tryed to put that part into the spamming part of the script and it spams to all the channel but it doesn't show the song - artiest - bitrate - etc.
Some help will be great.
here is the part that does the spamming:
Code:
alias -l spam.edit w -a $wm | dialog -adm spam.d spam.t
alias -l spam.get { var %i 1,%l $did(1).lines,%temp | while %i <= %l { %temp = $+(%temp,$did(1,%i)) | inc %i } | return %temp }
alias -l spam.send {
  if $c(spam.target) == 2 { mecho $tags.val($1,$c(spam.template)) }
  elseif $c(spam.target) == 1 {
    var %i 1
    while $gettok($c(spam.chan),%i,44) { if ($me ison $ifmatch) { msg $gettok($c(spam.chan),%i,44) $tags.val($1,$c(spam.template)) } | inc %i }
  }
}
dialog -l spam.t {
  title "Spam editor"
  size -1 -1 98 145
  option dbu notheme
  icon $mcicon
  edit "", 1, 4 10 90 18, multi return autovs
  list 2, 4 37 50 56, size
  text "Tags:", 3, 4 29 31 8
  button "Insert tag", 4, 56 38 37 12
  button "Default", 5, 56 52 37 12
  button "Ok", 6, 56 80 37 12, ok
  button "Preview", 8, 56 66 37 12
  box "Show spam in:", 9, 1 97 96 46
  radio "Channels:", 10, 4 106 34 10, group
  radio "Echo in active window", 11, 4 118 81 10
  radio "Do NOT display", 12, 4 130 81 10
  edit "", 13, 39 105 54 10, autohs
  box "Spam Template:", 14, 1 1 96 95
}
on *:dialog:spam.d:*:*: {
  if $devent == init { didtok $dname 2 44 $pl.tags | did -ra $dname 1 $c(spam.template) | did -ra $dname 13 $c(spam.chan) | did -c $dname $calc(10 + $c(spam.target) - 1) }
  if *click* iswm $devent {
    if $did == 5 { did -ra $dname 1 playing) <file> )<length>)<kbps>kbPS)<filesize> (mC) }
    if $did == 6 { c spam.template $spam.get | c spam.chan $did(13) }
    if $did == 8 {
      if $c(ts) < 1 || !$sl(1) { dialog -v spam.d | t -mo 1 0 var %s $input(There are no files in the playlist.. please add at least one file and select it to generate a preview.,$calc(4 + 256),Error) | return }
      mecho Preview of Spam: $tags.val($p($sl(1).ln),$spam.get)
    }
    if $did == 2 || $did == 4 { if $devent == sclick && $did == 2 { return } | did -a $dname 1 $did(2,$did(2).sel) }
    if $did >= 10 && $did <= 12 { c spam.target $calc($did - 9) }
  }
}

  


and here is the part that spams to all the channels:

Code:
 alias ziakes {
  var %i = 1
  while ( %i <= $scon(0) ) {
    scid $scon(%i)
    var %kamers = $null
    var %ii = $chan(0)
    while ( %ii ) {
       if ( %nietszeggenin. [ $+ [ $chan(%ii) ] ] ) { dec %ii | continue }
       var %kamers = $addtok(%kamers,$chan(%ii),44)
       dec %ii
      }
       Here can be the msg/say/describe to the channels                            
     inc %i
     }
   }
if ( %nietszeggenin. == $treu)
echo -a Mp3 Spam Is Nu uit.


alias toggle.spam { 
set $+(%,nietszeggenin.,$1) $iif($($+(%,nietszeggenin.,$1),2),$null,1) 
echo -a Mp3 Spam is $iif($($+(%,nietszeggenin.,$1),2),UIT,AAN) 
} 

 


I hope one of you can help me out here.
my thank upfront for your time and trouble

#144056 05/03/06 10:16 PM
Joined: Oct 2005
Posts: 126
Vogon poet
Offline
Vogon poet
Joined: Oct 2005
Posts: 126
If no-one helped ya until tomorrow, i will tomorrow night wink got 2 go now, cu ! wink


If you mess with the best, u will die like the rest !
#144057 06/03/06 01:11 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
The second bit of code you posted simply loops through all channels on all connections.

All of that is unnecessary for your purposes.

Try this code:
Code:
alias -l spam.edit w -a $wm | dialog -adm spam.d spam.t
alias -l spam.get { var %i 1,%l $did(1).lines,%temp | while %i <= %l { %temp = $+(%temp,$did(1,%i)) | inc %i } | return %temp }
alias -l spam.send {
  if $c(spam.target) == 2 { mecho $tags.val($1,$c(spam.template)) }
  elseif $c(spam.target) == 1 {
    var %i 1
    while $gettok($c(spam.chan),%i,44) { if ($me ison $ifmatch) { msg $gettok($c(spam.chan),%i,44) $tags.val($1,$c(spam.template)) } | inc %i }
  }
  [color:red]elseif $c(spam.target) == 4 && $status == connected { amsg $tags.val($1,$c(spam.template)) }
  elseif $c(spam.target) == 5 { scon -at1 amsg $tags.val($1,$c(spam.template)) }[/color]
}
dialog -l spam.t {
  title "Spam editor"
  [color:red]size -1 -1 98 168[/color]
  option dbu notheme
  icon $mcicon
  edit "", 1, 4 10 90 18, multi return autovs
  list 2, 4 37 50 56, size
  text "Tags:", 3, 4 29 31 8
  button "Insert tag", 4, 56 38 37 12
  button "Default", 5, 56 52 37 12
  button "Ok", 6, 56 80 37 12, ok
  button "Preview", 8, 56 66 37 12
  [color:red]box "Show spam in:", 9, 1 97 96 70
  radio "Channels:", 110, 4 130 30 10, group
  radio "All Channels (Active Server)", 113, 4 106 81 10
  radio "All Channels (All Servers)", 114, 4 118 81 10
  radio "Echo in active window", 111, 4 142 81 10
  radio "Do NOT display", 112, 4 154 81 10
  edit "", 13, 39 129 54 10, autohs[/color]
  box "Spam Template:", 14, 1 1 96 95
}
on *:dialog:spam.d:*:*: {
  [color:red]if $devent == init { didtok $dname 2 44 $pl.tags | did -ra $dname 1 $c(spam.template) | did -ra $dname 13 $c(spam.chan) | did -c $dname $calc(109 + $c(spam.target)) }[/color]
  if *click* iswm $devent {
    if $did == 5 { did -ra $dname 1 playing) <file> )<length>)<kbps>kbPS)<filesize> ­(­mC­)­ }
    if $did == 6 { c spam.template $spam.get | c spam.chan $did(13) }
    if $did == 8 {
      if $c(ts) < 1 || !$sl(1) { dialog -v spam.d | t -mo 1 0 var %s $input(There are no files in the playlist.. please add at least one file and select it to generate a preview.,$calc(4 + 256),Error) | return }
      mecho Preview of Spam: $tags.val($p($sl(1).ln),$spam.get)
    }
    if $did == 2 || $did == 4 { if $devent == sclick && $did == 2 { return } | did -a $dname 1 $did(2,$did(2).sel) }
    [color:red]if $did >= 110 && $did <= 114 { c spam.target $calc($did - 109) }[/color]
  }
}

(code is untested)

Red portions have been added or changed.


-genius_at_work

Last edited by genius_at_work; 06/03/06 01:42 AM.
#144058 06/03/06 08:40 AM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
the second part does the looping but it also lets me exclude channels from spam by richtclicking in the channel.
you removed that part.
all workes great but I mis the channel excluding.


Link Copied to Clipboard