From 4708ace88af96a2b00a2ec668c3c53b6b553aea3 Mon Sep 17 00:00:00 2001 From: F <87889863+fr33n0w@users.noreply.github.com> Date: Tue, 5 Aug 2025 10:52:52 +0200 Subject: [PATCH] Add files via upload --- chat_log.json | 1 + commands.py | 160 ++++++++++++++++++++++++++++ emoticon.txt | 3 + fullchat.mu | 35 +++++++ index.mu | 279 +++++++++++++++++++++++++++++++++++++++++++++++++ intro.mu | 26 +++++ thechatroom.db | Bin 0 -> 36864 bytes topic.json | 1 + 8 files changed, 505 insertions(+) create mode 100644 chat_log.json create mode 100644 commands.py create mode 100644 emoticon.txt create mode 100644 fullchat.mu create mode 100644 index.mu create mode 100644 intro.mu create mode 100644 thechatroom.db create mode 100644 topic.json diff --git a/chat_log.json b/chat_log.json new file mode 100644 index 0000000..f4a593e --- /dev/null +++ b/chat_log.json @@ -0,0 +1 @@ +[{"time": "[17:24:56]", "user": "fr4nk", "text": "PRIMO MESSAGGIO DI TEST THE CHAT ROOM!"}, {"time": "[17:25:10]", "user": "fr4nk", "text": "FIRST TEST MESSAGE ON THE CHAT ROOM!"}, {"time": "[17:26:56]", "user": "t3st", "text": "message test!!!"}, {"time": "[17:27:27]", "user": "fr4nk", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:27:44]", "user": "T0NY", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:28:02]", "user": "ROBERT1", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:28:12]", "user": "ALBERT1", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:28:24]", "user": "johhny", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:28:32]", "user": "t0mmy", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:28:41]", "user": "D3m0", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:28:52]", "user": "L0v3", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:28:58]", "user": "L0v3", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:29:06]", "user": "L0ve", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:29:14]", "user": "L0ove", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:29:24]", "user": "L0ovem3", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:29:35]", "user": "TheChatRoom!", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:29:38]", "user": "TheChatRoom!", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:29:41]", "user": "TheChatRoom!", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:29:50]", "user": "R4nd0m", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:29:53]", "user": "R4nd0m", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:29:57]", "user": "R4nd0m", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:30:11]", "user": "r3ticulum", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:30:15]", "user": "r3ticulum", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:30:27]", "user": "nomadn3t", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:30:31]", "user": "nomadn3t", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:30:40]", "user": "rnsv1.00", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:30:57]", "user": "lxmf", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:31:04]", "user": "nomad", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:31:08]", "user": "nomad", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:31:19]", "user": "TheChat!", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:31:24]", "user": "TheChat!", "text": "WELCOME TO THE CHAT ROOM!"}, {"time": "[17:53:18]", "user": "Jack", "text": "Hello Chat!!!"}, {"time": "[17:53:34]", "user": "fr4nk", "text": "hey heyy!!! welcome here!!!!"}, {"time": "[17:57:48]", "user": "fr4nk", "text": "who will be the first user to post a message? let's see...."}, {"time": "[18:09:51]", "user": "thomas", "text": "Wow, congratulations F... it looks amazing!"}, {"time": "[18:10:33]", "user": "thomas", "text": "Hard work pays off!"}, {"time": "[18:17:39]", "user": "fr4nk", "text": "thank you thomas!!!"}, {"time": "[18:19:46]", "user": "fr4nk", "text": "you win \"First ChatRoom User Prize\" :D"}, {"time": "[18:21:58]", "user": "Guest", "text": "test"}, {"time": "[18:23:06]", "user": "fr4nk", "text": "( \u0361\u00b0 \u035c\u0296 \u0361\u00b0)"}, {"time": "[18:24:36]", "user": "thomas", "text": "\ud83d\ude80"}, {"time": "[18:25:01]", "user": "fr4nk", "text": "oh funzionano anche le emoticon...interessante :D"}, {"time": "[18:25:27]", "user": "fr4nk", "text": "\u2665\u203f\u2665"}, {"time": "[18:25:47]", "user": "fr4nk", "text": "si torna ai vecchi tempi di irc :D"}, {"time": "[18:26:21]", "user": "fr4nk", "text": "back to old irc good days (\u25cf__\u25cf)"}, {"time": "[18:33:02]", "user": "Guest", "text": "Ciao Frank ti ho trovato veccghia volpe"}, {"time": "[18:34:25]", "user": "Cla", "text": "Eccoti vecchia volpe"}, {"time": "[18:34:53]", "user": "fr4nk", "text": "ciao cla!!! benvenuto ahah :)))"}, {"time": "[18:35:14]", "user": "fr4nk", "text": "vado a cena, a tra pocoo!!! dinner time!"}, {"time": "[18:36:10]", "user": "Cla", "text": "Grazie,buona cena"}, {"time": "[18:49:42]", "user": "fr4nk", "text": "Thank youuuu :D"}, {"time": "[18:49:55]", "user": "fr4nk", "text": "\u2282(\u25c9\u203f\u25c9)\u3064"}, {"time": "[18:55:25]", "user": "spider", "text": "Hello everyone!"}, {"time": "[18:56:09]", "user": "Varx", "text": "Oh man. Bringing me back to web based IRC days. NOICE!"}, {"time": "[18:56:11]", "user": "fr4nk", "text": "hi spider!!"}, {"time": "[18:56:45]", "user": "fr4nk", "text": "ahaha thank you Varx, i'm enjoying it too, missing the 90's :D"}, {"time": "[18:59:19]", "user": "VA2PTL", "text": "Wow, great work!"}, {"time": "[19:01:33]", "user": "fr4nk", "text": "tnx VA2PTL, Let's bring the real chat back to life!"}, {"time": "[19:05:20]", "user": "fr4nky", "text": "changi nickname to see if i get a better color... (yes, nickname color is randomized based on your nick!)"}, {"time": "[19:06:17]", "user": "fr4nky", "text": "ok, a little better... i'll implemente more thing soon hopefully"}, {"time": "[19:06:42]", "user": "fr4nky_", "text": "color test...."}, {"time": "[19:06:44]", "user": "Varx", "text": "Does it escape micron tags? `B960` `!` `*` `b `!` `*`"}, {"time": "[19:06:54]", "user": "_fr4nky_", "text": "again...."}, {"time": "[19:07:23]", "user": "_fr4nky_", "text": "doh! \u0ca0_\u0ca0"}, {"time": "[19:08:07]", "user": "_fr4nky_", "text": "Varx: i did a bit of input sanitization, maybe i should improve it more"}, {"time": "[19:08:54]", "user": "Varx", "text": "Yeah probably want to escape out micron. Else \\n>> We can do whatever we want format-wise"}, {"time": "[19:09:05]", "user": "_fr4nky_", "text": "it escapes almost all in the nickanme, less in the messages"}, {"time": "[19:10:29]", "user": "_fr4nky_", "text": "will improve all things soon, just launched in beta"}, {"time": "[19:10:49]", "user": "IK5FKA", "text": "Ottimo lavoro! Great job!"}, {"time": "[19:12:22]", "user": "IK5FKA", "text": "Vedo che l'ora \u00e8 UTC"}, {"time": "[19:12:28]", "user": "_fr4nky_", "text": " TEST TEST! "}, {"time": "[19:13:59]", "user": "_fr4nky_", "text": "IK5FKA grazie!! si, prende l'orario dal server, puoi usare il comando /time per vedere la differenza tra l'ora del server e l'ora tua"}, {"time": "[19:14:10]", "user": "laptop", "text": "Nice. Very nice."}, {"time": "[19:14:34]", "user": "_fr4nky_", "text": "thank you laptop!"}, {"time": "[19:14:51]", "user": "_fr4nky_", "text": "yeah i need to escape micron in the messages..."}, {"time": "[19:15:38]", "user": "IK5FKA", "text": "Ok.. ah vedo che se faccio il reload mi sparisce il nickname sopra la riga messaggio"}, {"time": "[19:16:05]", "user": "IK5FKA", "text": "refresh da meshchat"}, {"time": "[19:17:48]", "user": "Varx", "text": "Nice! Just trying to beat the skiddies. Can you tell my dayjob is appsec?"}, {"time": "[19:18:45]", "user": "_fr4nky_", "text": "si perch\u00e8 il reload normale non passa il parametro username dal campo di input, per la persistenza bisogna usare il link reload al fianco dei messaggi, oppure il send"}, {"time": "[19:19:43]", "user": "IK5FKA", "text": "Ci vorrebbero i topics, le stanze, rooms, channels... :-)"}, {"time": "[19:20:55]", "user": "_fr4nky_", "text": "eh...molto molto complicato, purtroppo micron non permette di fare nulla di grande...forse sul topic ci posso lavorare, ottima idea :D"}, {"time": "[19:21:06]", "user": "laptop", "text": "test 1"}, {"time": "[19:21:24]", "user": "IK5FKA", "text": "non avevo visto il bottone reload..."}, {"time": "[19:21:27]", "user": "laptop", "text": "great"}, {"time": "[19:21:36]", "user": "_Fr4nky_", "text": "color change...."}, {"time": "[19:21:55]", "user": "IK5FKA", "text": "Laptop: test OK :-)"}, {"time": "[19:22:23]", "user": "_Fr4nky__", "text": "test (\u1d54\u1d25\u1d54)"}, {"time": "[19:23:20]", "user": "_Fr4nky__", "text": "i need to implement more appealing colors for the nicknames :D"}, {"time": "[19:23:50]", "user": "fr4nky__", "text": "it's going so dark now :D"}, {"time": "[19:25:01]", "user": "fr4nk__", "text": "color test"}, {"time": "[19:26:06]", "user": "fr4nky_", "text": "\u0b67\u0f3c \u0361\u25c9\u0644\u035c \u0361\u25c9\u0f3d\u0b68"}, {"time": "[19:26:20]", "user": "IK5FKA", "text": "Si usano i soliti tag di micron? Quelli che sto imparando per le pagine?"}, {"time": "[19:27:31]", "user": "fr4nky_", "text": "per ora si, nei messaggi, ma devo filtrarli perch\u00e8 se non usati correttamente (aperti e chiusi) possono alterare tutta la pagina"}, {"time": "[19:28:29]", "user": "IK5FKA", "text": "`*immagino...*"}, {"time": "[19:29:02]", "user": "fr4nky_", "text": "anzi, devo iniziare a lavorarci subito!!"}, {"time": "[19:29:07]", "user": "IK5FKA", "text": "forse ho fatto un errore?"}, {"time": "[19:29:20]", "user": "IK5FKA", "text": "`*"}, {"time": "[19:29:36]", "user": "IK5FKA", "text": "ho chiuso adesso il tag"}, {"time": "[19:29:59]", "user": "IK5FKA", "text": "Vero. C'\u00e8 da stare attenti"}, {"time": "[19:30:30]", "user": "fr4nky_", "text": "ecco, avevi attivato il corsivo per tutta la pagina:D"}, {"time": "[19:31:05]", "user": "IK5FKA", "text": ":-)))"}, {"time": "[19:32:25]", "user": "IK5FKA", "text": "For non italian users: excuse us for talking in Italian..."}, {"time": "[19:33:27]", "user": "laptop", "text": "Immaginate il potenziale di rnode."}, {"time": "[19:34:36]", "user": "IK5FKA", "text": "Infatti. Ma rester\u00e0 un po' di nicchia se non ci sono interfacce amichevoli per gli end users..."}, {"time": "[19:34:39]", "user": "laptop", "text": "molto bene"}, {"time": "[19:35:08]", "user": "IK5FKA", "text": "Basterebbe un Sideband con browser..."}, {"time": "[19:37:27]", "user": "Guest", "text": "yeah we need a nomadnet browser on sideband...maybe it will come soon!"}, {"time": "[19:37:55]", "user": "IK5FKA", "text": "Notte a tutti `_io stacco`_"}, {"time": "[19:37:58]", "user": "Frank", "text": "color test again"}, {"time": "[19:38:09]", "user": "Frank", "text": "ok better :D"}, {"time": "[19:38:23]", "user": "Frank", "text": "goodnight IK5!!!"}, {"time": "[19:39:40]", "user": "laptop", "text": "good night"}, {"time": "[19:40:59]", "user": "laptop", "text": "I'm off to eat, God bless."}, {"time": "[19:42:07]", "user": "Frank", "text": "i quit guys, see you soon, thanks for visitin this room! :)"}, {"time": "[19:42:22]", "user": "Frank", "text": "bye laptop, see you soon!"}, {"time": "[19:42:55]", "user": "Frank", "text": "* Franky has quit (Connection Reset by peer) :D"}, {"time": "[20:01:39]", "user": "Frank", "text": "added chatroom topic, freely editable from all user (for the moment)"}, {"time": "[20:03:51]", "user": "VA2PTL", "text": "Awesome stuff, chatting through an RNode !"}, {"time": "[20:06:17]", "user": "Frank", "text": "great!! :)"}, {"time": "[20:46:46]", "user": "Frank", "text": "Good Night Reticulum People!!! See You Tomorrow!"}, {"time": "[20:58:38]", "user": "VA2PTL", "text": "See ya!"}, {"time": "[03:09:31]", "user": "Luke", "text": "Love the IRC vibes!"}, {"time": "[03:10:40]", "user": "Luke", "text": "G'night everyone :]"}, {"time": "[06:51:01]", "user": "Doom", "text": "Hello everyone! ;) (added >>THE CHAT ROOM!<< to my links)"}, {"time": "[07:57:56]", "user": "fr4nk", "text": "Hi Luke, Hi Doom, hello Chat :))"}, {"time": "[07:59:39]", "user": "fr4nk", "text": "(\u24ff_\u24ff)"}, {"time": "[08:01:15]", "user": "Guest", "text": "good morninggggggg!!!"}, {"time": "[08:50:00]", "user": "Cla", "text": "Ciao chatp"}, {"time": "[09:00:48]", "user": "fr4nk", "text": "heyyyyy"}, {"time": "[09:07:00]", "user": "thomas", "text": "Good morning nomads!"}, {"time": "[09:07:31]", "user": "fr4nk", "text": "hi thomas!!"}, {"time": "[09:20:44]", "user": "fr4nk", "text": "improving graphic layout today!! :)"}, {"time": "[09:38:52]", "user": "thomas", "text": "Awesome!"}, {"time": "[10:37:19]", "user": "fr4nk", "text": "B009 ! * sanitization test..."}, {"time": "[10:38:10]", "user": "fr4nk", "text": "ok, perfect, all user input are skipping B009 ! * backticks to avoid micron injection :)"}, {"time": "[10:38:34]", "user": "fr4nktest", "text": "test"}, {"time": "[10:38:51]", "user": "fr4nkB009!test", "text": "test"}, {"time": "[10:46:27]", "user": "Guest", "text": "Hello fr4nky !"}, {"time": "[11:05:27]", "user": "fr4nk", "text": "hi guest!"}, {"time": "[11:05:38]", "user": "fr4nk", "text": ":D"}, {"time": "[11:22:34]", "user": "Doom", "text": "cool chat room :D"}, {"time": "[11:27:42]", "user": "fr4nk", "text": "hi doom! :)"}, {"time": "[11:28:29]", "user": "fr4nk", "text": "if anyone find bugs is welcome to write to: 0d051f3b6f844380c3e0c5d14e37fac8"}, {"time": "[11:48:11]", "user": "R1k2", "text": "hello chat!"}, {"time": "[11:57:04]", "user": "Guest", "text": "test"}, {"time": "[11:57:14]", "user": "Guest", "text": "wow"}, {"time": "[12:19:00]", "user": "VA2PTL", "text": "Seriously, this has to be the most useful tool for communities without Internet access. Congratulations on being the first to bring this functionality to Reticulum! Very happy to be part of the userbase! Pretty sure making this open-source would get a lot of attention! Thank you for your efforts!"}, {"time": "[12:41:35]", "user": "fr4nk", "text": "tnx! i think i will put it on github when fully ready, there is big improvement possibility here...new ideas are coming :)"}, {"time": "[12:57:24]", "user": "thomas", "text": "<3"}, {"time": "[12:58:14]", "user": "Guest", "text": "test"}, {"time": "[14:02:15]", "user": "johndoe", "text": "hello"}, {"time": "[14:33:18]", "user": "Guest", "text": "//help"}, {"time": "[14:35:48]", "user": "Guest", "text": "ping"}, {"time": "[15:36:12]", "user": "Guest", "text": "buongiorno"}, {"time": "[16:08:43]", "user": "fr4nk", "text": "hi guest \ud83d\ude05"}, {"time": "[16:14:25]", "user": "Guest33", "text": "anyone here?"}, {"time": "[16:15:49]", "user": "Guest33", "text": "/lastseen"}, {"time": "[16:17:25]", "user": "Guest33", "text": "test test"}, {"time": "[16:33:33]", "user": "Doom", "text": "Yep"}, {"time": " [17:21:59]", "user": "Guest", "text": "hi"}, {"time": "[17:30:39]", "user": "Guest", "text": "test"}, {"time": "[17:33:15]", "user": "Guest", "text": "Guest is the new Anonymous"}, {"time": "[18:12:24]", "user": "fr4nk", "text": "LOL , you win :D"}, {"time": "[19:34:58]", "user": "ik5fka", "text": "Buonasera"}, {"time": "[23:50:05]", "user": "Luke", "text": "What's up everyone? What's up Franky? Digging the irc vibes"}, {"time": "[00:25:38]", "user": "laptop", "text": "So anybody else in South Florida got an rnode? I've been testing with my own equipment, so far no local announces."}, {"time": "[00:36:13]", "user": "laptop", "text": "I'm at 2271660d57145cf4c8ed82be1fc5579e"}, {"time": "[02:48:36]", "user": "Hainish", "text": "oh this is neat!"}, {"time": "[03:49:08]", "user": "ConqueringTheism", "text": "OO yay group chat, I havent seen these since the early 2000s"}, {"time": "[05:37:02]", "user": "thomas", "text": "Good morning chat room! Cold winter morning in Cape Town!"}, {"time": "[06:18:22]", "user": "laptop", "text": "Hey from Miami, Florida."}, {"time": "[07:08:58]", "user": "fr4nk", "text": "Hello World! :D"}, {"time": "[07:59:49]", "user": "Guest", "text": "Good Morning Reticulum!! :)"}, {"time": "[08:49:59]", "user": "fr4nk", "text": "hey laptop, take a look on rmap.world to see if there are neibhour nodes!"}, {"time": "[09:01:46]", "user": "laptop", "text": "I checked, everyone is far away. That's fine, I think most ppl who use these devices are most likely on meshtastic around here."}, {"time": "[09:22:19]", "user": "Doom", "text": "hi laptop :D"}, {"time": "[14:58:41]", "user": "Guest", "text": "Hello all"}, {"time": "[15:14:36]", "user": "Guest", "text": "Woooooow!"}, {"time": "[15:17:26]", "user": "Guest", "text": "Tosi mahtava!"}, {"time": "[15:24:42]", "user": "ik5fka", "text": "Rieccomi!"}, {"time": "[16:23:22]", "user": "VA2PTL", "text": "Does anyone know why a lot of Nomadnet Nodes announce very often, but whenever I try to browse their content they are not available?"}, {"time": "[16:25:23]", "user": "VA2PTL", "text": "For example, X-MESH, which is 2 hops away, just announced 2 minutes ago but is unreachable right now. It has been available on and off, like many other Nodes, even if it constantly announces."}, {"time": "[16:27:11]", "user": "VA2PTL", "text": "This ChatRoom, 2 hops away as well, is always available."}, {"time": "[16:27:58]", "user": "Guest", "text": "Hello world"}, {"time": "[16:30:28]", "user": "Doom", "text": "X-MESH is accessible, it seems random."}, {"time": "[16:54:04]", "user": "VA2PTL", "text": "XMesh not available for me for 20 minutes, now 4 hops away. Maybe this could be explained by the fact the mesh requires some time to self-heal, while a lot of test nodes may go online/offline regularily beacuse many people are just testing."}, {"time": "[16:55:22]", "user": "VA2PTL", "text": "So maybe we get routed through some node for a while... and when this node goes down, it takes a while to get a new route that reaches our destination?"}, {"time": "[17:58:09]", "user": "fr4nk", "text": "hi guys! va2ptl, i have only 2 explanations for this, 1 node or page is in maintenance so not working atm, 2 do you have the latest version of rns and nomadnet? new releases talks only with new releases due to crypt algo change"}, {"time": "[18:18:16]", "user": "laptop", "text": "meshchat updated to version 2.2.1 also"}, {"time": "[18:20:49]", "user": "Guest", "text": "yes"}, {"time": "[18:22:10]", "user": "fr4nk", "text": "yes, i suggest to stay updated with all rns packages, new releases are not compatible with old releases due to this major update of aes256"}, {"time": "[18:23:29]", "user": "fr4nk", "text": "i wrote a python script to check updates and download new versions if needed, it's called frup (fast reticulum updater) , if interested ask and i'll share the link"}, {"time": "[19:03:28]", "user": "VA2PTL", "text": "Yeah I've been running the latest of both rns, lxmf and meshchat. I would say the routing problems are much worse since 1.0 release, probably because there are a bunch of nodes running older versions that do not support aes256"}, {"time": "[19:24:13]", "user": "fr4nk", "text": "yes i think this is also another probable issue!"}, {"time": "[19:24:49]", "user": "fr4nk", "text": "please everyone update to latest versions of all rns packages! :)"}, {"time": "[19:26:51]", "user": "fr4nk", "text": "but i think xmesh is completely down at the moment... Failed loading page: Could not establish link to destination. today morning was working fine"}, {"time": "[19:33:05]", "user": "VA2PTL", "text": "OK, at least I'm not alone :) But I keep receiving it's announces, so must be a routing problem on the way to it."}, {"time": "[19:35:40]", "user": "VA2PTL", "text": "I must say I am now able to reach a lot more nodes steadily. I disabled 8 TCPClientInterfaces and only kept one, guess which one... RMAP.WORLD"}, {"time": "[20:35:54]", "user": "thomas", "text": "Not a lot of people keep nodes running consistently due to the still experimental nature of the Reticulum network, I guess... but I do appreciate when nodes stays up and there is maintenance done with clear messaging. It should be easy to do, but a lot of people maybe miss the fact that there is a lot of people trying to navigate to the various pages :)"}, {"time": "[20:37:33]", "user": "fr4nk", "text": "yeah correct...same here, announces received but no link estabilishing! :D"}, {"time": "[20:40:17]", "user": "fr4nk", "text": "VA2PTL :D rmap tcp server is connected to about other 50 servers with transport enabled, so with just 1 server most of the network is covered ;)"}, {"time": "[20:41:56]", "user": "fr4nk", "text": "yes thomas, i agree on everything :)"}, {"time": "[20:44:06]", "user": "fr4nk", "text": "propagation nodes, tcp servers and \"public services\" should have a stable connection to avoid problems to the whole network (rmap runs on a vps, idem this chat and the meteo bot)"}, {"time": "[20:45:10]", "user": "fr4nk", "text": "goodnight reticulum friends, see you tomorrow!"}, {"time": "[20:56:01]", "user": "thomas", "text": "g'night, chat soon!"}, {"time": "[21:12:02]", "user": "VA2PTL", "text": "Yep, all agreed. Even my main MeshChat client is web-based and permanently running on my home server, so it easily accessible from all my computers with a single identity. https://github.com/liamcottle/reticulum-meshchat/blob/master/docs/meshchat_on_docker.md"}, {"time": "[21:40:27]", "user": "Guest", "text": "boo"}, {"time": "[06:30:35]", "user": "Cla", "text": "Buongiorno Truppa"}, {"time": "[06:44:55]", "user": "Guest", "text": "Hello, world!"}, {"time": "[06:57:35]", "user": "fr4nk", "text": "good morning reticulum!"}, {"time": "[10:22:52]", "user": "thomas", "text": "Have a great weekend everyone!"}, {"time": "[16:15:42]", "user": "anonymous", "text": "nice"}, {"time": "[17:25:34]", "user": "laptop", "text": "these may be useful to someone https://codeberg.org/etux/Node_App_Template/src/branch/main"}, {"time": "[21:29:24]", "user": "Abdul444", "text": "\u0420\u0443\u0441\u0441\u043a\u0438\u0435 \u0435\u0441\u0442\u044c?"}, {"time": "[06:38:20]", "user": "fr4nk", "text": "Hello World!"}, {"time": "[07:59:56]", "user": "thomas", "text": "Have a fantastic Sunday, people!"}, {"time": "[10:21:30]", "user": "fr4nk", "text": "thank you thomas!! triyng to implement more chat functionality with a sql db as suggested by you, work in progress :)"}, {"time": "[10:38:17]", "user": "thomas", "text": "That's amazing! Looking forward to seeing all the potential that can be unlocked by such a change! ;)"}, {"time": "[10:45:11]", "user": "thomas", "text": "There is also the potential to associate the nickname with the identity if provided to the node (I think that was introduced in the latest version of MeshChat)... that would allow the user to not having to always fill in the nickname for every fresh new visit... (on another note, I am sending this via RNode interface going at 3.1Kbps \ud83d\ude80)"}, {"time": "[10:59:48]", "user": "fr4nk", "text": "avevo pensato ad una cosa simile, ma la pagina credo non riesca a leggere l'identity...vedo quel fingerprint ma devo ancora capire..."}, {"time": "[11:56:25]", "user": "thomas", "text": "@fr4nk pi\u00f9 tardi ci do un'occhiata e vedo se capisco come funziona, se riesco a farlo funzionare ti faccio sapere!"}, {"time": "[12:52:40]", "user": "fr4nk", "text": "ottimoooo tnx!!!"}, {"time": "[12:55:13]", "user": "fr4nk", "text": "have a great sunday everyone! :)"}, {"time": "[20:42:39]", "user": "thomas", "text": "Going to bed now, chat tomorrow! Need to get some rest before the new work week begins!"}, {"time": "[00:13:00]", "user": "Guest", "text": "goodnight guys!"}, {"time": "[00:14:46]", "user": "fr4nk", "text": "it was me, goodnight guys! (we need the identity & nick binding, mandatory!!! :D)"}, {"time": "[04:22:06]", "user": "Zen", "text": "Howdy *waves*"}, {"time": "[04:34:42]", "user": "laptop", "text": "hey"}, {"time": "[06:14:00]", "user": "thomas", "text": "@fr4nk 100% ;)"}, {"time": "[06:15:14]", "user": "thomas", "text": "Have a fantastic Monday, y'all \ud83d\ude4c"}, {"time": "[08:40:58]", "user": "Cla", "text": "BuonGiorno Truppa"}, {"time": "[09:04:21]", "user": "fr4nk", "text": "buongiorno /good morning /buenos dias/ guten morgen/ bonjour :D"}, {"time": "[19:00:10]", "user": "Guest", "text": "-"}, {"time": "[19:00:17]", "user": "Guest", "text": "-----"}, {"time": "[19:07:13]", "user": "thomas", "text": "It looks like we have an input sanitisation tester here :D"}, {"time": "[20:59:14]", "user": "VA2PTL", "text": "Hi! Anyone from Saguenay, Qc, Canada in here? Testing rnode + Pi on the roof tonight, just in case!"}, {"time": "[05:55:34]", "user": "gimz", "text": "slick app"}, {"time": "[07:59:48]", "user": "fr4nk", "text": "good morning people! :)"}, {"time": "[08:02:48]", "user": "thomas", "text": "Good day, CHAT ROOM!"}, {"time": "[08:14:13]", "user": "ik5fka", "text": "Buongiorno chatters!"}, {"time": "[08:15:21]", "user": "ik5fka", "text": "Qua vedo le date in UTC, \u00e8 corretto?"}, {"time": "[08:17:13]", "user": "thomas", "text": "Correct, it's UTC time :)"}, {"time": "[08:20:41]", "user": "ik5fka", "text": "Ok thanks! Here in Italy there are 10:20 CEST.."}] \ No newline at end of file diff --git a/commands.py b/commands.py new file mode 100644 index 0000000..ba5f727 --- /dev/null +++ b/commands.py @@ -0,0 +1,160 @@ +# commands.py + +import time +import json +import os +from collections import Counter + +# Topic storage path (can be configured as needed) +topic_file = os.path.join(os.path.dirname(__file__), "topic.json") + +def cmd_clear(log, safe_username): + debug = [] + if log: + removed = log.pop() + debug.append(f"Removed last message: <{removed['user']}> {removed['text']}") + try: + with open(os.path.join(os.path.dirname(__file__), "chat_log.json"), "w") as f: + json.dump(log, f) + debug.append("Log updated after clearing.") + except Exception as e: + debug.append(f"Clear error: {e}") + else: + debug.append("No messages to clear.") + return log, debug + +def cmd_clearall(log): + debug = [] + if log: + log.clear() + debug.append("All messages cleared by admin.") + try: + with open(os.path.join(os.path.dirname(__file__), "chat_log.json"), "w") as f: + json.dump(log, f) + debug.append("Log successfully emptied.") + except Exception as e: + debug.append(f"ClearAll error: {e}") + else: + debug.append("Log already empty. Nothing to clear.") + return log, debug + +def cmd_stats(log): + entries = [] + user_stats = {} + user_set = set() + for msg in log: + if msg["user"] != "System": + user_stats[msg["user"]] = user_stats.get(msg["user"], 0) + 1 + user_set.add(msg["user"]) + total_users = len(user_set) + total_messages = len(log) + top_users = sorted(user_stats.items(), key=lambda x: x[1], reverse=True) + + entries.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": "`!` Stats Report: `!`"}) + entries.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": f"`!` Total messages: {total_messages} `!`"}) + entries.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": f"`!` Total users: {total_users} `!`"}) + + top_line = "`!` Top chatters: `!` " + " , ".join([f"`!` {user} ({count} msg) `!`" for user, count in top_users[:5]]) + entries.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": top_line}) + return entries + +def cmd_users(log): + entries = [] + user_counts = Counter(msg["user"] for msg in log if msg["user"] != "System") + sorted_users = sorted(user_counts.items(), key=lambda x: -x[1]) + total_users = len(sorted_users) + + entries.append({ + "time": time.strftime("[%H:%M:%S]"), + "user": "System", + "text": f"`!` Active Users List and Stats, Total Users: ({total_users}) `!" + }) + + for i in range(0, total_users, 6): + chunk = ", ".join(f"`!` {user} `!({count}msg)" for user, count in sorted_users[i:i+6]) + entries.append({ + "time": time.strftime("[%H:%M:%S]"), + "user": "System", + "text": chunk + }) + return entries + +def cmd_help(): + help_lines = [ + "`!` Chatroom Commands:`!`", + "`!` /info`!` : Show The Chat Room! Informations, Usage and Disclaimer", + "`!` /help`!` : Show all the available user commands", + "`!` /stats`!` : Show chatroom statistics, including Top 5 Chatters", + "`!` /users`!` : List all chatroom users", + "`!` /topic`!` : Show or Change Room Topic, usage: '/topic' or '/topic Your New Topic Here'", + "`!` /time`!` : Show current server and user time", + "`!` /ping`!` : Reply with PONG! if the chat system is up and working", + "`!` /lastseen `!` : Last seen user info and latest user message", + "`!` /version`!` : Show chatroom version", + ] + return [{"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": line} for line in help_lines] + +def cmd_info(): + info_lines = [ + "`!` The Chat Room Info - Overview - Usage - Commands - Disclaimer - README! :) `!`", + "Welcome! This space is designed to connect people through an old school irc-styled interface.", + "No registration required, set your nickname and you are ready to message with other users.", + "Nicknames are randomly colorized and there is persistent color for every nickname.", + "No privacy compromission: use any nick you want. Nothing is recorded or associated to your rns identity.", + "This runs on a Nomadnet, so it will be visible internationally. Respect all the user languages in chat.", + "This chat is based on micron and python components.", + "ChatRoom script is running on a VPS server so it will be stable and always online", + "You can send irc-style messages and use various commands to explore the chatroom.", + "`!` Command Reference `!`", + "Just Some Examples:", + "/users : show active users and message counts", + "/lastseen : check a user's recent activity", + "/topic : show or change the room topic", + "/stats : show chat stats including top chatters", + "`!` Use /help to view the full list of available commands. `!`", + "`!` Technical Notes `!`", + "Due to micron limitations, the chatroom does not refresh automatically.", + "To see new messages or preserve your nickname, reload the page using the provided link buttons.", + "Refreshing the page using meshchat browser function will remove nickname persistance, so use our Reload button", + "The main chatroom shows the last 30 messages; use the button at the bottom to view the full chat log.", + "`!` DISCLAIMER `!`", + "This chatroom is a space for connection, collaboration, and respectful interaction.", + "Rude, offensive, or inappropriate behavior is not tolerated. Messages may be deleted.", + "Suspension or message deletion can occur without prior warning in serious or repeated cases.", + "`!` BEFORE FREE SPECH, COMES RESPECT! - WELCOME TO >>THE CHAT ROOM!<< `!`" + ] + return [{"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": line} for line in info_lines] + +def cmd_time(): + server_time = time.strftime("%Y-%m-%d %H:%M:%S") + try: + import pytz, datetime + user_time = datetime.datetime.now(pytz.timezone("Europe/Rome")).strftime("%Y-%m-%d %H:%M:%S") + except: + user_time = "(Local time not available)" + time_text = f"Server time: {server_time} // User time (Naples): {user_time}" + return [{"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": time_text}] + +def cmd_version(): + return [ + {"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": "The Chat Room v1.2b // Powered by Reticulum NomadNet // IRC Style // Optimized for Meshchat // Made by F."}, + {"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": "This chat is running on a VPS server, powered by RNS v1.0.0 and Nomadnet v.0.8.0."} + ] + +def cmd_lastseen(log, target_user): + last = next((msg for msg in reversed(log) if msg["user"] == target_user), None) + seen_text = f"Last seen {target_user} at {last['time']}: {last['text']}" if last else f"No record of user '{target_user}'." + return [{"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": seen_text}] + +def cmd_topic_get(): + try: + with open(topic_file, "r") as tf: + topic_data = json.load(tf) + return [{"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": f"Current Topic: {topic_data.get('text')} (set by {topic_data.get('user')} on {topic_data.get('time')})"}] + except: + return [{"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": "No topic data available."}] + +def cmd_topic_set(new_topic, safe_username): + trimmed_topic = new_topic[:70] + timestamp = time.strftime("%d %B %Y") + topic_data = {"text": trimmed_topic, "user": safe_username \ No newline at end of file diff --git a/emoticon.txt b/emoticon.txt new file mode 100644 index 0000000..a9801fe --- /dev/null +++ b/emoticon.txt @@ -0,0 +1,3 @@ +( ?ฐ ?? ?ฐ) +??? +????? \ No newline at end of file diff --git a/fullchat.mu b/fullchat.mu new file mode 100644 index 0000000..6f467b5 --- /dev/null +++ b/fullchat.mu @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +import os, json + +# ๐Ÿ“‚ Message log +log_file = os.path.join(os.path.dirname(__file__), "chat_log.json") +debug = [] +try: + with open(log_file, "r") as f: + log = json.load(f) + debug.append(f" Total {len(log)} messages loaded.") +except Exception as e: + log = [] + debug.append(f"Failed to load log: {e}") + +# ๐ŸŽจ Colors +colors = [ + "B900", "B090", "B009", "B099", "B909", "B066", "B933", "B336", "B939", + "B660", "B030", "B630", "B363", "B393", "B606", "B060", "B003", "B960", "B999", + "B822", "B525", "B255", "B729", "B279", "B297", "B972", "B792", "B227", "B277", + "B377", "B773", "B737", "B003", "B111", "B555", "B222", "B088", "B808", "B180" +] +def get_color(name): + return colors[sum(ord(c) for c in name.lower()) % len(colors)] + +# ๐Ÿงพ Build Full Log UI +template = "> ๐Ÿ“œ FULL CHAT LOG - Displaying all chat messages - Reload to update - Press Back to return to The Chat Room!\n\n" +for msg in log: + color = get_color(msg["user"]) + template += f"[{msg['time']} `{color}` `!` `*` <{msg['user']}>`b `!` `*` {msg['text']}\n" + +template += f"\n>`B777`Faaa` Total Messages: {len(log)}`b`F" +for line in debug: + template += f"\n>`B888` {line}`b" + +print(template) diff --git a/index.mu b/index.mu new file mode 100644 index 0000000..2a6b844 --- /dev/null +++ b/index.mu @@ -0,0 +1,279 @@ +#!/usr/bin/env python3 +import os, sys, json, time, random + +def recover_input(key_suffix): + for k, v in os.environ.items(): + if k.lower().endswith(key_suffix): + return v.strip() + return "" + +raw_username = recover_input("username") +message = recover_input("message") + +if not raw_username and len(sys.argv) > 1: + raw_username = sys.argv[1].strip() +if not message and len(sys.argv) > 2: + message = sys.argv[2].strip() + +safe_username = ( + raw_username.replace("`", "").replace("<", "").replace(">", "") + .replace("\n", "").replace("\r", "").replace('"', "").replace("'", "") + .replace("/", "").replace("\\", "").replace(";", "").replace(":", "") + .replace("&", "").replace("=", "").replace("{", "").replace("}", "") + .replace("[", "").replace("]", "").replace("(", "").replace(")", "") + .replace("\t", "").replace("*", "").replace("+", "").replace("%", "") + .replace("#", "").replace("^", "").replace("~", "").replace("|", "") + .replace("$", "").replace(" ", "").strip() or "Guest" +) + +topic_file = os.path.join(os.path.dirname(__file__), "topic.json") +try: + with open(topic_file, "r") as tf: + topic_data = json.load(tf) + topic_text = topic_data.get("text", "Welcome to the chatroom!") + topic_author = topic_data.get("user", "System") +except: + topic_text = "Welcome to the chatroom!" + topic_author = "System" + + +log_file = os.path.join(os.path.dirname(__file__), "chat_log.json") +DISPLAY_LIMIT = 25 +debug = [] + +try: + with open(log_file, "r") as f: + log = json.load(f) + debug.append(f" Total {len(log)} messages") +except Exception as e: + log = [] + debug.append(f"Failed to load log: {e}") + +# Commands logic +cmd = message.strip().lower() +if safe_username == "4dm1n@@@" and cmd == "/clear": + if log: + removed = log.pop() + debug.append(f"Removed last message: <{removed['user']}> {removed['text']}") + try: + with open(log_file, "w") as f: + json.dump(log, f) + debug.append("Log updated after clearing.") + except Exception as e: + debug.append(f"Clear error: {e}") + else: + debug.append("No messages to clear.") + +elif safe_username == "4dm1n@@@" and cmd == "/clearall": + if log: + log.clear() + debug.append("All messages cleared by admin.") + try: + with open(log_file, "w") as f: + json.dump(log, f) + debug.append("Log successfully emptied.") + except Exception as e: + debug.append(f"ClearAll error: {e}") + else: + debug.append("Log already empty. Nothing to clear.") + +elif cmd == "/stats": + user_stats = {} + user_set = set() + for msg in log: + if msg["user"] != "System": + user_stats[msg["user"]] = user_stats.get(msg["user"], 0) + 1 + user_set.add(msg["user"]) + + total_users = len(user_set) + total_messages = len(log) + top_users = sorted(user_stats.items(), key=lambda x: x[1], reverse=True) + + # Prepare lines + log.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": "`!` Stats Report: `!` "}) + log.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": f"`!` Total messages: {total_messages} `!` "}) + log.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": f"`!` Total users: {total_users} `!` "}) + + # Combine top chatters in one line + top_line = "`!` Top chatters: `!` " + " , ".join([f"`!` {user} ({count} msg) `!`" for user, count in top_users[:5]]) + log.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": top_line}) + +elif cmd == "/users": + # Count messages per user + from collections import Counter + user_counts = Counter(msg["user"] for msg in log if msg["user"] != "System") + + # Sort by most active + sorted_users = sorted(user_counts.items(), key=lambda x: -x[1]) + total_users = len(sorted_users) + + # Header line + log.append({ + "time": time.strftime("[%H:%M:%S]"), + "user": "System", + "text": f"`!` Active Users List and Stats, Total Users: ({total_users}) `! " + }) + + # Show in chunks of N with message counts + for i in range(0, total_users, 6): + chunk = ", ".join(f"`!` {user} `!({count}msg)" for user, count in sorted_users[i:i+6]) + log.append({ + "time": time.strftime("[%H:%M:%S]"), + "user": "System", + "text": chunk + }) + +elif cmd == "/help": + help_lines = [ + "`!` Chatroom Commands:`!`", + "`!` /info`!` : Show The Chat Room! Informations, Usage and Disclaimer", + "`!` /help`!` : Show all the available user commands", + "`!` /stats`!` : Show chatroom statistics, including Top 5 Chatters", + "`!` /users`!` : List all chatroom users", + "`!` /topic`!` : Show or Change Room Topic, usage: '/topic' or '/topic Your New Topic Here' ", + "`!` /time`!` : Show current server and user time", + "`!` /ping`!`: Reply with PONG! if the chat system is up and working", + "`!` /lastseen `!`: Last seen user info and latest user message", + "`!` /version`!`: Show chatroom version", + + ] + for line in help_lines: + log.append({ + "time": time.strftime("[%H:%M:%S]"), + "user": "System", + "text": line + }) + +elif cmd == "/info": + info_lines = [ + "`!` The Chat Room Info - Overview - Usage - Commands - Disclaimer - README! :) `!`", + "Welcome! This space is designed to connect people through an old school irc-styled interface.", + "No registration required, set your nickname and you are ready to message with other users.", + "Nicknames are randomly colorized and there is persistent color for every nickname.", + "No privacy compromission: use any nick you want. Nothing is recorded or associated to your rns identity.", + "This runs on a Nomadnet, so it will be visible internationally. Respect all the user languages in chat.", + "This chat is based on micron and python components.", + "ChatRoom script is running on a VPS server so it will be stable and always online", + "You can send irc-style messages and use various commands to explore the chatroom.", + "`!` Command Reference `!`", + "Just Some Examples:", + "/users : show active users and message counts", + "/lastseen : check a user's recent activity", + "/topic : show or change the room topic", + "/stats : show chat stats including top chatters", + "`!` Use /help to view the full list of available commands. `!`", + "`!` Technical Notes `!`", + "Due to micron limitations, the chatroom does not refresh automatically.", + "To see new messages or preserve your nickname, reload the page using the provided link buttons.", + "Refreshing the page using meshchat browser function will remove nickname persistance, so use our Reload button", + "The main chatroom shows the last 30 messages; use the button at the bottom to view the full chat log.", + "`!` DISCLAIMER `!`", + "This chatroom is a space for connection, collaboration, and respectful interaction.", + "Rude, offensive, or inappropriate behavior is not tolerated. Messages may be deleted.", + "Suspension or message deletion can occur without prior warning in serious or repeated cases.", + "`!` BEFORE FREE SPECH, COMES RESPECT! - WELCOME TO >>THE CHAT ROOM!<< `!`" + + ] + for line in info_lines: + log.append({ + "time": time.strftime("[%H:%M:%S]"), + "user": "System", + "text": line + }) + + +elif cmd == "/time": + server_time = time.strftime("%Y-%m-%d %H:%M:%S") + try: + import pytz, datetime + user_time = datetime.datetime.now(pytz.timezone("Europe/Rome")).strftime("%Y-%m-%d %H:%M:%S") + except: + user_time = "(Local time not available)" + time_text = f"Server time: {server_time} // User time (Naples): {user_time}" + log.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": time_text}) + +elif cmd == "/version": + version_text = "The Chat Room v1.2b // Powered by Reticulum NomadNet // IRC Style // Optimized for Meshchat // Made by F." + version_text2 = "This chat is running on a VPS server, powered by RNS v1.0.0 and Nomadnet v.0.8.0." + log.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": version_text}) + log.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": version_text2}) + +elif cmd.startswith("/lastseen "): + target_user = cmd[10:].strip() + last = next((msg for msg in reversed(log) if msg["user"] == target_user), None) + seen_text = f"Last seen {target_user} at {last['time']}: {last['text']}" if last else f"No record of user '{target_user}'." + log.append({"time": time.strftime("[%H:%M:%S]"), "user": "System", "text": seen_text}) + +elif cmd.startswith("/topic "): + new_topic = message[7:].replace("`", "").strip() + if new_topic: + trimmed_topic = new_topic[:70] # limit to N characters + timestamp = time.strftime("%d %B %Y") + topic_data = {"text": trimmed_topic, "user": safe_username, "time": timestamp} + try: + with open(topic_file, "w") as tf: + json.dump(topic_data, tf) + log.append({ + "time": time.strftime("[%H:%M:%S]"), + "user": "System", + "text": f"Topic set by {safe_username} on {timestamp}: {trimmed_topic} `!`[`:/page/index.mu`username]`!" + }) + except Exception as e: + debug.append(f"Topic update error: {e}") + else: + debug.append("No topic text provided.") + +elif cmd == "/topic": + log.append({ + "time": time.strftime("[%H:%M:%S]"), + "user": "System", + "text": f"Current Topic: {topic_text} (set by {topic_author} on {topic_data.get('time')})" + }) + +elif cmd == "/ping": + log.append({ + "time": time.strftime("[%H:%M:%S]"), + "user": "System", + "text": "PONG! (System is up and working!)" + }) + + +elif raw_username and message and message.lower() != "null": + sanitized_message = message.replace("`", "") # remove backticks to prevent formatting issues + log.append({"time": time.strftime("[%H:%M:%S]"), "user": safe_username, "text": sanitized_message}) + try: + with open(log_file, "w") as f: + json.dump(log, f) + debug.append(f" Message by '{safe_username}' sent!") + except Exception as e: + debug.append(f" Send error: {e}") +else: + debug.append(" Skipped sending: Missing username or message") + +# Color system +colors = [ + "B900", "B090", "B009", "B099", "B909", "B066", "B933", "B336", "B939", + "B660", "B030", "B630", "B363", "B393", "B606", "B060", "B003", "B960", "B999", + "B822", "B525", "B255", "B729", "B279", "B297", "B972", "B792", "B227", "B277", + "B377", "B773", "B737", "B003", "B111", "B555", "B222", "B088", "B808", "B180" +] +def get_color(name): + return colors[sum(ord(c) for c in name.lower()) % len(colors)] + +# Output UI +template = "> `!` >>> THE CHAT ROOM! <<< `F009` Powered by Reticulum / NomadNet - IRC Style - Free Global Chat Room - Optimized for Meshchat - v1.2b `F `!` \n" +template += "-" +template += f"\n`Fe0f`!` ########## Room Topic: {topic_text} `! (Set by: {topic_author}, {topic_data.get('time')}) `!` ########## `!`f \n" +template += "-\n" +for msg in log[-DISPLAY_LIMIT:]: + color = get_color(msg["user"]) + template += f"[{msg['time']} `{color}` `!` `*` <{msg['user']}>`b `! `*` {msg['text']}\n" +template += "-" +template += f"\n>`!` Nickname: `Baaa`F000`<13|username`{safe_username}>`b`F" +template += f" Message: `B999`<57|message`>`b" +template += " `[ `:/page/index.mu`username|message]`! `!`[`:/page/index.mu`username]`!\n" + +template += "-" +template += f"\n`B111`Fe0f` User commands: /info, /help, /stats, /users, /lastseen , /topic, /time, /version `b`F `Baaa`F000` `!` Total Messages: {len(log)} `[`:/page/fullchat.mu]`!`b`F`f" + +print(template) diff --git a/intro.mu b/intro.mu new file mode 100644 index 0000000..8c50319 --- /dev/null +++ b/intro.mu @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +import os + +# Get the directory of the current script +script_dir = os.path.dirname(os.path.abspath(__file__)) + +# Scan for JSON files in that directory +json_files = [f for f in os.listdir(script_dir) if f.endswith('.json')] +channel_names = [os.path.splitext(f)[0] for f in json_files] + + +intro = "`F533`B222-\n`b`f\n\n" +intro += "`c" +intro += "`F533`B222-`F533`Bfff `!` WELCOME TO: << THE CHAT ROOM! >> `!`b`f `F533`B222-`b`f\n\n" + +intro += "`F533`B222-`Fa55`B333 Powered by Reticulum / NomadNet - IRC Style - Optimized for Meshchat - v1.2b `b`f `F533`B222-`b`f\n" +intro += "\n" +intro += "`F533`B222-\n`b`f\n\n\n\n" +intro += "`Fe0f `!` #CHANNEL LIST: `!`f\n" +intro += "`F533`B222-\n`b`f\n\n" + +for name in channel_names: + intro += f"`Ffaa`!` {name} `!`f\n" + + +print(intro) diff --git a/thechatroom.db b/thechatroom.db new file mode 100644 index 0000000000000000000000000000000000000000..5905f7f1a79de8859f60c15ebae17c035c51ab91 GIT binary patch literal 36864 zcmeI&%Wm306o6qnAwW<`vhxaQc3_2GqOP*26hbB`3YP?o+N_WZZi>Vu!H(2zQ2P>j zrK-z5M)zIT9%F)YX`4ki=(l9d9M9M@-#J3EOzX7T_Z;zYJQ>=ac&%+|x~}aBp=nye z-`D*;+JbhlN1Gmf`NJ`xz3A%M&0ktN^HbZ*ZGPYQmi@7D^Xygj#t*O|fB*srAbyn*#)izoYE;IYo+ndAKCgexDnfOSs7I`kiebi1%|un~U!5l7 zffFK?-^%iFLA5J&QOMi9VSkh_iv0K@_zbR^H_f?J7zmfUn7D|iC>GZJfXZx^F_Ivr zJVc}J->546qA8bJ<J}Z>VyTIuPp-dkE^QxU^>0Ui&%$I9Pqnvwe{n4yDJJGk~$!gNr-qz35nrC3Hb9v>Ay3UWFc5s(I07EKi5-+Vd&G{d9k}H_bajSD)eN&VANj-pGsz~B#k%5V`OTYVX3&Q z{?BYW_^HhXA6vl(8v+O*fB*srAb^fB*srAb^5>WpB7gt_2q1s}0tg_000Iag!25q{ v009ILKmY**5I_I{1Q0*~f#nzA{r~dkm=z*`00IagfB*srAb