mIRC Home    About    Download    Register    News    Help

Print Thread
hugs sending bot #259023 27/09/16 11:59 PM
Joined: Mar 2016
Posts: 21
P
pykolas Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2016
Posts: 21
So I have this:

Quote:
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)

Re: hugs sending bot [Re: pykolas] #259024 28/09/16 12:15 AM
Joined: Jun 2015
Posts: 84
F
Fonic_Artes Offline
Babel fish
Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
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 
}

Re: hugs sending bot [Re: Fonic_Artes] #259073 01/10/16 04:52 PM
Joined: Mar 2016
Posts: 21
P
pykolas Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2016
Posts: 21
Thanks

Re: hugs sending bot [Re: pykolas] #259075 01/10/16 05:21 PM
Joined: May 2015
Posts: 133
K
keyeslol Offline
Vogon poet
Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Be careful with injections. You should sanitize your $2.


twitter @keyeslol