Cool VL Viewer forum
http://sldev.free.fr/forum/

Filter option in public chat
http://sldev.free.fr/forum/viewtopic.php?f=9&t=2374
Page 1 of 1

Author:  DonFranko [ 2023-06-24 00:32:18 ]
Post subject:  Filter option in public chat

Hi Henry,

I'm currently here at a SL20B event with a lot of people.. Just asking.. I cannot always keep my eyes on the public chat all the time.. I have the color tagging already activated for some keywords.. but. .. would it be a big cpu burden to implement a public chat history filter to select a particular avatar to see everything that only that one wrote?

Cheers,
Frank

Author:  ZaneZimer [ 2023-06-24 09:04:07 ]
Post subject:  Re: Filter option in public chat

This might be achieved right now by parsing the chat logs. On a Linux distro, it's pretty easy in a terminal with something like:
Code:
tail -f .secondlife/zane_zimer/Second\ Life\ Birthday-2023-06.txt | grep 'Zane Zimer:'
The grep portion could generally be as complex as needed, with most greps even supporting regex. The file name can be a group or just the chat history.

Author:  Henri Beauchamp [ 2023-06-24 19:24:02 ]
Post subject:  Re: Filter option in public chat

Like for all such specific uses, I implemented Lua scripting...

With Lua you can color the chat of any avatar.

An example is given in the manual for coloring name tags and mini-map dots (via the Lua pie menu), that could be extended to color the chat as well (using the onChatTextColoring() Lua callback).

There also could be more complex implementations via Lua, such as a custom text search floater, using the new context menu "Copy to Lua" feature to send the chat text to that floater...

Author:  DonFranko [ 2023-06-26 22:17:47 ]
Post subject:  Re: Filter option in public chat

thank you, Zane.

I try that, although that would mean a static 'picture' of the chat but a useful.

Author:  DonFranko [ 2023-06-26 22:21:02 ]
Post subject:  Re: Filter option in public chat

Henri Beauchamp wrote:
Like for all such specific uses, I implemented Lua scripting...

With Lua you can color the chat of any avatar.

An example is given in the manual for coloring name tags and mini-map dots (via the Lua pie menu), that could be extended to color the chat as well (using the onChatTextColoring() Lua callback).

There also could be more complex implementations via Lua, such as a custom text search floater, using the new context menu "Copy to Lua" feature to send the chat text to that floater...

Thank you Henri!

I was 'afraid' of that answer with the lua scripting :) I still need a lot to learn but it takes so long for me to achieve something cool.. currently I don't have the time to do so.

The coloring of the names won't filter the chat so I still would have to scroll quite far into the history.. That copy to lua seems promising..

Merci!

Author:  DonFranko [ 2023-06-27 22:02:28 ]
Post subject:  Re: Filter option in public chat

Henri Beauchamp wrote:
...(via the Lua pie menu), that could be extended to color the chat as well (using the onChatTextColoring() Lua callback).

I tried that but I got an error message.. how should I use it in that given code?

Code:
function OnLuaPieMenu(data)
   local color = ""
   if data.slice == 1 then
      color = "blue"
   elseif data.slice == 2 then
      color = "cyan"
   elseif data.slice == 3 then
      color = "red"
   elseif data.slice == 4 then
      color = "magenta"
   elseif data.slice == 5 then
      color = "yellow"
   elseif data.slice == 6 then
      color = "white"
   elseif data.slice == 8 then
      color = "green"
end
   avatars_colors[data.object_id] = color
   SetAvatarMinimapColor(data.object_id, color)
   SetAvatarNameTagColor(data.object_id, color)
   SetRadarNameColor(data.object_id, color)

end


If yes, how can I add it to these last four lines?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/