mIRC Home    About    Download    Register    News    Help

Print Thread
#113038 28/02/05 08:41 PM
Joined: Mar 2004
Posts: 13
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2004
Posts: 13
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.

#113039 28/02/05 09:10 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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

#113040 28/02/05 09:17 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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)


New username: hixxy
#113041 28/02/05 09:28 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Good point. smile

I wasn't confused though. mad frown

#113042 28/02/05 11:20 PM
Joined: Mar 2004
Posts: 13
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2004
Posts: 13
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?

#113043 01/03/05 12:14 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
why do u want to do that?

#113044 01/03/05 12:15 AM
Joined: Mar 2004
Posts: 13
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2004
Posts: 13
because the channel is a channel for that kind of "spam" and I want to spam to do that too..

#113045 01/03/05 05:42 AM
Joined: Feb 2005
Posts: 34
K
Ameglian cow
Offline
Ameglian cow
K
Joined: Feb 2005
Posts: 34
That may not be possible, if the channel has the mode set to where it doesn't allow outside messages.

#113046 01/03/05 10:42 AM
Joined: Mar 2004
Posts: 13
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2004
Posts: 13
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

#113047 01/03/05 10:47 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
+n is the channel mode for non external messages, I think thats what he/she meant.

#113048 01/03/05 10:56 AM
Joined: Mar 2004
Posts: 13
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2004
Posts: 13
Oh. Hows does that +n thing work then, what exacly does it do?

#113049 01/03/05 11:03 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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.

#113050 01/03/05 11:07 AM
Joined: Mar 2004
Posts: 13
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2004
Posts: 13
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....

#113051 01/03/05 11:16 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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

#113052 01/03/05 11:32 AM
Joined: Mar 2004
Posts: 13
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2004
Posts: 13
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

#113053 01/03/05 11:42 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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)

#113054 01/03/05 12:04 PM
Joined: Mar 2004
Posts: 13
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Mar 2004
Posts: 13
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

#113055 01/03/05 12:12 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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.

#113056 01/03/05 02:01 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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


Gone.

Link Copied to Clipboard