Page 1 of 1

/warn

Posted: June 4th, 2011, 8:54 pm
by Sennec
/warn could be extremely helpful. Whenever I catch someone griefing, I don't know if they were warned before or not, unless I warned them myself. So I want to introduce /warn.
When you catch someone griefing, you /freeze etc and then you warn him like this.

/warn username your warning message, whatever
(username works like /tp username, you don't have to type the whole name)

What would happen is that the griefer gets a pm, as with @username, with the reason. At the same time, that reason gets added to his /info. When he receives more than 1 warning, the info shows how many warnings he already has + the last warning.

Re: /warn

Posted: June 4th, 2011, 9:00 pm
by Sanjar Khan
Whenever I see someone freezing someone I have warned before, I inform them of that in staff chat.

Re: /warn

Posted: June 4th, 2011, 9:06 pm
by Sennec
Ofcourse, but not everyone is paying attention to that all the time. And often, the person who warned before is simply offline.

Re: /warn

Posted: June 6th, 2011, 8:17 am
by Intertoothh
I like the idea.
But i dont think it should msg the player.

And it could be 'random' information about a user.
/setinfo Freddie Dont beleive his lies.

And only shows to op+ on the /info

Re: /warn

Posted: June 6th, 2011, 4:36 pm
by Hafnium
/setinfo already does something.

Re: /warn

Posted: June 9th, 2011, 4:10 pm
by Sennec
Hafnium wrote:/setinfo already does something.
That command requires trustee rank though.

Re: /warn

Posted: June 9th, 2011, 5:09 pm
by Hafnium
The thing it does isn't the thing you want. I was responding to inter's suggestion for a name.

Re: /warn

Posted: June 14th, 2011, 10:18 am
by Intertoothh
/setinfo is for kickcount etc, forget that.


/addinfo <playername> <info>

/info <playername> will add this info for op+

Re: /warn

Posted: June 15th, 2011, 8:39 am
by Intertoothh
or setnote.

*cough*
for ModerationCommands.cs

Code: Select all

static readonly CommandDescriptor cdSetNote = new CommandDescriptor {
	            Name = "setnote",
	            Category = CommandCategory.Moderation,
	            IsConsoleSafe = true,
	            IsHidden = true,
	            Permissions = new[] { Permission.SetPlayerNote },
	            Help = "Add a note to a player",
	            Usage = "/setnote PlayerName Note",
	            Handler = SetNote
	        };

internal static void SetNote( Player player, Command cmd ) {
                    string targetName = cmd.Next();
	            string note = cmd.Next();

	            if( targetName == null || note == null ) {
	                cdSetNote.PrintUsage( player );
	                return;
	            }
	
	            PlayerInfo info;
	            if( !PlayerDB.FindPlayerInfo( targetName, out info ) ) {
	                player.Message( "More than one player found matching \"{0}\"", targetName );
	            } else if( info == null ) {
	                player.NoPlayerMessage( targetName );
	            } else {
	                        string oldNote = info.PlayerNote;
                                info.PlayerNote = note;
	                        player.Message( "Note for {0}&S changed from \"{1}\" to \"{2}\"",
	                                        info.GetClassyName(),
	                                        oldNote,
	                                        info.PlayerNote);
	                        return;
	            }

}
todo:
Add permission
Add to player class
Add to playerdb
Add CommandManager.RegisterCommand(SetNote) to constructor or init;


Proberly missed more, but i'm not that into your code yet.

Re: /warn

Posted: June 15th, 2011, 11:33 am
by shankd0g
what is this code you're editing? fcraft server code?

are these some things you'll be submitting to fragmer for inclusion?

just wondering since i've seen other threads with your code revisions and they seem legit even tho i'm no programmer.

Re: /warn

Posted: June 15th, 2011, 11:55 am
by Intertoothh
Yep this is fcraft server code.

Re: /warn

Posted: June 15th, 2011, 11:59 am
by Sanjar Khan
Hacker!

Re: /warn

Posted: June 15th, 2011, 5:14 pm
by Lim-Dul
This is a suggestion (and piece of code) that will be sent to fragmer. We won't mod the server in any way ourselves since we ARE the official server after all. =)

Re: /warn

Posted: June 16th, 2011, 7:20 am
by Intertoothh
I know, just helping fragmer a bit :).

Maybe if i have time off in the weekend i can write the code for the chatchannels, if fragmer finds it a good idea that is. Its a bit more work then above.

Re: /warn

Posted: February 8th, 2012, 3:21 pm
by PolakWithABlock
Bump
Have this been implemented yet?
If so, what is the command code?
/warn?
/add info in my opinion will get confusing a simply /warn is better.

I'm not suggesting that a warning should appear on the frozen person screen just on the /info.
So the method would be /freeze warn them, then type /warn <reason> (ie. suspected griefer, spleefer, suck up, etc.) /unfreeze.

Re: /warn

Posted: February 8th, 2012, 4:43 pm
by BobKare
I think a warn system is planned for 0.700.
It might mean something else, though^^

Re: /warn

Posted: February 8th, 2012, 7:42 pm
by fragmer
Yeah, I promise a lot of things, don't I :P

Re: /warn

Posted: February 9th, 2012, 7:42 am
by Silvytabitha
LOL :P

Re: /warn

Posted: February 9th, 2012, 12:50 pm
by Jonty800
string note = cmd.Next(); -----> string note = cmd.NextAll();

.Next() = one word
.NextAll() = many words

:)

Re: /warn

Posted: February 9th, 2012, 3:38 pm
by BobKare
Oh, so that's the difference ^^

Re: /warn

Posted: February 10th, 2012, 8:42 pm
by Loading...
Yes /warn is a good suggestion we must oly wait for it :)

And its was Suggested 100000x (because its a good idea ;D)

I hope for a update