MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Systemd",
        "continue": "gapcontinue||"
    },
    "warnings": {
        "main": {
            "*": "Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
        },
        "revisions": {
            "*": "Because \"rvslots\" was not specified, a legacy format has been used for the output. This format is deprecated, and in the future the new format will always be used."
        }
    },
    "query": {
        "pages": {
            "9": {
                "pageid": 9,
                "ns": 0,
                "title": "Running Multiple Eggdrops From One Directory",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "__TOC__\n\n== How can I run multiple Eggdrops from the one directory? ==\n\nYou don't need to install multiple copies of Eggdrop to run multiple instances. Instead, you can place multiple config files inside your single Eggdrop installation folder and run each config file\n  ./eggdrop egg1.conf\n  ./eggdrop egg2.conf\n  ./eggdrop egg3.conf\netc.\n\nAt minimum, you'll want to make sure you change the nickname, userfile, channel file, pid file and listening ports/IPs for each Eggdrop you run; but you'll also probably want to do a more thorough scrub to change things like the botnet nicks, idents, or realname fields (among others!)"
                    }
                ]
            },
            "31": {
                "pageid": 31,
                "ns": 0,
                "title": "Setudef",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "Eggdrop users often like a script's functionality to work on only some of the channels the Eggdrop resides on. For example, an Eggdrop running a Tcl script that greets every user is nice on a small channel, but would quickly become annoying on a busy channel where users are joining every 30 seconds. There are two ways you can enable a script to work on only some channels the Eggdrop resides on.\n\n== User-defined Channel Flags (Preferred) ==\n=== Adding a channel flag ===\nFrom [https://docs.eggheads.org/using/tcl-commands.html doc/tcl-commands.doc], you can use the [https://docs.eggheads.org/using/tcl-commands.html#setudef-flag-int-str-name setudef command]:\n<pre>\nsetudef <flag/int/str> <name>\n\n    Description: initializes a user defined channel flag, string or integer setting. You can use it like any other flag/setting. IMPORTANT: Don\u2019t forget to reinitialize your flags/settings after a restart, or it\u2019ll be lost.\n</pre>\n\nThis command creates a new flag setting that can be used via the <pre>.chanset</pre> command, and viewed via the <pre>.chaninfo</pre> command. To create a custom flag that a script can check, create it by adding the setudef command:\n<pre>\nsetudef flag myscript\n</pre>\n\nThis will add a flag that can be viewed, enabled or disabled via the partyline:\n<pre>\nUser defined channel flags:\n     -myscript\n</pre>\n\nAs with any other Eggdrop channel flag, it can be enabled or disabled with the .chanset command:\n<pre>\n.chanset #test +myscript\nSuccessfully set modes { +myscript  } on #test.\n[22:42:18] #-HQ# chanset #test +myscript \n\n.chaninfo #test\nUser defined channel flags:\n     +myscript\n</pre>\n\n=== Checking a channel flag ===\nSo now that you've added a channel flag that the user can interact with, how does a script use that information? The answer is the [https://docs.eggheads.org/using/tcl-commands.html#channel-get-name-setting channel get] Tcl command.\n<pre>\nchannel get <name> [setting]\n\n    Returns: The value of the setting you specify. For flags, a value of 0 means it is disabled (-), and non-zero means enabled (+). If no setting is specified, a flat list of all available settings and their values will be returned.\n</pre>\nTo check if a flag is enabled for a flag, you would use:\n<pre>\nchannel get #test myscript\n</pre>\nOr, perhaps a more useful example:\n<pre>\nif [channel get #test myscript] {\n  putserv \"PRIVMSG #test :This is a message that is only sent if the myscript flag is enabled\"\n}\n</pre>\n\n=== Example Tcl script ===\nSo now, let's write a simple greet script that can be turned on and off via the partyline for each channel:\n<pre>\nbind join * * greetNewUser\n\nsetudef flag greetScript\nproc greetNewUser {nick user hand chan} {\n  if {[channel get $chan greetScript]} {\n    putserv \"PRIVMSG $chan :Hello $nick, welcome to $chan!\"\n  }\n}\n</pre>\n\n== Bind Mask (less preferred) ==\nUsing a bind mask is generally considered less friendly to the user, as the user must edit the Tcl file and then restart the Eggdrop in order to enable or disable the script on a channel.\n\nIf your script uses a bind to trigger an action, it probably incorporates a mask that specifies which users or conditions are allowed to trigger the bind. For example, the documentation for a JOIN bind states:\n<pre>\n    JOIN (stackable)\n\n    bind join <flags> <mask> <proc>\n\n    procname <nick> <user@host> <handle> <channel>\n\n    Description: triggered by someone joining the channel. The mask in the bind is matched against \u201c#channel nick!user@host\u201d and can contain wildcards.\n</pre>\n\nFrom that, we can see here that a mask that would trigger on only one channel would take the form of\n<code>\"channel nick!user@host\"</code>, or specifically for this case, <code>\"test *\"</code>. This creates a bind that can be triggered by any user on #test. \n\n=== Example Tcl Script ===\n<pre>\nbind join \"#test *\" * greetNewUser\nbind join \"#other channel *\" * greetNewUser\n# Each channel requires its own bind that will call the greetNewUser script\n\nsetudef flag greetScript\nproc greetNewUser {nick user hand chan} {\n  putserv \"PRIVMSG $chan :Hello $nick, welcome to $chan!\"\n}\n</pre>"
                    }
                ]
            }
        }
    }
}