Bug #5602
openIdentifiers in message options are variables
0%
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.
- The text in message options should be $eval()'d.
- 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)
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)
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-
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 followingalias -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 }