Console Input Plugin for Squirrel

Started by ysc3839, Mar 14, 2015, 05:25 AM

Previous topic - Next topic

ysc3839

Feature
Linux readline support.
In past version of this plugin, if you press arrow keys you will get characters like "^[[A^[[B^[[C^[[D".
Now with readline you can move the cursor or use command history.

Usage
function onConsoleInput(cmd, arg)
{
print(cmd + " " + arg);
}

Source & Download
https://bitbucket.org/ysc3839/0.4-cmdinput/downloads/

Version 1.3.1+ works on both v23(04rel004) and v30(04rel006) servers.

.

.

Sk

if you are asking about how to use it then you can use it like this.
one example
function onConsoleInput(cmd,text)
{
if (cmd = "test") print(text);
}
will output this http://s20.postimg.org/sv2xkxij1/2015_03_14_165423.png
 when you type "test this is some test to check this plugin" in console.
btw thankx for the plugin ysc :).

.

So, this happens once when you start the server? The server start-up is paused until the user inserts some text with something like std::cin and then it can proceed? Well, if your server has an auto-restart-on-crash protection then you might need to re-think your script.
.

ysc3839

Quote from: S.L.C on Mar 14, 2015, 12:15 PMSo, this happens once when you start the server? The server start-up is paused until the user inserts some text with something like std::cin and then it can proceed? Well, if your server has an auto-restart-on-crash protection then you might need to re-think your script.
I don't know what you say. I use a thread to get user's input, and then use OnFrame to execute the script.

.

Quote from: ysc3839 on Mar 14, 2015, 03:34 PMI don't know what you say. I use a thread to get user's input, and then use OnFrame to execute the script.

Why not just say that in the first place :-\ Every plugin deserves an introduction and not just: Download my plugin here...
.

DizzasTeR

FINALLY DAMN IT!

Atleast won't need to go ingame to test or execute a simple thing now... very helpful.

ysc3839

Quote from: S.L.C on Mar 14, 2015, 03:40 PM
Quote from: ysc3839 on Mar 14, 2015, 03:34 PMI don't know what you say. I use a thread to get user's input, and then use OnFrame to execute the script.

Why not just say that in the first place :-\ Every plugin deserves an introduction and not just: Download my plugin here...
There is the plugin source code. I don't want to say anything.

.

Quote from: ysc3839 on Mar 15, 2015, 02:29 AMThere is the plugin source code. I don't want to say anything.

Not anyone can read through C++ source code :-\
.

Fuzzie

Quote from: S.L.C on Mar 15, 2015, 10:14 AM
Quote from: ysc3839 on Mar 15, 2015, 02:29 AMThere is the plugin source code. I don't want to say anything.

Not anyone can read through C++ source code :-\
I agree with S.L.C. Provide a simple documentation about your plugin so that users can know what your plugin can do. How hard can that be?

Gudio

I see a lot of new people here, who haven't ever used 0.3zR2 squirrel server and onConsoleInput in their scripts, seriously. :)

Gudio

#11
Feel free to PM me for Linux .so :P


ysc3839

Quote from: Gudio on Mar 15, 2015, 11:26 AMFeel free to PM me for Linux .so :P


I hope you can put the source code on internet! :)
BTW, Can you give me your plugin in the image? I think is useful!

jayant

@ysc3839 - cmdinputrel32 isnt there in bitbucket.Please reupload. Thanks.

Gudio

Quote from: jayant on Mar 28, 2015, 06:41 AM@ysc3839 - cmdinputrel32 isnt there in bitbucket.Please reupload. Thanks.
It is.