Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Command" feature #47

Open
nikic opened this issue Dec 8, 2012 · 7 comments
Open

"Command" feature #47

nikic opened this issue Dec 8, 2012 · 7 comments
Labels

Comments

@nikic
Copy link

nikic commented Dec 8, 2012

I'd like to see some kind of command system that allows you to perform certain actions by typing stuff in the textbox. The JS room has a system like this using a bot (which isn't a real bot but just a script somebody in the room runs). The list of commands available for that bot is here: https://github.com/Zirak/SO-ChatBot/wiki/Interacting-with-the-bot

For the purposes of this plugin I'd rather not have a bot behavior (where everybody can post a command and you then perform the action), but rather something that is per-user. I.e. you type something into the text box and this produces some kind of message.

I'd use a syntax that is as short as possible. The JS room uses the !!/ prefix, I'd go for just !. Some useful commands I can think of for the PHP room:

  • !doc strpbrk: Creates a link to the PHP documentation
  • !snippet [name]: Pastes a certain snippet. Examples could be !snippet mysql or !snippet fixed-font
  • !eval [expr]: Evaluates an expression. Not sure how to technically realize this.

There's probably a lot more useful stuff that will turn up along the way, I'm just not very creative ^^

This is basically a generalized version of #42.

@DaveRandom DaveRandom mentioned this issue Dec 8, 2012
@DaveRandom
Copy link
Contributor

!doc and !snippet should be easy enough, what kind of expression do you envisage !eval would evaluate?

When I was looking at #42 and #31 I did wonder if they were outside the scope of the [cv-helper] and may be better implemented as a separate project, or at least made modular?

@MadaraUchiha
Copy link

I'd argue that this is quite out of the scope of this script.

@nikic
Copy link
Author

nikic commented Dec 11, 2012

I feel like it makes little sense to make this a pure "cv-pls" extension, rather it can be a general extension for the SO chat. Browser extensions do have a good bit of implementational overhead, so I don't think it makes sense to get over-modularizing with them.

@MadaraUchiha
Copy link

In that case, the extension needs to be renamed, doesn't it?
On Dec 11, 2012 9:47 AM, "nikic" notifications@github.com wrote:

I feel like it makes little sense to make this a pure "cv-pls" extension,
rather it can be a general extension for the SO chat. Browser extensions do
have a good bit of implementational overhead, so I don't think it makes
sense to get over-modularizing with them.


Reply to this email directly or view it on GitHubhttps://github.com//issues/47#issuecomment-11234131.

@DaveRandom
Copy link
Contributor

I will look into the possibility of a jQuery-UI style "build it with the bits you want" downloader. That way you have a generic browser-specific extension wrapper running multiple applications with a single instance of the aforementioned overheads.

The Mozilla build process is just zip and change file extension to .xpi so that (for once with Mozilla) is fairly simple, Chrome's build process is a black box though so I'm not sure how you would deal with that, I'd rather not reverse engineer it, I'll look for a spec.

@PeeHaa
Copy link
Contributor

PeeHaa commented Dec 11, 2012

@DaveRandom Chrome's extensions are also some kind of zip.

@DaveRandom
Copy link
Contributor

@PeeHaa https://developer.chrome.com/extensions/crx.html - should be doable I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants