Page 2 of 2

Re: [Clientmod] Chatbell [chatbell]

Posted: Tue Oct 10, 2017 16:55
by Desour
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.

Re: [Clientmod] Chatbell [chatbell]

Posted: Tue Oct 10, 2017 18:38
by ManElevation
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

Re: [Clientmod] Chatbell [chatbell]

Posted: Wed Oct 11, 2017 13:22
by Desour
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.

Re: [Clientmod] Chatbell [chatbell]

Posted: Wed Oct 11, 2017 15:59
by Desour
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! : )

Re: [Clientmod] Chatbell [chatbell]

Posted: Wed Oct 11, 2017 18:03
by ManElevation
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!

Re: [Clientmod] Chatbell [chatbell]

Posted: Wed Oct 11, 2017 18:08
by ManElevation
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)

Re: [Clientmod] Chatbell [chatbell]

Posted: Thu Oct 12, 2017 02:55
by ChimneySwift
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 :)

Re: [Clientmod] Chatbell [chatbell]

Posted: Thu Oct 12, 2017 07:48
by ManElevation
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!

Re: [Clientmod] Chatbell [chatbell]

Posted: Thu Oct 12, 2017 07:54
by ManElevation
can you make the nicknames save on the mod storage?

Re: [Clientmod] Chatbell [chatbell]

Posted: Thu Oct 12, 2017 23:58
by ChimneySwift
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.

Re: [Clientmod] Chatbell [chatbell]

Posted: Fri Oct 13, 2017 09:41
by ManElevation
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

Re: [Clientmod] Chatbell [chatbell]

Posted: Fri Oct 13, 2017 09:47
by ChimneySwift
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

Re: [Clientmod] Chatbell [chatbell]

Posted: Sat Oct 14, 2017 15:25
by Desour
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?"…)

Re: [Clientmod] Chatbell [chatbell]

Posted: Tue Dec 05, 2017 14:41
by Enrikoo
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)

Re: [Clientmod] Chatbell [chatbell]

Posted: Wed Dec 06, 2017 03:09
by ChimneySwift
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

Re: [Clientmod] Chatbell [chatbell]

Posted: Wed Dec 06, 2017 05:39
by Enrikoo
Thnaks for comment me back, maybe it works ^^

Re: [Clientmod] Chatbell [chatbell]

Posted: Fri Feb 16, 2018 23:10
by ektor
Thanks a lot for this CSM.
for me it works fine and is very useful !!