mIRC Home    About    Download    Register    News    Help

Print Thread
#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.)

Joined: Apr 2014
Posts: 24
T
Ameglian cow
Offline
Ameglian cow
T
Joined: Apr 2014
Posts: 24
Code:
on *:text:!hug *:#:{
  msg $chan $nick hugs $2- $+ .
}

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?


Link Copied to Clipboard