mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2014
Posts: 107
M
Majeye Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Jan 2014
Posts: 107
So, really noobish question, but I can't seem to fully understand what it is I'm missing from the following code to output a link to the streamers name after the command !caster <name> is put into the chat, any help would be appreciated.

Code:
on $*:text:/!caster /Si:#majeye:{
  msg $chan GO FOLLOW THIS STREAMER twitch.tv/$2 $+ 
}

Joined: Jan 2014
Posts: 107
M
Majeye Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Jan 2014
Posts: 107
Nevermind, my fiance and I figured it out!

Code:
on $*:text:/!caster /Si:#:{
  var %caster = $eval($+(www.twitch.tv/,$2))
  msg $chan GO FOLLOW THIS STREAMER %caster $+ 
}

Last edited by Majeye; 21/07/15 02:48 AM.
Joined: Apr 2014
Posts: 33
B
Ameglian cow
Offline
Ameglian cow
B
Joined: Apr 2014
Posts: 33
Eval on unparsed and unfiltered user input is dangerous.


on *:text:!caster:#majeye:{
msg $chan GO FOLLOW THIS STREAMER twitch.tv/ $+ $$2
}

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Your code will never trigger, it triggers only on the text "!caster", you need to include a & in the trigger context.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jan 2014
Posts: 107
M
Majeye Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Jan 2014
Posts: 107
Originally Posted By: Nillen
Your code will never trigger, it triggers only on the text "!caster", you need to include a & in the trigger context.


I don't know.. it works for me.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Your code will work since you're using a regex match. I was replying to bl968.

Granted that your code may cause people taking control over your pc however, but that's just a "minor" side effect from not knowing what you're doing I guess.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Apr 2014
Posts: 33
B
Ameglian cow
Offline
Ameglian cow
B
Joined: Apr 2014
Posts: 33
Err I forgot one thing...

on *:text:!caster *:#majeye:{
msg $chan GO FOLLOW THIS STREAMER twitch.tv/ $+ $$2
}

There happy?

Joined: Jan 2014
Posts: 107
M
Majeye Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Jan 2014
Posts: 107
Originally Posted By: Nillen
Your code will work since you're using a regex match. I was replying to bl968.

Granted that your code may cause people taking control over your pc however, but that's just a "minor" side effect from not knowing what you're doing I guess.


Do you have a link where I can read up on eval?

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
/help $eval ; in the mIRC client.
http://en.wikichip.org/wiki/mirc/msl_injection


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jul 2015
Posts: 1
S
Mostly harmless
Offline
Mostly harmless
S
Joined: Jul 2015
Posts: 1
Is there another thread in the forum or what would be the best scripting to add to this command to include what the caster is playing(last played) on their channel? The output would be like, "Give a follow to (caster) and was last playing (game title here)."


Link Copied to Clipboard