你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/6332-instasynchp-commands,源站連結 點此以跳轉

InstaSynchP Commands

Plugin for custom commands

当前为 2015-02-21 提交的版本,查看 最新版本



點此查看下載連結位址https://update.greasyfork.org.cn/scripts/6332/37738/InstaSynchP%20Commands.user.js

安装此脚本?
提问、发表评价或者举报此脚本
作者
Zod-
评分
0 0 0
版本
1.0.2
创建于
2014-11-08
更新于
2015-02-21
大小
5.5 KB
许可证
MIT
适用于

InstaSynchP-Commands

Plugin for custom commands

Framework

The commands object can be used to bind custom commands, grab information and execute them. Commands will be queued so the user doesn't get disconneted for flood detection. Every 1 second 4 commands will be sent.

The core will automatically load commands from this.commands when it loads e.g.:

this.commands = {
    "'command": {
        'hasArguments': true,
        'type': 'mod',
        'reference': this,
        'description': 'description',
        'callback': this.execute
    }
};

The first argument of the callback function will be an object of some pre parsed arguments:

opts = {
    usernames: [], //arguments that will fit the username regex
    videos: [], //arguments that could be parsed with the urlParser
    numbers: [] //arguments that are numbers
}

commands.bind

commands.bind({
    "'command": {
        'hasArguments': true,
        'type': 'mod',
        'reference': this,
        'description': 'description',
        'callback': function(){
            //logic
        }
    }
});

Commands with hasArguments: true will be instantly sent to chat when using autocomplete and type: mod commands will only show up when you are a mod.

commands.get

commands.get("'command");

commands.getAll

commands.getAll();

commands.execute

commands.execute("'command", 'arg1', 'arg2');

Public Variables

License

The MIT License (MIT)

<InstaSynch - Watch Videos with friends.>
Copyright (c) 2014 InstaSynch

<Bibbytube - Modified InstaSynch client code>
Copyright (C) 2014 Zod-

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.