on *:text:!vhug *:#:{ if ((%floodEVERYONE) || ($($+(%,floodEVERYONE.,$nick),2))) { return } set -u2 %floodEVERYONE On set -u3 %floodEVERYONE. $+ $nick On msg $chan $nick sends virtual hug to $2- http://goo.gl/LgPNx8 GivePLZ }
I want it to get activated, take username from person who activates command and give hug. My problem is that this bot can take nickname like "This is nickname" and it will output all 3 words. How can I make so it would only take second word instead of all after first one? (first one is !vhug)
Using a - after $2- makes it include everything after that.
Code:
on *:text:!vhug *:#:{
if ((%floodEVERYONE) || ($($+(%,floodEVERYONE.,$nick),2))) { return }
set -u2 %floodEVERYONE On
set -u3 %floodEVERYONE. $+ $nick On
msg $chan $nick sends virtual hug to $2 http://goo.gl/LgPNx8 GivePLZ
}