mIRC Home    About    Download    Register    News    Help

Print Thread
K
Kitoko
Kitoko
K
If you initiate a CTCP request with a parameter that's the same as the CTCP request, mIRC can't tell the difference between that a CTCP request with no parameter at all when using $1.

CTCP sends queries in all-capitals, so the most I can do is use if ($1 === REQUEST) {} and hope the user doesn't send a parameter that's also all-capitals.
Tried that. It didn't work.

Last edited by Kitoko; 12/05/16 05:34 PM.
Joined: Jul 2006
Posts: 4,045
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,045
I don't understand, if there is no parameter, only $1 will be filled and you can check that $2 is $null, or that $0 is more than 1 to know that. What's the bug exactly? Can you give a code which reproduces the issue?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
$1 is the CTCP event name in a CTCP event, not the first parameter. The first "parameter" of a CTCP event would actually be $2, not $1.

for example, in a CTCP PING:

//ctcp $me PING 1234567

$1 = PING
$2 = 1234567

If there is "no parameter", then $2 will be $null, as pointed out.


Link Copied to Clipboard