Idea for 0.4: sty+ct(+ap)?
Idea for 0.4: sty+ct(+ap)?
Half of the servers around here use sty+ct / sty+ct+ap. Why don't we implement features from +ap into 0.4?
Some stuff that is in +ap:
> Reporting with /reports
> More than just 2 colors in a name.
> Speed/Accel zones, object zone
> CENTER_PLAYER_MESSAGE (Send a center message that only appears in that person's screen)
> {More of a client thing}: Color tab completion. (Colored player's names in tab completion)
And quite a lot of stuff in sty+ct too, which would also be too much to name. Mostly additional zones and more player controls though.
Some stuff that is in +ap:
> Reporting with /reports
> More than just 2 colors in a name.
> Speed/Accel zones, object zone
> CENTER_PLAYER_MESSAGE (Send a center message that only appears in that person's screen)
> {More of a client thing}: Color tab completion. (Colored player's names in tab completion)
And quite a lot of stuff in sty+ct too, which would also be too much to name. Mostly additional zones and more player controls though.
- kyle
- Reverse Outside Corner Grinder
- Posts: 1876
- Joined: Thu Jun 08, 2006 3:33 pm
- Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
- Contact:
Re: Idea for 0.4: sty+ct(+ap)?
This is already part of zonesV2aP|Nelg wrote:> Speed/Accel zones, object zone
Re: Idea for 0.4: sty+ct(+ap)?
Thats not what I meant, I meant the way it is in +ap. You cant have a name longer than a certain length still, but you can set your colors up and the colors aren't included in the length testing. Durf could explain more what I mean probably.
You don't have to depend on admins renaming you either.
Where is the spawn_zone command then? I wanna try it.kyle wrote:This is already part of zonesV2aP|Nelg wrote:> Speed/Accel zones, object zone
- kyle
- Reverse Outside Corner Grinder
- Posts: 1876
- Joined: Thu Jun 08, 2006 3:33 pm
- Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
- Contact:
Re: Idea for 0.4: sty+ct(+ap)?
Spawn_Zone is something that will have to be implemented, Not near as simple as it was in 0.2.8 since zones don't have to be circles. I'm thinking about maybe including the shape of the zone in a resource file, then give the ability to set position and whatnot, Note: nothing has been coded, and 0.4 zones don't have motion, that's why I think moving zones is the next logical step since CTF has basically been implemented.
Other things to consider
Enhanced ladderlog output, easy, but painstaking to implement ( would suggest just this in it's own branch to hopefully merge in once done)
Once we have moving zones then
-Styball
-shooting
-spawn_zone
Also i think we can hijack some of voodoo's commits for Delayed_command
The other things you mentioned should be pretty straightforward to implement, Just not 100% that all of them would be deemed as desirable to include with it. And sty may not be included until a release after 0.4.
Final note:
try some of thees really old zones_v2 maps by ed
http://crazy-tronners.com/resource/ed/zones_v2/
For instance this has acceleration
Other things to consider
Enhanced ladderlog output, easy, but painstaking to implement ( would suggest just this in it's own branch to hopefully merge in once done)
Once we have moving zones then
-Styball
-shooting
-spawn_zone
Also i think we can hijack some of voodoo's commits for Delayed_command
The other things you mentioned should be pretty straightforward to implement, Just not 100% that all of them would be deemed as desirable to include with it. And sty may not be included until a release after 0.4.
Final note:
try some of thees really old zones_v2 maps by ed
http://crazy-tronners.com/resource/ed/zones_v2/
For instance this has acceleration
Code: Select all
MAP_FILE ed/zones_v2/autumn-0.0.4.aamap.xml(http://crazy-tronners.com/resource/ed/zones_v2/autumn-0.0.4.aamap.xml)
Re: Idea for 0.4: sty+ct(+ap)?
Nuke from orbit.
Re: Idea for 0.4: sty+ct(+ap)?
Those sound good. Easy to integrate patches welcome.aP|Nelg wrote:> Reporting with /reports
> CENTER_PLAYER_MESSAGE (Send a center message that only appears in that person's screen)
I'd take that too, even though...aP|Nelg wrote:> {More of a client thing}: Color tab completion. (Colored player's names in tab completion)
No. You get 15 characters for your name. You're not supposed to be able to use colours in the first place, but if you absolutely must, we let you waste 8 of those characters for a silly mid-name colour change.aP|Nelg wrote:> More than just 2 colors in a name.
Speed zones should already work in Zones 2.0. I may be wrong. If I am, the way to implement them would be to add the appropriate effect.
Re: Idea for 0.4: sty+ct(+ap)?
I'm having a hard time imagining this being used in a helpful manner rather than a new way to annoy specific people with spam. Lots of potential for abuse there.aP|Nelg wrote:CENTER_PLAYER_MESSAGE (Send a center message that only appears in that person's screen)
Re: Idea for 0.4: sty+ct(+ap)?
Sounds like fun we should totally do itsinewav wrote:I'm having a hard time imagining this being used in a helpful manner rather than a new way to annoy specific people with spam. Lots of potential for abuse there.aP|Nelg wrote:CENTER_PLAYER_MESSAGE (Send a center message that only appears in that person's screen)
bye
Re: Idea for 0.4: sty+ct(+ap)?
Theres potential that CENTER_MESSAGE will cause spam too... does that mean we should remove that too?sinewav wrote:I'm having a hard time imagining this being used in a helpful manner rather than a new way to annoy specific people with spam. Lots of potential for abuse there.aP|Nelg wrote:CENTER_PLAYER_MESSAGE (Send a center message that only appears in that person's screen)
0x colo(u)r codes aren't technically visible characters though.Z-Man wrote:No. You get 15 characters for your name. You're not supposed to be able to use colours in the first place, but if you absolutely must, we let you waste 8 of those characters for a silly mid-name colour change.aP|Nelg wrote:> More than just 2 colors in a name.
Re: Idea for 0.4: sty+ct(+ap)?
MORE +ap stuff:
> Theres built in racing in +ap. No need for external scripts for racing
> KILL_ALL and RESPAWN_ALL
> Downloading settings from the server (as long as the owner has it allowed and enabled)
> DESTROY_ZONE, DESTROY_ALL and COLLAPSE_ALL (zone commands. Destroying a zone makes it disappear instantly instead of smoothly collapsing {within limitations of lag})
> BANNED_WORDS for banning words and phrases. Way to force rules on someone who refuses to follow them.
> Convert capital color codes to lowercase color codes (except RESETT)
> /chat - Admins can chat privately amongst themselves
I wouldn't recommend LOGIN command because of the potential of forcing someone to login, to steal the player's password. However, it would also be the player's fault for having the password saved on disk instead of having it not being saved. LOGOUT is exactly the same as DEOP.
> Theres built in racing in +ap. No need for external scripts for racing
> KILL_ALL and RESPAWN_ALL
> Downloading settings from the server (as long as the owner has it allowed and enabled)
> DESTROY_ZONE, DESTROY_ALL and COLLAPSE_ALL (zone commands. Destroying a zone makes it disappear instantly instead of smoothly collapsing {within limitations of lag})
> BANNED_WORDS for banning words and phrases. Way to force rules on someone who refuses to follow them.
> Convert capital color codes to lowercase color codes (except RESETT)
> /chat - Admins can chat privately amongst themselves
I wouldn't recommend LOGIN command because of the potential of forcing someone to login, to steal the player's password. However, it would also be the player's fault for having the password saved on disk instead of having it not being saved. LOGOUT is exactly the same as DEOP.
Re: Idea for 0.4: sty+ct(+ap)?
That was a bit defensiveZ-Man wrote:Those sound good. Easy to integrate patches welcome.aP|Nelg wrote:> Reporting with /reports
> CENTER_PLAYER_MESSAGE (Send a center message that only appears in that person's screen)
I'd take that too, even though...aP|Nelg wrote:> {More of a client thing}: Color tab completion. (Colored player's names in tab completion)
No. You get 15 characters for your name. You're not supposed to be able to use colours in the first place, but if you absolutely must, we let you waste 8 of those characters for a silly mid-name colour change.aP|Nelg wrote:> More than just 2 colors in a name.
Speed zones should already work in Zones 2.0. I may be wrong. If I am, the way to implement them would be to add the appropriate effect.
This just off the top of my head: Imagine (if you've tried a server like HFT) being able to type "/start" and you're shown an inventory that chat can't get in the way of (center message looking like your usual pause-inventory menu) .sinewav wrote:I'm having a hard time imagining this being used in a helpful manner rather than a new way to annoy specific people with spam. Lots of potential for abuse there.aP|Nelg wrote:CENTER_PLAYER_MESSAGE (Send a center message that only appears in that person's screen)
Even better could only be:
Code: Select all
FULLSCREEN_PLAYER_MESSAGE
Re: Idea for 0.4: sty+ct(+ap)?
Thanks for the +ap idea, I'll think about whether its a good idea or not for +ap, cause it seems like it would be kind of annoying to have to see a fullscreen message during a game.ConVicT wrote:This just off the top of my head: Imagine (if you've tried a server like HFT) being able to type "/start" and you're shown an inventory that chat can't get in the way of (center message looking like your usual pause-inventory menu) .
Even better could only be:Code: Select all
FULLSCREEN_PLAYER_MESSAGE
Re: Idea for 0.4: sty+ct(+ap)?
Let's say when you "/start" you actually type / start <seconds>" whilst you're in fullscreen (pause menu), your chatbot is activated, just as chat would ( I can't tell you it already does do that if you're forced to fullscreen but I reckon it probably does).
Re: Idea for 0.4: sty+ct(+ap)?
Z-Man wrote:Those sound good. Easy to integrate patches welcome.aP|Nelg wrote:> Reporting with /reports
> CENTER_PLAYER_MESSAGE (Send a center message that only appears in that person's screen)
Code: Select all
--- /home/administrator/0.4/src/engine/ePlayer.cpp 2015-11-21 17:36:14.627537000 -0500
+++ /home/administrator/0.4-reporttest/src/engine/ePlayer.cpp 2016-03-23 20:22:08.700856801 -0400
@@ -3228,6 +3228,183 @@
se_ChatTeam( p, msg, spam );
}
+static void se_ChatReport( ePlayerNetID * p, std::istream & s )
+{
+ tString msg;
+ tOutput reportPlayer;
+ msg.ReadLine(s);
+
+ if (msg != "")
+ {
+ tString reporMsg;
+ reporMsg << st_GetCurrentTime("[%Y/%m/%d-%H:%M:%S]");
+ reporMsg << " ";
+ reporMsg << p->GetMachine().GetIP();
+ reporMsg << " ";
+ reporMsg << p->GetUserName();
+ reporMsg << " ";
+ reporMsg << msg;
+ reporMsg << "\n";
+
+ std::ofstream o;
+ if (tDirectories::Var().Open(o, "reports.txt", std::ios::app))
+ {
+ o << reporMsg;
+ reportPlayer << "$chat_message_report_respond_ok";
+ reportPlayer << msg << "\n";
+ }
+ else
+ {
+ reportPlayer << "$chat_message_report_respond_no";
+ }
+ o.close();
+ }
+ else
+ {
+ reportPlayer << "$chat_message_report_message_empty";
+ }
+ sn_ConsoleOut(reportPlayer, p->Owner());
+}
+
+static int se_ReportsCount()
+{
+ int count = 0;
+
+ std::ifstream i;
+ if (tDirectories::Var().Open(i, "reports.txt"))
+ {
+ while (!i.eof())
+ {
+ std::string sayLine;
+ std::getline(i, sayLine);
+ std::istringstream s(sayLine);
+
+ tString params;
+ params.ReadLine(s);
+
+ if (params != "")
+ count++;
+ }
+ }
+ i.close();
+
+ return count;
+}
+
+static tArray<tString> se_ReportsMessages()
+{
+ tArray<tString> reports;
+
+ std::ifstream i;
+ if (tDirectories::Var().Open(i, "reports.txt"))
+ {
+ while (!i.eof())
+ {
+ std::string sayLine;
+ std::getline(i, sayLine);
+ std::istringstream s(sayLine);
+
+ tString params;
+ params.ReadLine(s);
+ int pos = 0;
+
+ if (params != "")
+ reports.Insert(params);
+ }
+ }
+ i.close();
+
+ return reports;
+}
+
+tAccessLevel se_AccessLevelReportsRead = tAccessLevel_Default;
+static tSettingItem<tAccessLevel> se_AccessLevelReportsReadConf("ACCESS_LEVEL_REPORTS_READ", se_AccessLevelReportsRead);
+
+tAccessLevel se_AccessLevelReportsClear = tAccessLevel_Admin;
+static tSettingItem<tAccessLevel> se_AccessLevelReportsClearConf("ACCESS_LEVEL_REPORTS_CLEAR", se_AccessLevelReportsClear);
+
+static void se_ChatReadReport( ePlayerNetID * p, std::istream & s )
+{
+ tString type;
+ s >> type;
+
+ if ((type == "") || (type.ToLower() == "list"))
+ {
+ tOutput msg;
+ msg.SetTemplateParameter(1, se_ReportsCount());
+ msg << "$read_reports_count";
+ sn_ConsoleOut(msg, p->Owner());
+ }
+ else if (type.ToLower() == "read")
+ {
+ if (p->GetAccessLevel() > se_AccessLevelReportsRead)
+ {
+ sn_ConsoleOut(tOutput("$read_reports_access_no_read"), p->Owner());
+ return;
+ }
+
+ tString lineNoStr;
+ s >> lineNoStr;
+ if (lineNoStr == "")
+ {
+ sn_ConsoleOut(tOutput("$chat_message_report_read_usage"), p->Owner());
+ return;
+ }
+
+ int lineNo = atoi(lineNoStr);
+ int index = lineNo - 1;
+
+ tArray<tString> report_messages = se_ReportsMessages();
+
+ if ((index < 0) || (index >= report_messages.Len()))
+ {
+ sn_ConsoleOut(tOutput("$chat_message_report_read_none", lineNo), p->Owner());
+ return;
+ }
+
+ tString msg = report_messages[index];
+ int pos = 0;
+ int lnum = 0;
+ tArray<tString> reportSplit;
+
+ while(lnum++ <= 3)
+ {
+ if(lnum > 1)pos = msg.StrPos(pos," ")+1;
+ tString str = msg.SubStr(pos);
+ int stringLen=str.StrPos(" ");str.RemoveSubStr(stringLen,str.length()-stringLen);
+ reportSplit.Insert(str);
+ std::cout << str << "|" << pos << "/" << str.StrPos(" ") << "/" << str.length() << "\n";
+ }
+
+
+ tString pMsg;
+ pMsg << "Report " << lineNo << " by " << reportSplit[2];
+ if(p->GetAccessLevel() <= se_ipAccessLevel)
+ {
+ pMsg << "@" << reportSplit[1];
+ }
+ pMsg << " at " << reportSplit[0] << ": " << msg.SubStr(pos) << "\n";
+ sn_ConsoleOut(pMsg, p->Owner());
+ }
+ else if (type.ToLower() == "clear")
+ {
+ if (p->GetAccessLevel() > se_AccessLevelReportsClear)
+ {
+ sn_ConsoleOut(tOutput("$read_reports_access_no_clear"), p->Owner());
+ return;
+ }
+
+ std::ofstream o;
+ if (tDirectories::Var().Open(o, "reports.txt"))
+ {
+ o << "\n";
+ }
+ o.close();
+
+ sn_ConsoleOut(tOutput("$read_reports_cleared"), p->Owner());
+ }
+}
+
// /msg chat commant: talk to anyone team
static void se_ChatMsg( ePlayerNetID * p, std::istream & s, eChatSpamTester & spam )
{
@@ -3965,6 +4142,23 @@
se_ChatTeam( p, s, spam );
return;
}
+ else if (command == "/report")
+ {
+ spam.factor_ = 1;
+ if ( spam.Block() )
+ {
+ return;
+ }
+ spam.lastSaidType_ = eChatMessageType_Public;
+ se_ChatReport( p, s );
+ return;
+ }
+ else if (command == "/reports")
+ {
+ spam.lastSaidType_ = eChatMessageType_Public;
+ se_ChatReadReport( p, s );
+ return;
+ }
else if (command == "/shout")
{
spam.lastSaidType_ = eChatMessageType_Public;
Code: Select all
--- /home/administrator/0.4/language/english_base.txt 2015-11-21 17:36:14.627537000 -0500
+++ /home/administrator/0.4-reporttest/language/english_base.txt 2016-03-22 00:51:10.842454021 -0400
@@ -3547,6 +3547,16 @@
chat_command_unknown Unknown chat command "\1".\n
chat_command_accesslevel Sorry, your access level is not high enough to use the "\1" command. You're \2, required would be \3.\n
+read_reports_count There are \1 reports.\n
+read_reports_access_no_clear You do not have access to clear the reports.\n
+read_reports_cleared The reports have successfully been cleared.\n
+read_reports_access_no_read You do not have access to read the reports.\n
+chat_message_report_message_empty Your report cannot be empty.\n
+chat_message_report_respond_ok Your report has been saved.\n
+chat_message_report_respond_no Your report was not saved. Please report this issue.\n
+chat_message_report_read_usage /reports read <line number>\n
+chat_message_report_read_none Report \1 does not exist.\n
+
authority_blacklist_help Comma separated list of authorities your server should refuse to query.
authority_whitelist_help If non-empty, only authorities on this comma separated list will be queried by your server.
trust_lan_help If set to 1, the server assumes that your LAN is safe and that nobody can run a pharming server on it.
Jip's patch should work; the line numbers appear to have changedZ-Man wrote:I'd take that too, even though...aP|Nelg wrote:> {More of a client thing}: Color tab completion. (Colored player's names in tab completion)