mIRC Home    About    Download    Register    News    Help

Print Thread
#211486 17/04/09 11:47 PM
Joined: Sep 2008
Posts: 37
R
razor32 Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2008
Posts: 37
Hi,

I edited this small scream code someone made me a few months ago into a request script (very simple nothing fancy) but i just want it to go to a certain channel without having to put the channel in. At the moment its !req #chan artist - song but would like it so its just !req artist - song and goes direct to the channel.

Code:
on *:TEXT:!req *:#:{
  if ($me ison $$2) { msg $$2 !request $$3- }
}


Thats all it is, Yeah basic but works just not the way i would like it so is it possible is someone could help me?

Thanks smile

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Replace the $$2 with the channel name, and change $$3- to $$2-

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
As the channel was the 2nd word ($2) and the text-to-send was the 3rd word onwards ($3-), and now you want to hard-code the target channel, the modification would be:
Code:
on *:TEXT:!req *:#:{
  if ($me ison #targetchan) { msg #targetchan !request $$2- }
}



Joined: Sep 2008
Posts: 37
R
razor32 Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2008
Posts: 37
Originally Posted By: Horstl
As the channel was the 2nd word ($2) and the text-to-send was the 3rd word onwards ($3-), and now you want to hard-code the target channel, the modification would be:
Code:
on *:TEXT:!req *:#:{
  if ($me ison #targetchan) { msg #targetchan !request $$2- }
}



Sweet, Works a treat!

Thanks for the help guys grin

Just one last thing, If i wanted it so say that the request was sent how would i go round doing it?

Last edited by razor32; 18/04/09 12:35 AM.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Code:
on *:TEXT:!req *:#:{
  if ($me ison #targetchan) {
    msg #targetchan !request $$2-
    msg $chan Thanks $nick - Your request was sent.
  }
}

To send a notice, use "notice $nick" instead of "msg $chan" smile

Last edited by Horstl; 18/04/09 12:55 AM.
Joined: Sep 2008
Posts: 37
R
razor32 Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2008
Posts: 37
Excellent! Thanks guys for all your help. Works a treat


Link Copied to Clipboard