[Clientmod] Chatbell [chatbell]

User avatar
DS-minetest
Member
 
Posts: 968
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Clientmod] Chatbell [chatbell]

by DS-minetest » Tue Oct 10, 2017 16:55

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 not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

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

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Tue Oct 10, 2017 18:38

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
 

User avatar
DS-minetest
Member
 
Posts: 968
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Clientmod] Chatbell [chatbell]

by DS-minetest » Wed Oct 11, 2017 13:22

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.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
DS-minetest
Member
 
Posts: 968
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Clientmod] Chatbell [chatbell]

by DS-minetest » Wed Oct 11, 2017 15:59

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! : )
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

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

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Wed Oct 11, 2017 18:03

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!
 

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

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Wed Oct 11, 2017 18:08

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)
 

ChimneySwift
Member
 
Posts: 62
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Clientmod] Chatbell [chatbell]

by ChimneySwift » Thu Oct 12, 2017 02:55

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.
 

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

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Thu Oct 12, 2017 07:48

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!
 

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

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Thu Oct 12, 2017 07:54

can you make the nicknames save on the mod storage?
 

ChimneySwift
Member
 
Posts: 62
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Clientmod] Chatbell [chatbell]

by ChimneySwift » Thu Oct 12, 2017 23:58

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.
 

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

Re: [Clientmod] Chatbell [chatbell]

by ManElevation » Fri Oct 13, 2017 09:41

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
 

ChimneySwift
Member
 
Posts: 62
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Clientmod] Chatbell [chatbell]

by ChimneySwift » Fri Oct 13, 2017 09:47

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
 

User avatar
DS-minetest
Member
 
Posts: 968
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [Clientmod] Chatbell [chatbell]

by DS-minetest » Sat Oct 14, 2017 15:25

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?"…)
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
Enrikoo
Member
 
Posts: 146
Joined: Thu Nov 16, 2017 18:18
Location: Germany
GitHub: Enrikoo
IRC: Enrico
In-game: Enrico

Re: [Clientmod] Chatbell [chatbell]

by Enrikoo » Tue Dec 05, 2017 14:41

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)
Join my server Enrico Craft on address: minetesthosting.com port: 31079 | Visit GitHub of my minetest server.
 

ChimneySwift
Member
 
Posts: 62
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Clientmod] Chatbell [chatbell]

by ChimneySwift » Wed Dec 06, 2017 03:09

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
 

User avatar
Enrikoo
Member
 
Posts: 146
Joined: Thu Nov 16, 2017 18:18
Location: Germany
GitHub: Enrikoo
IRC: Enrico
In-game: Enrico

Re: [Clientmod] Chatbell [chatbell]

by Enrikoo » Wed Dec 06, 2017 05:39

Thnaks for comment me back, maybe it works ^^
Join my server Enrico Craft on address: minetesthosting.com port: 31079 | Visit GitHub of my minetest server.
 

Previous

Return to Client-side modding



Who is online

Users browsing this forum: No registered users and 1 guest