mIRC Home    About    Download    Register    News    Help

Print Thread
/dcc send, and $rawmsg bugs #206504 16/11/08 05:32 PM
Joined: Aug 2006
Posts: 167
P
pishposh Offline OP
Vogon poet
OP Offline
Vogon poet
P
Joined: Aug 2006
Posts: 167
(1) The /dcc send dialogue's DCC packet-size drop-down was hard-coded to show 5 lines when mIRC only offered 5 packet size choices. mIRC now offers 8 choices, but the drop-down's vertical depth remains 5 lines, making it impossible to select from all of the available 8 choices with your mouse. (Tested under W98SE only.) http://img243.imageshack.us/img243/9322/xyzxp3.png

(2) Uncertain whether by design or a bug, but it seems that $rawmsg isn't populated if used within the match evaluation phase of an event. Only discovered this after trying to do something a little unconventional...

I posted this message recently, asking how to detect "normal" incoming DCC chat/send attempts in a script. (I had discovered the DCCSERVER event in mIRC's documentation, but saw that it was only for fserve-based DCC sends/chats.) In the end, no advice on detecting "normal" inbound DCCs was forthcoming, so I thought of and attempted the following "hack" to solve my problem:

ctcp *:$($iif(: $+ $chr(1) $+ DCC isin $rawmsg,DCC*,aStringWeHopeWillNeverOccur)):?:echo -s True incoming DCC detected!

mIRC internally removes $chr(1) from CTCPs before event match evaluations, making ctcp *:$($chr(1) $+ DCC*):?: impossible. And ctcp *:DCC*:?: would match both DCCs and user-typed CTCPs beginning with "DCC." So this hack only "lets" the match evaluation see "DCC*" if it's an actual DCC. Problem was, I discovered $rawmsg == $null during the ctcp *:evaluation phase:*: of the event. D'oh! I'm certian the "hack" works otherwise, because ctcp *:$($iif(1 == 1,DCC*,aStringWeHopeWillNeverOccur)):?: itself matches on DCC attempts just fine -- just without the desired protection against user-typed "DCC*" CTCP messages.

Re: /dcc send, and $rawmsg bugs [Re: pishposh] #206507 16/11/08 06:11 PM
Joined: Apr 2004
Posts: 864
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 864
Quote:
both DCCs and user-typed CTCPs beginning with "DCC."

I think you're confusing ctcps and regular messages. A ctcp, by definition, is a message that starts and ends with a $chr(1), and as such, removing the $chr(1)s does not lose any information. What you want is just "ctcp *:DCC *:?:..".

As for the actual (more general) suggestion here, why wouldn't you just do any $rawmsg check from the event's script body, rather than trying to stuff it into the matchtext field?


Saturn, QuakeNet staff
Re: /dcc send, and $rawmsg bugs [Re: pishposh] #206512 16/11/08 06:42 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
1. If you hit the up key in the combo box will it not show anything before the last 5 options?

2. This is by design. As sat pointed out, if it's a ctcp, you *know* there is a $chr(1) preceeding the message, this is what triggers it as a CTCP and not PRIVMSG. You don't need to check for $chr(1).

Note that this is not a hack at all, this is how people are meant to check for an incoming DCC request since mIRC 4.72.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: /dcc send, and $rawmsg bugs [Re: Sat] #206513 16/11/08 06:49 PM
Joined: Aug 2006
Posts: 167
P
pishposh Offline OP
Vogon poet
OP Offline
Vogon poet
P
Joined: Aug 2006
Posts: 167
Holy crap, Sat. You're right. frown I've spent so much time away from IRC scripting and servers that my recollection of these things has turned into swiss cheese.

Thanks for pointing out my oversight. Appears none of what I was attempting is even necessary, yeah. I'll do as you say and check $rawmsg from within the body.

I guess $rawmsg not being populated during match evaluations could still be a potential bug, though. Assuming someone needed to use it there for purposes other than detecting $chr(1). smile

argv0 - Yes, the keyboard arrow keys allow you access to the other choices. I was only pointing this out because for those accustomed to doing everything with their mouse, it appears there are only 5 choices still.

Re: /dcc send, and $rawmsg bugs [Re: pishposh] #206557 17/11/08 04:21 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Originally Posted By: pishposh
I guess $rawmsg not being populated during match evaluations could still be a potential bug, though.
Whether a bug or a missing feature, I agree it should work; $1- works in TEXT/NOTICE events but not in CTCP ones, and $rawmsg works in neither. Support for $rawmsg/$1- in those would be nice.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: /dcc send, and $rawmsg bugs [Re: pishposh] #206581 18/11/08 12:41 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
I was just checking that all items were being added to the listbox.. it seems like in that case windows should be adding the scrollbar automatically. weird


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"