Project

General

Profile

Actions

Bug #5602

open

Identifiers in message options are variables

Added by JD Byrnes over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Interface
Target version:
Start date:
07/18/2022
Due date:
% Done:

0%

Estimated time:
Operative System:
All
Regression:
No

Description

Currently, the identifiers in message options are variables. This is misleading, and frustrating to a new user.

$pnick in message options means $nick($chan, $nick).pnick, $pnick in scripts means $pnick. My testing has concluded that the variables are just being replaced rather than evaluated.

So this bug is kind of two bugs:
  1. The text in message options should be $eval()'d.
  2. The identifiers such as $nickicon should be available to scripts (when $nick) is set, or with optional parameters eg. $nick(<nick>)

This fixes a few things, particularly when creating a theme (currently, there's no away to show a user's icon when you /echo a message that a user is away)

Actions #1

Updated by JD Byrnes over 2 years ago

On further thought, adding a $nickicon(<nick>) identifier should have a .nicklist option, to get the icon shown in the nicklist, as it can be set in messages, nicklist, or both. (default would be messages)

Actions #2

Updated by Per Amundsen over 2 years ago

The message prefix variables was added to adiirc many years before adiirc had scripting, this can't change now. Adding them today would have made them %variables instead.

I have been working on a different "Text Events" system for some time, like this: https://adiirc.com/build/textevents.png

It intentionally mimics the MTS themes variable system and will have something like a %:nickicon variable which should make theming messages easier.

The new system wont be available for some time, but for now, you can use nick icons in scripts like this:

echo -ag < $+ $chr(61445) $+ $nick $+ $chr(61445) $+ > : $+ $1-
Actions #3

Updated by JD Byrnes over 2 years ago

Per Amundsen wrote in #note-2:

The message prefix variables was added to adiirc many years before adiirc had scripting, this can't change now. Adding them today would have made them %variables instead.

That would have made a lot more sense, but I now see why.

I have been working on a different "Text Events" system for some time, like this: https://adiirc.com/build/textevents.png

I look forward to seeing it

Thanks for the code. I was able to do what I needed using the following
alias -l imagechar return $chr(61445)
alias -l nickicon return $+($imagechar, $nick, $imagechar)
on ^*:TEXT:*:#:{ echo -cmt Normal $chan $+($nickicon, $chr(2), $nick, $chr(2), :) $1- | haltdef }

Actions

Also available in: Atom PDF