[Clientmod] Chatbell [chatbell]

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Clientmod] Chatbell [chatbell]

by Desour » Post

Yes, that wouldn't be hard to do.
I thought, that wouldn't happen because of name autocompletion but sometimes that doesn't work for some reason and some people don't use it.
I've added it to my todo list but probably I won't implement it soon.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Post

DS-minetest wrote:Yes, that wouldn't be hard to do.
I thought, that wouldn't happen because of name autocompletion but sometimes that doesn't work for some reason and some people don't use it.
I've added it to my todo list but probably I won't implement it soon.
do something like "name ~= nick.name then"
then put something like this at the top of the lua so we can edit the nick names

Code: Select all

nick.name= "man"
idk im a noob at lua :P
My Public Mods! Discord: Rottweiler Games#3368

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Clientmod] Chatbell [chatbell]

by Desour » Post

ManElevation wrote:do something like "name ~= nick.name then"
then put something like this at the top of the lua so we can edit the nick names

Code: Select all

nick.name= "man"
idk im a noob at lua :P
I would make a list of names and give the possibility to add/remove names to/from this list and search in chat messages not only for the one name but for all until it found something.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Clientmod] Chatbell [chatbell]

by Desour » Post

Update:
  • Multiple names are possible, do ".chatbell name <nickname>".
  • The bell rings on PMs if you are not the sender.
  • Own /mes are ignored.
Be happy! : )
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Post

DS-minetest wrote:Update:
  • Multiple names are possible, do ".chatbell name <nickname>".
  • The bell rings on PMs if you are not the sender.
  • Own /mes are ignored.
Be happy! : )
oh great!
My Public Mods! Discord: Rottweiler Games#3368

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Post

i get this error

Code: Select all

2017-10-11 20:07:06: ERROR[Main]: ModError: Failed to load and run script from C:\Users\morenavaj\Documents\1\minetest\bin\..\clientmods\chatbell\init.lua:
2017-10-11 20:07:06: ERROR[Main]: ...Documents\1\minetest\bin\..\clientmods\chatbell\init.lua:60: attempt to call field 'register_on_receiving_chat_message' (a nil value)
My Public Mods! Discord: Rottweiler Games#3368

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: [Clientmod] Chatbell [chatbell]

by ChimneySwift » Post

ManElevation wrote:i get this error

Code: Select all

2017-10-11 20:07:06: ERROR[Main]: ModError: Failed to load and run script from C:\Users\morenavaj\Documents\1\minetest\bin\..\clientmods\chatbell\init.lua:
2017-10-11 20:07:06: ERROR[Main]: ...Documents\1\minetest\bin\..\clientmods\chatbell\init.lua:60: attempt to call field 'register_on_receiving_chat_message' (a nil value)
Had the same issue.

Change line 60 from:

Code: Select all

minetest.register_on_receiving_chat_message(function(omsg)
To:

Code: Select all

minetest.register_on_receiving_chat_messages(function(omsg)
Or install this and add it to depends.txt

[Source]

EDIT: Oh and thanks DS for adding that feature, you do great work :)
Last edited by ChimneySwift on Fri Oct 13, 2017 09:08, edited 1 time in total.
A spoon is basically a tiny bowl with a stick on it

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Post

ChimneySwift wrote:
ManElevation wrote:i get this error

Code: Select all

2017-10-11 20:07:06: ERROR[Main]: ModError: Failed to load and run script from C:\Users\morenavaj\Documents\1\minetest\bin\..\clientmods\chatbell\init.lua:
2017-10-11 20:07:06: ERROR[Main]: ...Documents\1\minetest\bin\..\clientmods\chatbell\init.lua:60: attempt to call field 'register_on_receiving_chat_message' (a nil value)
Had the same issue.

Change line 60 from:

Code: Select all

minetest.register_on_receiving_chat_message(function(omsg)
To:

Code: Select all

minetest.register_on_receiving_chat_messages(function(omsg)
Or install this and add it to depends.txt

[Source]

EDIT: Oh and thanks DS-minetest for adding that feature, you do great work :)
thx!
My Public Mods! Discord: Rottweiler Games#3368

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Post

can you make the nicknames save on the mod storage?
My Public Mods! Discord: Rottweiler Games#3368

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: [Clientmod] Chatbell [chatbell]

by ChimneySwift » Post

ManElevation wrote:can you make the nicknames save on the mod storage?
Yeah that was the other thing I forgot to mention, as a compromise (Really, a pretty bad solution, but it works and is easy to do) I hard-coded each nickname to load in on startup since I doubt I'll need to add new ones any time soon. To do this, add this line of code (1 for each nickname) under line 57:

Code: Select all

own_names["<name>"] = not own_names["<name>"] or nil
Again, it's ugly, bypasses the command to add them in game entirely, and it would be better for the names to save to mod storage however in the meantime I'll use this.
A spoon is basically a tiny bowl with a stick on it

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Post

ChimneySwift wrote:
ManElevation wrote:can you make the nicknames save on the mod storage?
Yeah that was the other thing I forgot to mention, as a compromise (Really, a pretty bad solution, but it works and is easy to do) I hard-coded each nickname to load in on startup since I doubt I'll need to add new ones any time soon. To do this, add this line of code (1 for each nickname) under line 57:

Code: Select all

own_names["<name>"] = not own_names["<name>"] or nil
Again, it's ugly, bypasses the command to add them in game entirely, and it would be better for the names to save to mod storage however in the meantime I'll use this.
like this? :p

Code: Select all

own_names["<man>"] = not own_names["<man>"] or nil
My Public Mods! Discord: Rottweiler Games#3368

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: [Clientmod] Chatbell [chatbell]

by ChimneySwift » Post

ManElevation wrote:
ChimneySwift wrote:
ManElevation wrote:can you make the nicknames save on the mod storage?
Yeah that was the other thing I forgot to mention, as a compromise (Really, a pretty bad solution, but it works and is easy to do) I hard-coded each nickname to load in on startup since I doubt I'll need to add new ones any time soon. To do this, add this line of code (1 for each nickname) under line 57:

Code: Select all

own_names["<name>"] = not own_names["<name>"] or nil
Again, it's ugly, bypasses the command to add them in game entirely, and it would be better for the names to save to mod storage however in the meantime I'll use this.
like this? :p

Code: Select all

own_names["<man>"] = not own_names["<man>"] or nil
Sorry no (wasn't clear) like this:

Code: Select all

own_names["man"] = not own_names["man"] or nil
A spoon is basically a tiny bowl with a stick on it

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Clientmod] Chatbell [chatbell]

by Desour » Post

Yeah, modstorage should be used, I was just too lazy yet.
And I should add "s_compability?" to depends.txt. (I wonder why in there is "csm_com?"…)
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

Enrikoo
Member
Posts: 452
Joined: Thu Nov 16, 2017 18:18
GitHub: Enrikoo
IRC: Enrico - Enricoo - Enrlco
In-game: Enrico - Enriko
Location: Germany
Contact:

Re: [Clientmod] Chatbell [chatbell]

by Enrikoo » Post

So buggy

Code: Select all

2017-12-05 15:35:03: ERROR[Main]: ModError: Failed to load and run script from C:\Users\USERNAME\Downloads\minetest-0.4.17-0e2dad6-win64\minetest-0.4.17-0e2dad6-win64\bin\..\clientmods\chatbell\init.lua:
2017-12-05 15:35:03: ERROR[Main]: ...0.4.17-0e2dad6-win64\bin\..\clientmods\chatbell\init.lua:44: attempt to call field 'register_on_receiving_chat_message' (a nil value)

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: [Clientmod] Chatbell [chatbell]

by ChimneySwift » Post

Enrikoo wrote:So buggy

Code: Select all

2017-12-05 15:35:03: ERROR[Main]: ModError: Failed to load and run script from C:\Users\USERNAME\Downloads\minetest-0.4.17-0e2dad6-win64\minetest-0.4.17-0e2dad6-win64\bin\..\clientmods\chatbell\init.lua:
2017-12-05 15:35:03: ERROR[Main]: ...0.4.17-0e2dad6-win64\bin\..\clientmods\chatbell\init.lua:44: attempt to call field 'register_on_receiving_chat_message' (a nil value)
-_-

Did you even read the previous posts?

viewtopic.php?f=53&t=17837&start=25#p296880
A spoon is basically a tiny bowl with a stick on it

Enrikoo
Member
Posts: 452
Joined: Thu Nov 16, 2017 18:18
GitHub: Enrikoo
IRC: Enrico - Enricoo - Enrlco
In-game: Enrico - Enriko
Location: Germany
Contact:

Re: [Clientmod] Chatbell [chatbell]

by Enrikoo » Post

Thnaks for comment me back, maybe it works ^^

ektor
Member
Posts: 79
Joined: Sat Sep 24, 2016 11:59
IRC: dtarcz
In-game: ektor
Contact:

Re: [Clientmod] Chatbell [chatbell]

by ektor » Post

Thanks a lot for this CSM.
for me it works fine and is very useful !!
Vive Minetest!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest