mIRC Home    About    Download    Register    News    Help

Print Thread
bot text read and output #258686 11/08/16 10:32 PM
Joined: Mar 2016
Posts: 21
P
pykolas Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2016
Posts: 21
So I want to make !hug command where people would write !hug *text* and bot goes: "$nick hugs *text*". All I need is to know how bot could reat second word and output it. Also, it should read only second word (if there is !hug this that, it should only output $nick hugs this). I believe I knew this, but forgot. Thanks in advance. (there is other topic in other section, I hope it will be deleted, because it was in wrong one.)

Re: bot text read and output [Re: pykolas] #258688 12/08/16 05:59 AM
Joined: Apr 2014
Posts: 24
T
Thedelirious1 Offline
Ameglian cow
Offline
Ameglian cow
T
Joined: Apr 2014
Posts: 24
Code:
on *:text:!hug *:#:{
  msg $chan $nick hugs $2- $+ .
}

Re: bot text read and output [Re: Thedelirious1] #258692 13/08/16 12:25 AM
Joined: Mar 2016
Posts: 21
P
pykolas Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2016
Posts: 21
Originally Posted By: Thedelirious1
Code:
on *:text:!hug *:#:{
  msg $chan $nick hugs $2- $+ .
}


$2- gives second word? And $+ adds dot at the end?