mIRC Homepage
Posted By: Broodhill Mp3 advertise script - 28/02/05 08:41 PM
Do someone know a mp3 advertise script that can send the info of a song to a specific channel on a specific network?

Or do someone a script or something to send text to a specific channel on specific network. even if I'm currently active on Quakenet, it still send the efnet w/o efnet need being active.
Posted By: SladeKraven Re: Mp3 advertise script - 28/02/05 09:10 PM
Here's a little something that displays a little information on the song you're playing.

Code:
alias song {
  if ($insong == $false) { 
    return 
  }
  else {
    return Track: $remove($nopath($insong.fname),$chr(46),$gettok($nopath($insong.fname),$numtok($nopath($insong.fname),46),46)) / Length: $duration($calc($mp3($insong.fname).length / 1000))) / Sample: $calc($mp3($insong.fname).sample / 1000) KHZ / Bitrate: $mp3($insong.fname).bitrate / Size: $lower($bytes($file($insong.fname)).suf)
  }
}


When playing a song type:

//echo -a $song
or,
//say $song
Posted By: tidy_trax Re: Mp3 advertise script - 28/02/05 09:17 PM
Quote:
Here's a little something that displays a little information on the song you're playing.

Code:
return Track: $remove($nopath($insong.fname),$chr(46),$gettok($nopath($insong.fname),$numtok($nopath($insong.fname),46),46))

[/code]


That might confuse certain people with the Track number information stored in mp3 files, it would be better to do something like:

Code:
return Song: $deltok($nopath($insong.fname),-1,46)
Posted By: SladeKraven Re: Mp3 advertise script - 28/02/05 09:28 PM
Good point. smile

I wasn't confused though. mad frown
Posted By: Broodhill Re: Mp3 advertise script - 28/02/05 11:20 PM
Is it possible to send it to a channel of my choice on a network I'm not currently active on. I'm online on the network but i'm chatting with someone on another and it advertise automaticly when a new song starts?
Posted By: DaveC Re: Mp3 advertise script - 01/03/05 12:14 AM
why do u want to do that?
Posted By: Broodhill Re: Mp3 advertise script - 01/03/05 12:15 AM
because the channel is a channel for that kind of "spam" and I want to spam to do that too..
Posted By: k1tkra04 Re: Mp3 advertise script - 01/03/05 05:42 AM
That may not be possible, if the channel has the mode set to where it doesn't allow outside messages.
Posted By: Broodhill Re: Mp3 advertise script - 01/03/05 10:42 AM
How do you mean a "mode that doesn't allow outside message".
/msg #channel blalbla works and send outside messages, so somehow it should be able, atleast I think so, but I got no idea how to do it thought. frown
Posted By: SladeKraven Re: Mp3 advertise script - 01/03/05 10:47 AM
+n is the channel mode for non external messages, I think thats what he/she meant.
Posted By: Broodhill Re: Mp3 advertise script - 01/03/05 10:56 AM
Oh. Hows does that +n thing work then, what exacly does it do?
Posted By: SladeKraven Re: Mp3 advertise script - 01/03/05 11:03 AM
A channel that has channel mode (-n) will allow you to send messages to the channel without actually being on it.

A channel that has channel mode (+n) wont let the messages parse, you'll get the Raw error 404 Cannot send to channel.
Posted By: Broodhill Re: Mp3 advertise script - 01/03/05 11:07 AM
Oh I see.

But I will be in the channel I want it to spam to all the time, so then +n mode should be no problem....
Posted By: SladeKraven Re: Mp3 advertise script - 01/03/05 11:16 AM
Code:
alias spam {
  if ($1 != $active) {
    scon -a msg $$1 $$2-
  }
}


/spam #Help Bleh..

would message #help with "Bleh.." on all the servers you're on IF #help is not the active window.

Hope this helps, just even a little bit. grin
Posted By: Broodhill Re: Mp3 advertise script - 01/03/05 11:32 AM
Aye it worked. but I get this error

—› no such nickname: (#aka)
it send the message to channel but this error is getting spammed int he active window for me
Posted By: SladeKraven Re: Mp3 advertise script - 01/03/05 11:42 AM
Ah, well I think that's probably because the -a switch sends the message to ALL servers, you just need to determine what connection you want to send it to. (I think)
Posted By: Broodhill Re: Mp3 advertise script - 01/03/05 12:04 PM
Woho I solved it. smile

It is connection ID 3 so I just had to do /scon 3 msg #mp3spam <song>

found a mp3 script that did exacly all i wanted but the spam so i managed to edit, so now it works. laugh thanks alot for the help
Posted By: SladeKraven Re: Mp3 advertise script - 01/03/05 12:12 PM
The thing you got to understand is that it wont always be 3, 3 is the server you're sending it to.

If $scon(3) will always be the place you want it to spam, you're fine, but the server you want to send it to could infact be the 2nd connection ID.

But, you're welcome. grin

You know the basics anyway, how to send a message to another server.
Posted By: FiberOPtics Re: Mp3 advertise script - 01/03/05 02:01 PM
Using 3 is going to break in no time, as andy points out.

Here's a little alias that I use that might be of interest for you:

$getcid(<network|server> [,#channel])[.server]

  • $getcid(network) returns the $cid of the specified network if you're on it
  • $getcid(network,#channel) returns the $cid of that network, but only if you are on the specified channel
  • $getcid(server).server returns the $cid of the server (handy in cases where the $network name doesn't exist or isn't filled)
  • $getcid(server,#channel).server returns the $cid of the server but only if you are in the specified channel there

Code:
alias getcid {
  if $prop &amp;&amp; !$istok(server network,$prop,32) { echo -ac info * $!getcid: Invalid property | return }
  var %cid
  scon -at1 if ($ $+ $iif($prop,$prop,network) == $1) $iif( $2,&amp;&amp; ( $2 ischan)) $(%cid = $cid,) 
  return %cid
}

Some specific examples:

//echo -a $getcid(rizon) * $getcid(rizon,#kustomskripts) * $getcid(irc.dal.net).server * $getcid(irc.efnet.net,#efnet).server * $getcid(undernet)

It's important to realize that if you do not specify the .server property, that the first parameter in the $getcid is taken as a network. If you do specify the .server property, the alias assumes the first param $1 is a server. You can also use the .network property, but that's obsolete, since it defaults to that. So $getcid(somenetwork).network is the same as $getcid(somenetwork)

In your case you'll have to do something like:

if $getcid(thenetwork,#mp3spam) {
scid $v1
msg #mp3spam my message
}

Btw it is very important for you to realize that using the scid/scon commands comes with great danger for exploits. As you may or may not know, parameters passed to a scon/scid command are evaluated 2 times. Once when sent to the command, and once at the target connection. Think of it as using a timer. When you set a timer, the parameters passed to the timer are evaluated now, and when the timer triggers.

Therefore you should either do:
--
scid $v1 | msg #chan $1-
--
scid $v1
msg #chan $1-
--
var %msg = $1-
scid $v1 msg #chan % $+ msg or $(%msg,)
--

Greets
© mIRC Discussion Forums