mIRC Home    About    Download    Register    News    Help

Print Thread
#247887 03/09/14 04:01 PM
A
AlphaKennyHuan
AlphaKennyHuan
A
I need to know how to get this bit of coding not to bug out

Code:
on *:text:!skingiveaway *:#: {
  ;$2 is the name of the donor
  ;$3- is the name of the skin
  msg # $2-
}


It would work normally but it doesnt work when | is used, and | is needed to be used in this case, for example someone might say

Quote:
!skingiveaway alphakennyhuan CZ-75 | Twist



Last edited by AlphaKennyHuan; 03/09/14 04:01 PM.
#247893 03/09/14 10:42 PM
Joined: Jan 2004
Posts: 1,330
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,330
Do you have actually have it on a timer? The code you've provided does not suffer from remote code execution.

http://en.wikichip.org/wiki/mirc/msl_injection

Loki12583 #247898 04/09/14 06:24 PM
A
AlphaKennyHuan
AlphaKennyHuan
A
it does have a timer on it, its just the "|" in the message that people type is messing it up and it would say something like
Quote:
TWIST unknown command

#247899 04/09/14 06:34 PM
Joined: Jul 2006
Posts: 4,022
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,022
Yes, that's because that character, the pipe, is the delimite of command in mIRC, when used with timer, the command associated to the timer will be of the form 'msg #chan ... | rest of the message', and rest of the message in your case start with "Twist", which is executed as a command (since it's not found, it's sent to the server which reply it doesn't know that command either), the link above explain it all


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #247910 07/09/14 03:24 PM
Joined: Mar 2014
Posts: 214
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 214
I believe adding a $ before the command ( even if it already has a $) it will make it plain text, or maybe that just works with the $$2/$$3 etc. commands, try it yourself smile

judge2020 #247911 07/09/14 07:06 PM
Joined: Jul 2006
Posts: 4,022
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,022
What do you mean exactly?
If you meant to add $ before the identifier like $2 becomes $$2, this is a different feature, if the value is $null (so here, if $2 is $null), /halt is executed, it's a quick way to stop doing anything when a parameter is not filled.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #247922 08/09/14 07:43 PM
A
AlphaKennyHuan
AlphaKennyHuan
A
thanks laugh will test when i get a minute

Wims #248019 16/09/14 04:29 PM
A
AlphaKennyHuan
AlphaKennyHuan
A
This is what happens when I use what i extracted from that link

Quote:
5:22 User1: !skingiveaway User1 CZ-75 | MIKE
5:22 User2: <=== Giveaway for $decode( Q1otNzUgfCBNSUtF ,m) (donated by user1) is OPEN! To have a chance of winning this fantastic prize, type !enter - Winner will be drawn in 3 minutes. ====>


It does not successfully decode it help please


Link Copied to Clipboard