mIRC Home    About    Download    Register    News    Help

Print Thread
[Twitch] Caster command help #254069 21/07/15 02:26 AM
Joined: Jan 2014
Posts: 101
M
Majeye Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Jan 2014
Posts: 101
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 $+ 
}

Re: [Twitch] Caster command help [Re: Majeye] #254070 21/07/15 02:47 AM
Joined: Jan 2014
Posts: 101
M
Majeye Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Jan 2014
Posts: 101
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.
Re: [Twitch] Caster command help [Re: Majeye] #254074 21/07/15 06:35 AM
Joined: Apr 2014
Posts: 33
B
bl968 Offline
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
}

Re: [Twitch] Caster command help [Re: bl968] #254081 21/07/15 08:41 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
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
Re: [Twitch] Caster command help [Re: Nillen] #254083 21/07/15 01:03 PM
Joined: Jan 2014
Posts: 101
M
Majeye Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Jan 2014
Posts: 101
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.

Re: [Twitch] Caster command help [Re: Majeye] #254085 21/07/15 04:55 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
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
Re: [Twitch] Caster command help [Re: Nillen] #254088 21/07/15 10:49 PM
Joined: Apr 2014
Posts: 33
B
bl968 Offline
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?

Re: [Twitch] Caster command help [Re: Nillen] #254094 22/07/15 07:01 AM
Joined: Jan 2014
Posts: 101
M
Majeye Offline OP
Vogon poet
OP Offline
Vogon poet
M
Joined: Jan 2014
Posts: 101
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?

Re: [Twitch] Caster command help [Re: Majeye] #254098 22/07/15 10:20 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
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
Re: [Twitch] Caster command help [Re: Majeye] #254174 26/07/15 04:21 PM
Joined: Jul 2015
Posts: 1
S
snoop_in_dm Offline
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)."