Hi.
I hate all "<empty> go" spam but i don't want to kick them because I need fresh blood ;)
So I wrote a patch that enables an ignore selection of a network client.
Everyone can ignore spammers locally without being the host and without kicking them.
There is only 1 ToDo:
- Small icon for ignoring a client
I really hope, the patch will get committed because at least I need it ;)
I hate all "<empty> go" spam but i don't want to kick them because I need fresh blood ;)
So I wrote a patch that enables an ignore selection of a network client.
Everyone can ignore spammers locally without being the host and without kicking them.
There is only 1 ToDo:
- Small icon for ignoring a client
I really hope, the patch will get committed because at least I need it ;)
Looks good; I'd put it in if you finish it.
* No Licence (ISC)
* Pleae use getters/setters for new code (C4Client::IsIgnored())
* Ideally, ignore should carry over into the game and be adjusted in the network client list (F4)
* Icon missing :P - you could just mark the ignore status in the client name, e.g. put it in <i> or <c 929292>. Or have a new icon added into the text as {{Ico::Ignore}} markup.
* Put something like "Chat ignored" into the client name label tooltip
* Missing localized strings are usually marked as [!]; not with a TODO
* No Licence (ISC)
* Pleae use getters/setters for new code (C4Client::IsIgnored())
* Ideally, ignore should carry over into the game and be adjusted in the network client list (F4)
* Icon missing :P - you could just mark the ignore status in the client name, e.g. put it in <i> or <c 929292>. Or have a new icon added into the text as {{Ico::Ignore}} markup.
* Put something like "Chat ignored" into the client name label tooltip
* Missing localized strings are usually marked as [!]; not with a TODO
* Herby i license the following under the WTFPL
* I implemented it
* No, the game chat has an other relevance than the lobby.
* Icon is added to C4GUI:: and waits for being drawn (number 52 - but i can only commit text changes :P)
* Done
* Done
Note: something is still not working :(
* I implemented it
* No, the game chat has an other relevance than the lobby.
* Icon is added to C4GUI:: and waits for being drawn (number 52 - but i can only commit text changes :P)
* Done
* Done
Note: something is still not working :(
As a quick guess, maybe it is because you refuse to do what we have been telling you in #openclonk-dev: Initialise the new member variable in *both* constructors.
here you have the final working patch ready to commit (username: carli)
Do not put spaces around -> or after !, consider using const char* instead of StdCopyStrBuf when you do not actually require a copy of the string, do not use pascal-casing inside single words like "UnIgnore", spell ToDo as TODO instead. I guess you could make an argument for not having a space after { and before } in a single-line function, but everybody else is putting them there so you probably should.
> Icon is added to C4GUI:: and waits for being drawn (number 52 - but i can only commit text changes :P)
No, you can. Just attach the patch as a mercurial bundle, or attach the icons file separately. To add the stringtables, simply add a new line in planet/System.c4g/Language*.txt, and use LoadResStr. Compared to the hoops you already jumped through, that's no big task.
Also, "Ignore" is a unhelpful comment, and initialization of class members should be done in the initialization list, same as for example pNetClient. Also, use tabs for indentation (you have a few lines indented with spaces). I know that these rules aren't consistently applied in the existing code, but cleaning that up is already a dull task, no need to add to the pile.
here you have.
Attachment: ignore.patch - really-really final (6k)
+IDS_NET_CLIENTIGNORE=You can't even read his messages
What about "her"?
Also, uh,
What about "her"?
Also, uh,
> initialization of class members should be done in the initialization list, same as for example pNetClient.
This is the current version of this patch.
I hope, this patch gets committed
I hereby license the following file(s) under the CC-by license
I hope, this patch gets committed
I hereby license the following file(s) under the CC-by license
Attachment: ignore.patch (7k)
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill