/viewcmds on/off

/viewcmds on/off

Postby Leeizazombie » 22 Jul 2013, 02:11

Hello, I wasnt sure if this was possibile, but you would be pretty awesome to work it, that everytime someone uses a command it will Player.SendMessage every Admin that the Player used /command, This can clearly be enabled or disabled, for spam prevention, i'm not sure, maybe it can be done the way /last was made, goodluck ;)
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Re: /viewcmds on/off

Postby Conor » 24 Jul 2013, 09:16

I don't think there is an event which is triggered when a player uses a command, making this impossible to make.
Conor (Conanza121)
User avatar
Conor
Coder
 
Posts: 390
Joined: 10 Oct 2012, 21:36
Location: @21Conor

Re: /viewcmds on/off

Postby Leeizazombie » 24 Jul 2013, 13:46

Conor wrote:I don't think there is an event which is triggered when a player uses a command, making this impossible to make.

Okay, lets say I made some commands, and I wana see who uses them, how do trigger my own event in a code? and of course have another command get triggered by it? just for an educational purpose I guess.
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Re: /viewcmds on/off

Postby Clowny » 24 Jul 2013, 16:47

Well if the commands are obviously viewable in console wouldn't there be a way to forward that...? And how about how lee was saying.. how was the /last command made it would kinda be like that except the commands are all automatically shown to admins
Founder Of MC Classic Hosting Community http://mcclassichosting.webs.com
Founder of MC Classic Software MCReborn http://mcreborn.tk
Professional Hoster and Basic C# Coder
Image
User avatar
Clowny
 
Posts: 112
Joined: 14 Jul 2013, 03:53

Re: /viewcmds on/off

Postby Conor » 24 Jul 2013, 23:01

Leeizazombie wrote:
Conor wrote:I don't think there is an event which is triggered when a player uses a command, making this impossible to make.

Okay, lets say I made some commands, and I wana see who uses them, how do trigger my own event in a code? and of course have another command get triggered by it? just for an educational purpose I guess.


It would be possible to notify staff when a player uses a custom command. Just add into the Use method something like;
Code: Select all
Player.GlobalMessageOps(p.color + p.PublicName + Server.DefaultColor + " used " + c.lime + name);


Clowny wrote:Well if the commands are obviously viewable in console wouldn't there be a way to forward that...? And how about how lee was saying.. how was the /last command made it would kinda be like that except the commands are all automatically shown to admins


There would be a 'way to forward that' - with the use of an event. This event is not within the MCDzienny source code so we cannot do anything about it, unless Dzienny decided to add one. The /last command will read from a string in the Player class which holds the name of the last command a player used. This is not an event and it is not a reliable way of creating this plugin.

It would be possible to run a timer that checks whether a player's last command is different, if it is, a message can be sent to ops - which mimics what outcome we want. However, if a player repeatedly uses the same command, this will be ignored and ops will not be informed, making it a bit unreliable.
Conor (Conanza121)
User avatar
Conor
Coder
 
Posts: 390
Joined: 10 Oct 2012, 21:36
Location: @21Conor

Re: /viewcmds on/off

Postby Clowny » 25 Jul 2013, 05:11

Interesting maybe we should talk to dzienny about it :D
Founder Of MC Classic Hosting Community http://mcclassichosting.webs.com
Founder of MC Classic Software MCReborn http://mcreborn.tk
Professional Hoster and Basic C# Coder
Image
User avatar
Clowny
 
Posts: 112
Joined: 14 Jul 2013, 03:53


Return to Requests for Addon

Who is online

Users browsing this forum: No registered users and 4 guests

cron