mIRC Home    About    Download    Register    News    Help

Print Thread
Message text for Context Menu #267347 09/06/20 09:29 PM
Joined: Jun 2020
Posts: 1
S
shaggie76 Offline OP
Mostly harmless
OP Offline
Mostly harmless
S
Joined: Jun 2020
Posts: 1
We have been using custom context menus to access moderation commands (kick, ban etc) for years but to improve logging we want to include the offensive message as the 'reason' for the kick. I've scoured the documentation and tried everything I could think of but I can only seem to get the Nick for the offender in $1.

Here's a sketch of what we're after (it's not exactly tban/kick though)

Code
menu nicklist {
  .Timeout:/tban # 1h $$1 | /kick # $$1 $$2-
}


What I was hoping was $$2- (or something else) could expand to the message I clicked on so that the kick message "reason" is what the user said.

I understand that "menu nicklist" is run when actually clicking on the nicklist too (not just on the name part of a message in-channel) so I tried using "menu channel" as well with no luck.

Please tell me I just need more coffee and this is already possible and I've just missed it.

Re: Message text for Context Menu [Re: shaggie76] #267350 10/06/20 02:36 PM
Joined: Jan 2004
Posts: 1,328
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,328
I don't know of anything that identifies the message on which you clicked the nick. Alternatives would be to filter for messages matching $+(<,$nick,>*) into a @tmp window, from which you could click to select the offending message - or you could simply highlight the offending text into the clipboard, then use $$cb instead of $$2-