GM Tools and Help


  • mod

    This topic is to provide specific tools that may be helpful for GMs. Please limit commentary in the thread, and link to source when possible.

    This is also an acceptable location to indicate if you have a functioning MafiaBot and if it is available for other GMs to borrow.


  • mod

    During Mafia IV, @accalia developed an attendance script in a private PM. The script runs pretty quickly and just needs to be dropped in any console session to run.

    To customize the script for your use, just make sure to update the PLAYERS array with the list of current players in your game and the THREAD_ID with appropriate ID of the public game thread.

    The only flaw I've encountered with the script was that it listed dead players as truant. That should be easy to fix, and may even be resolved by simply removing dead players from the array. Some quick testing indicates that is easy to fix by removing dead players from the array.

    var PLAYERS = [ "fbmac",
                    "FrostCat",
                    "heterodox",
                    "cloak15",
                    "Tsaukpaetra",
                    "Maciejasjmj",
                    "Yamikuronue",
                    "Weng",
                    "aliceif",
                    "DoctorJones",
                    "xaade",
                    "ChaosTheEternal",
                    "Nocha",
                    "PleegWat",
                    "asdf",
                    "japonicus",
                    "Cheater",
                    "sloosecannon",
                    "Captain" ];
    var THREAD_ID = 54455
    var posts = [];
    var checkin = {};
    
    function init() {
        PLAYERS.forEach(function (player) {
            checkin[player] = 0;
        });
        getTopic();
    }
    
    function getTopic() {
        $.get('/t/' + THREAD_ID + '/1.json', function (data) {
            posts = data.post_stream.stream;
            getPosts();
        });
    }
    
    function getPosts() {
        var post = [];
        while (posts.length && post.length < 200){
            post.push('post_ids[]='+ posts.shift());
        }
        $.get('/t/' + THREAD_ID + '/posts.json?'+post.join('&'), function (data) {
            data.post_stream.posts.forEach(function(post){
                if (checkin.hasOwnProperty(post.username)){
                    checkin[post.username] = new Date(post.created_at).getTime();
                }
            });
            if (posts.length > 0) {
                setTimeout(getPosts, 0);
            } else {
                setTimeout(report, 0);
            }
        });
    }
    
    function report() {
        var keys = Object.keys(checkin);
        var cutoff = new Date().getTime() -  24 * 60 * 60 * 1000;
        var result = {};
        keys.forEach(function (key) {
            if (checkin[key] < cutoff) {
                result[key] = new Date(checkin[key]).toUTCString();
            }
        });
        if (Object.keys(result).length === 0) {
            console.log('Clean Checkin! Congratulations!');
        } else {
            var txt = ['The following players have not posted in one day or more!',''];
            keys = Object.keys(result);
            keys.forEach(function (user) {
                txt.push(user);
            });
            console.log(txt.join('\n'));
        }
        alert('truency report finished!');
    }
    
    init();
    

  • mod

    If any GM wishes to borrow @LynchBot for a game, let me know via PM. I can provide you server access so you can fix any issues in the DB, and I will give you a quick walkthrough on his setup. The only condition is that he may require an update before running a new game.


  • I survived the hour long Uno hand

    @Dreikin runs @Vote which is a good nick to use as well. He and I both are also capable of setting up said bot.



  • PRs are absolutely 100% accepted, and I'm still waiting for @Weng to file his.


  • Discourse touched me in a no-no place

    Oh. Right. I guess I should figure out how to Git.


  • mod

    Just remembered something that I should probably post here as a GM tip (that probably won't apply once we throw Discourse in the rubbish bin):

    If you manage to arrange to have a backup GM or two, get the PMs started early, just don't include the individual the PMs are for. Sure, the player will need to update the status to watching when they are added to the PM, but you get the benefit of being able to work around Discourse's daily new topic limiter. It also gives your backups a chance to proofread what you wrote up to make sure you didn't @accalia anything.



  • Well, I assumed role PMs would stay as PMs. But yes, NodeBB rate limiting is much nicer.


  • mod

    @ben_lubar said:

    Well, I assumed role PMs would stay as PMs. But yes, NodeBB rate limiting is much nicer.

    The rate limiting is what I was referring to.


  • The Cold Doesn't Bother Us Anyway

    @abarker said in GM Tools and Help:

    During Mafia IV, @accalia developed an attendance script in a private PM.

    i've got a new one for this game, as well as one that creates new Chats to deliver the role cards to, and delivers the role cards.

    remind me at the close of the current game to post them here.


  • The Cold Doesn't Bother Us Anyway

    @accalia i am reminded...

    gist

    both require a browser that understands es6 syntax (so chrome, possibly recent firefoxen)

    the first is a userscript that i used to automate my activity checkins the second sent all the roll cards and runs by pasting into the browser console.


  • Discourse touched me in a no-no place

    @accalia Sometimes the oneboxes are a bit rubbish. This is one of those times…


  • BINNED

    @dkf said in GM Tools and Help:

    Sometimes the oneboxes are a bit rubbish

    Tell me about it:

    0_1463748929935_Capture.PNG


  • Discourse touched me in a no-no place

    @Jaloopa It's no better if you have the content that's supposed to be there, unless you really like looking at boilerplate.


  • The Cold Doesn't Bother Us Anyway

    @dkf said in GM Tools and Help:

    Sometimes the oneboxes are a bit rubbish.

    deoneboxed.

    is better now?


  • Discourse touched me in a no-no place

    @accalia said in GM Tools and Help:

    is better now?

    :thumbsup_tone2:



  • Note to GMs

    Make sure you contact @ben_lubar (or if he's dead or on vacation or something, whoever took his place) as soon as possible with the required groups for your game when it's your turn. Current Game and Club Ded go without saying.

    As soon as the forums and groups are set up, make placeholder topics so the site CSS can be edited to highlight GM posts. If you want a highlight color other than yellow, be sure to point that out before the CSS is applied.

    It is preferable to choose co-GMs as soon as possible (if you want co-GMs) as their posts will also need special CSS.


  • The Cold Doesn't Bother Us Anyway

    @accalia so, you never did explain how to use these scripts.....

    let's do that.

    Forum Userscript.js

    This script is a tampermonkey script, though it should be compatible with greasemonkey and should work if you just paste it into your browser console.

    Requires a browser capable of native ES6, so Recent FF/Chrome/Opera. Saffari might work and IE probably doesn't.

    once run it will add a new icon in the header of the forum, this icon will be either the imperial or the rebel logo (and changes periodically because it amuses me)

    0_1477673550972_upload-8821df8d-570e-4b17-a207-2101a7413d90

    go ahead and give it a click to bring up the menu.

    0_1477673580059_upload-2ff2f83f-fade-46fe-b3ca-615b1214af70

    The first button does what it says on the tin. press it to run the 24 hour post checkin thing, but in order for that to work you need to configure it first. let's look at that second button for that.

    0_1477673653886_upload-4347b210-6679-411a-ad59-05171223c84d

    my those are a lot of fields. They'll be blank at first, there are no default values.

    Thread IDs are as expected. as are the group slugs. the ones listed here will probably remain unchanged for a while.

    Let's look closer at those text areas.

    0_1477673742625_upload-1e13339b-dde6-4d93-b08f-b5a0cc9819ba

    Checkin Prefix is what text should precede the list of truants, the
    Checkin Suffix is what text should follow the list of truants should the list contain at least one player
    Clean Checkin Suffix is what text should follow the list of truants when the list is empty.

    Be sure to save the configuration.

    Configuration saves to your browser's local storage so it will persist across reloads but not across devices.

    That's about it for that script. i should make it do more things like automatically move groups and stuff..... but for now that's it.

    roll card sender.js

    This script creates new chat messages with participants and sends their role cards to them.

    there are two bits of configuration you will have to make to use this script.

    first edit the mafia_config to be an array of two tuples where the first element of the tuple is the case sensitive username of the player and the second element is the text of their rolecard.

    then edit the title string on line 67 to be relevant to your mafia game.

    Paste your modified script into your console and awaaaaaaay it goes.

    @yamikuronue has been working on a command as part of the standard mafia bot to allow the bot to send the role card allowing you to simply post the role cards in club ded and with a little bit of command magick create the chat and send the role card. I'm not sure if that command is finished and released yet so i'll let her write up how to use it when it is released (or whenever she gets around to it, whichever happens last)


  • mod

    Suggestions for GMs

    Night action requirements

    Publicly inform the players of whether night actions (such as role blocking, tracking, night kills) are mandatory or not. A general statement should be sufficient for the purpose, something like:

    Night actions are mandatory. Failure to select a target when you have an action will result in one being selected for you.

    or

    Night actions are optional.

    Originally suggested in Mafia XII - Club Ded

    Stop letting Club Ded run the game

    It just pisses off the players. At most, Club Ded should be involved in helping with final balancing just before the game starts and maybe deciding punishments for rule infractions. Rewarding good play just unbalances the game. As @pydsigner put it:

    @pydsigner said in Mafia XII - Club Ded:

    a) good play is its own strength, … b) you're more likely to reward scum who have the information necessary to actually play well.


  • The Cold Doesn't Bother Us Anyway

    @abarker said in GM Tools and Help:

    Stop letting Club Ded run the game

    this is required to get me to play....... letting club ded interfere in the game sounds good on paper, but it ruins the game in practice.


  • I survived the hour long Uno hand

    @accalia
    @vote for ClubDed


  • The Cold Doesn't Bother Us Anyway

    @izzion said in GM Tools and Help:

    @accalia
    @vote for ClubDed

    @vote for ClubDed


  • Winner of the 2016 Presidential Election

    @accalia said in GM Tools and Help:

    @izzion said in GM Tools and Help:

    @accalia
    @vote for ClubDed

    @vote for ClubDed

    ClubDed has been lynched! Stay tuned for the flip.



  • As you listen to the screams and protests of @ClubDed after it's set ablaze, a curious piece of paper falls out:

    You are a Cult Leader. Each night, you must target a forum member. Your target will will change alignment to ClubDed and will no longer be able to participate in mafia games.

    You win when nobody can play mafia anymore or nothing can prevent that from happening.


  • I survived the hour long Uno hand

    GM's Guide to: Running A Bot

    Convincing some chump to run a bot for you

    Talk to @yamikuronue or @accalia if you want to outsource the bot running to someone who knows what they're doing ;)

    Setting up your own instance of Sockbot

    1. Install Sockbot

    You will definitely want to use a stable version of Sockbot core itself. To install the latest released version, use the following:

    npm install sockbot -g

    (Don't have npm installed? You need more help than this guide can provide. Google "how to install nodeJS " and your operating system name for further instructions).

    2. Install Sockmafia

    If you want the released version of sockmafia, you can install it the same way:

    npm install sockmafia -g

    If you have requested new functionality be added to the bot, you probably have received a "canary release" -- a release with your changes for testing, which will be promoted to a real release after the game. You can install the latest canary release using:

    npm install sockmafia@canary -g

    If you do not have a canary release but instead need to install from a github branch, you can use:

    npm install SockDrawer/SockMafia#branch-name-here

    3. Install any other plugins

    You may want to make use of the following optional plugins:

    • Dice rolls: npm install sock-logidice -g
    • Random shuffling of player lists: npm install sockbot-plugin-randomizer -g

    4. Set up a config file

    You will probably want to copy and paste a sample config file with your edits. Here is one:

    ---
    core:
      username: mafiabot
      password: mafiapassword
      owner: ownerAccount
    plugins:
      sockbot-mafia:
        thread: 52778
        mods:
         - mod
        players:
         - player1
         - player2
        db: './mafiadb'
        name: testMafia
        options:
          voteBars: bastard
          chats: disabled
          stripCommands: disabled
    

    Save this file as config.yml.

    For a complete reference on game options, see the documentation

    (Remember to enable any optional plugins in the config file as well!)

    4. Start the bot

    You can run the bot using sockbot config.yml

    If you want to ensure the bot continues to run, you can use something like pm2: install with npm install pm2 -g and run using pm2 sockbot -- config.yml. pm2 will restart the process if it dies, and keep track of the logs, reporting them on command.

    If you are testing new features we strongly suggest running with debug output on: use DEBUG=sock* sockbot config.yml or DEBUG=sock* pm2 sockbot -- config.yml. This will output more information to the logs.

    5. Troubleshooting

    For most problems, talk to Accalia and/or Yami.

    If you need to check the game state: the database is a human-readable json file, stored at the name reported in the config file (typically mafiadb).



  • @Yamikuronue

    So I just tried installing this. Other than getting a bunch of warnings during installation (and not being able to install the plugins because they are not found

    Dice rolls: npm install SockLogiDice -g
    Random shuffling of player lists: npm install sockbot-randomizer -g

    When I try to run sockbot, it fails with the following error:

    # sockbot config.yml

    /usr/lib/node_modules/sockbot/lib/app.js:5
    const path = require('path');
    ^^^^^
    SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:945:3

    I'm running this version of node:

    # node -v

    v0.10.46


  • The Cold Doesn't Bother Us Anyway

    @dangeRuss What version of Node are you running?


  • I survived the hour long Uno hand

    @dangeRuss Your version of Node is too old. You need at least Node 4, probably Node 6.



  • @RaceProUK said in GM Tools and Help:

    @dangeRuss What version of Node are you running?

    Yea I think I see my issue... my version of node is like super old. I'm working on installing 7.x now.



  • @RaceProUK said in GM Tools and Help:

    @dangeRuss What version of Node are you running?

    Ok, now I'm on

    # node -v
    v7.3.0

    but i can't install mafia

    # npm install sockbot -g

    /usr/bin/sockbot -> /usr/lib/node_modules/sockbot/lib/app.js
    /usr/lib
    └── sockbot@6.1.0

    # npm install sockmafia -g

    /usr/lib
    ├── UNMET PEER DEPENDENCY sockbot@>=4.3.0
    └── sockmafia@3.3.2

    npm WARN sockmafia@3.3.2 requires a peer of sockbot@>=4.3.0 but none was installed.



  • @Yamikuronue said in GM Tools and Help:

    • Dice rolls: npm install SockLogiDice -g

    Looks like this needs to change to npm install sock-logidice -g

    • Random shuffling of player lists: npm install sockbot-randomizer -g

    And this one changes to npm install sockbot-plugin-randomizer -g

    although it tried to get stuff from git and didn't quite succeed.

    # npm install sockbot-plugin-randomizer -g
    npm WARN addRemoteGit Error: Command failed: git config --get remote.origin.url
    npm WARN addRemoteGit
    npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:211:12)
    npm WARN addRemoteGit at emitTwo (events.js:106:13)
    npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7)
    npm WARN addRemoteGit at maybeClose (internal/child_process.js:885:16)
    npm WARN addRemoteGit at Socket.<anonymous> (internal/child_process.js:334:11)
    npm WARN addRemoteGit at emitOne (events.js:96:13)
    npm WARN addRemoteGit at Socket.emit (events.js:188:7)
    npm WARN addRemoteGit at Pipe._handle.close [as _onclose] (net.js:501:12)
    npm WARN addRemoteGit git+https://github.com/AccaliaDeElementia/random-js.git resetting remote /root/.npm/_git-remotes/git-https-github-com-AccaliaDeElementia-random-js-git-851a46fd because of error: { Error: Command failed: git config --get remote.origin.url
    npm WARN addRemoteGit
    npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:211:12)
    npm WARN addRemoteGit at emitTwo (events.js:106:13)
    npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7)
    npm WARN addRemoteGit at maybeClose (internal/child_process.js:885:16)
    npm WARN addRemoteGit at Socket.<anonymous> (internal/child_process.js:334:11)
    npm WARN addRemoteGit at emitOne (events.js:96:13)
    npm WARN addRemoteGit at Socket.emit (events.js:188:7)
    npm WARN addRemoteGit at Pipe._handle.close [as _onclose] (net.js:501:12)
    npm WARN addRemoteGit killed: false,
    npm WARN addRemoteGit code: 1,
    npm WARN addRemoteGit signal: null,
    npm WARN addRemoteGit cmd: 'git config --get remote.origin.url' }
    /usr/lib
    └─┬ sockbot-plugin-randomizer@1.11.0
    └── random-js@1.0.8 (git+https://github.com/AccaliaDeElementia/random-js.git#265f5bcba502f125bd382078fc2a120de466fd43)


  • Notification Spam Recipient

    The command I found that worked the best was "may I borrow someone's bot please?"



  • @Vault_Dweller said in GM Tools and Help:

    The command I found that worked the best was "may I borrow someone's bot please?"

    I'm a dev though and am looking to explore nodejs, so I think I'll stick it out.

    Plus this will give us a better guide for future GMs



  • @dangeRuss said in GM Tools and Help:

    @RaceProUK said in GM Tools and Help:

    @dangeRuss What version of Node are you running?

    Ok, now I'm on

    # node -v
    v7.3.0

    but i can't install mafia

    # npm install sockbot -g

    /usr/bin/sockbot -> /usr/lib/node_modules/sockbot/lib/app.js
    /usr/lib
    └── sockbot@6.1.0

    # npm install sockmafia -g

    /usr/lib
    ├── UNMET PEER DEPENDENCY sockbot@>=4.3.0
    └── sockmafia@3.3.2

    npm WARN sockmafia@3.3.2 requires a peer of sockbot@>=4.3.0 but none was installed.

    FYI, I got the same error with nodejs v6.9.2



  • @Yamikuronue @accalia whenever you guys free up, would appreciate some help on getting sockmafia installed.



  • @dangeRuss said in GM Tools and Help:

    UNMET PEER DEPENDENCY sockbot@>=4.3.0

    It does that... It might still work anyway once you add the relevant config entries.



  • @dangeRuss said in GM Tools and Help:

    UNMET PEER DEPENDENCY sockbot@>=4.3.0

    I could imagine that silently implying sockbot@<5.0.0 or even sockbot@<4.4.0



  • @dangeRuss Are you sure it's not installing anyway?

    $ sudo npm install sockmafia -g
    /usr/lib
    ├── UNMET PEER DEPENDENCY sockbot@>=4.3.0
    └─┬ sockmafia@3.3.2 
    ...snip...
    
    npm WARN sockmafia@3.3.2 requires a peer of sockbot@>=4.3.0 but none was installed.
    

    And yet...

    $ npm ls -g --depth=0
    /usr/lib
    ├── npm@3.10.10
    ├── sockbot@6.1.0
    └── sockmafia@3.3.2
    

  • The Cold Doesn't Bother Us Anyway

    @dangeRuss said in GM Tools and Help:

    @Yamikuronue @accalia whenever you guys free up, would appreciate some help on getting sockmafia installed.

    hmmm @yamikuronue is the expert on installs these days...

    i suspect that the warning you are getting about the unmet peer dependency is a spurious warning caused by a slight misconfiguration of the version spec in the sockMafia package..... go ahead and try to run the bot with that plugin, liiks like both installed and should work in theory.

    as for the git error installing the randomizer plugin, do you have git installed on the host machine? One of the dependencies for that plugin is installed via GIT. it was intended to be a stopgap dependency until a PR of mine was merged into an existing NPM plugin that had a bug, but the PR has not been merged and the project seems abandoned in any case so i need to fix that at some point by publishing my own fork..... -sigh-


  • I survived the hour long Uno hand

    @dangeRuss said in GM Tools and Help:

    UNMET PEER DEPENDENCY sockbot@>=4.3.0

    You installed sockbot right? You should be fine to ignore this error.

    Does the bot start?



  • @Yamikuronue said in GM Tools and Help:

    @dangeRuss said in GM Tools and Help:

    UNMET PEER DEPENDENCY sockbot@>=4.3.0

    You installed sockbot right? You should be fine to ignore this error.

    Does the bot start?

    Looks like it does run, but I can't get it to actually post anything.

    Trying with a simpler plugin, but running into trouble

    Here is my config

    core:
    username: dangerbot
    password: redacted
    owner: dangeruss
    plugins:
    sock-logidice:
    enabled:true

    Not sure what parameters logidice takes, so just stuck one in there to get it to run. Getting an error though:

    sh-4.2# DEBUG=sock* sockbot dice.yml
    [2016-12-25T11:10:39.633Z] Starting Sockbot 6.1.0
    [2016-12-25T11:10:39.647Z] Loaded configuration file: dice.yml
    [2016-12-25T11:10:39.650Z] Activating logon: dangerbot
    sockbot requiring providers nodebb as /usr/lib/node_modules/sockbot/lib/../providers/nodebb +0ms
    [2016-12-25T11:10:39.887Z] Using provider nodebb for dangerbot
    [2016-12-25T11:10:39.897Z] Loading plugin sock-logidice for dangerbot
    sockbot requiring plugins sock-logidice as /usr/lib/node_modules/sockbot/lib/../plugins/sock-logidice +247ms
    sockbot error requiring /usr/lib/node_modules/sockbot/lib/../plugins/sock-logidice: Error: Cannot find module '/usr/lib/node_modules/sockbot/lib/../plugins/sock-logidice' +6ms
    sockbot error code: MODULE_NOT_FOUND +0ms
    sockbot error stack trace:
    sockbot Error: Cannot find module '/usr/lib/node_modules/sockbot/lib/../plugins/sock-logidice'
    sockbot at Function.Module._resolveFilename (module.js:469:15)
    sockbot at Function.Module._load (module.js:417:25)
    sockbot at Module.require (module.js:497:17)
    sockbot at require (internal/module.js:20:19)
    sockbot at Object.relativeRequire (/usr/lib/node_modules/sockbot/lib/app.js:106:16)
    sockbot at Promise.all.Object.keys.map (/usr/lib/node_modules/sockbot/lib/app.js:133:32)
    sockbot at Array.map (native)
    sockbot at Object.loadPlugins (/usr/lib/node_modules/sockbot/lib/app.js:131:55)
    sockbot at Object.activateConfig (/usr/lib/node_modules/sockbot/lib/app.js:157:20)
    sockbot at cfg.map (/usr/lib/node_modules/sockbot/lib/app.js:204:32) +3ms
    sockbot retrying requiring plugins sock-logidice as raw +0ms
    sockbot /usr/lib/node_modules/sock-logidice/logiDice.js:190
    sockbot }();
    sockbot ^
    sockbot SyntaxError: Unexpected token (
    sockbot at Object.exports.runInThisContext (vm.js:76:16)
    sockbot at Module._compile (module.js:542:28)
    sockbot at Object.Module._extensions..js (module.js:579:10)
    sockbot at Module.load (module.js:487:32)
    sockbot at tryModuleLoad (module.js:446:12)
    sockbot at Function.Module._load (module.js:438:3)
    sockbot at Module.require (module.js:497:17)
    sockbot at require (internal/module.js:20:19)
    sockbot at Object.relativeRequire (/usr/lib/node_modules/sockbot/lib/app.js:116:20)
    sockbot at Promise.all.Object.keys.map (/usr/lib/node_modules/sockbot/lib/app.js:133:32) +5ms
    [2016-12-25T11:10:39.913Z] A-derp! Fatal Startup Error: Unexpected token (



  • It's not installed there:

    /usr/lib/node_modules/sockbot/plugins $ ls
    echo.js  summoner.js
    
    /usr/lib/node_modules $ ls
    npm  sockbot  sock-logidice  sockmafia
    
    

    Can you make it work with summoner?

    plugins: 
      summoner:
        messages: 
          - '@%username% has summoned me, and so I appear.'
          - 'Yes master %name%, I shall appear as summoned.'
          - 'Yes mistress %name%, I shall appear as summoned.'
    


  • @loopback0

    still having issues:

    sh-4.2# DEBUG=sock* sockbot summoner.yml
    [2016-12-25T18:08:22.963Z] Starting Sockbot 6.1.0
    [2016-12-25T18:08:22.978Z] Loaded configuration file: summoner.yml
    [2016-12-25T18:08:22.979Z] Activating logon: dangerbot
      sockbot requiring providers nodebb as /usr/lib/node_modules/sockbot/lib/../providers/nodebb +0ms
    [2016-12-25T18:08:23.199Z] Using provider nodebb for dangerbot
    [2016-12-25T18:08:23.208Z] Loading plugin summoner for dangerbot
      sockbot requiring plugins summoner as /usr/lib/node_modules/sockbot/lib/../plugins/summoner +228ms
    [2016-12-25T18:08:23.215Z] dangerbot ready for login
      sockbot:provider:nodebb begin configuration fetch for CSRF token +8ms
    DEBUG=sock* sockbot  sockbot:provider:nodebb completed configuration fetch for CSRF token +5s
      sockbot:provider:nodebb begin post login data +1ms
    DEBUG=sock* sockbotDEBUG=sock* sockbot^C
    sh-4.2# DEBUG=sock* sockbot summoner.yml
    [2016-12-25T18:08:33.489Z] Starting Sockbot 6.1.0
    [2016-12-25T18:08:33.507Z] Loaded configuration file: summoner.yml
    [2016-12-25T18:08:33.508Z] Activating logon: dangerbot
      sockbot requiring providers nodebb as /usr/lib/node_modules/sockbot/lib/../providers/nodebb +0ms
    [2016-12-25T18:08:33.735Z] Using provider nodebb for dangerbot
    [2016-12-25T18:08:33.744Z] Loading plugin summoner for dangerbot
      sockbot requiring plugins summoner as /usr/lib/node_modules/sockbot/lib/../plugins/summoner +235ms
    [2016-12-25T18:08:33.751Z] dangerbot ready for login
      sockbot:provider:nodebb begin configuration fetch for CSRF token +8ms
      sockbot:provider:nodebb completed configuration fetch for CSRF token +5s
      sockbot:provider:nodebb begin post login data +2ms
      sockbot:provider:nodebb complete post login data +7s
    [2016-12-25T18:08:45.698Z] dangerbot login successful
      socket.io-client:url parse https://what.thedailywtf.com +0ms
      socket.io-client new io instance for https://what.thedailywtf.com +9ms
      socket.io-client:manager readyState closed +10ms
      socket.io-client:manager opening https://what.thedailywtf.com +0ms
      socket.io-client:manager connect attempt will timeout after 20000 +25ms
      socket.io-client:manager readyState opening +13ms
      socket.io-client:manager open +5s
      socket.io-client:manager cleanup +0ms
      socket.io-client:socket transport is open - connecting +4ms
      socket.io-parser decoded 0 as {"type":0,"nsp":"/"} +0ms
      socket.io-parser decoded 2["checkSession",141780] as {"type":2,"nsp":"/","data":["checkSession",141780]} +6ms
      socket.io-client:socket emitting event ["checkSession",141780] +273ms
      sockbot:provider:nodebb:user retrieving user by login dangerbot +6s
      socket.io-client:socket emitting packet with ack id 0 +14ms
      socket.io-client:manager writing packet {"type":2,"data":["user.getUserByUsername","dangerbot"],"options":{"compress":true},"id":0,"nsp":"/"} +2ms
      socket.io-parser encoding packet {"type":2,"data":["user.getUserByUsername","dangerbot"],"options":{"compress":true},"id":0,"nsp":"/"} +25ms
      socket.io-parser encoded {"type":2,"data":["user.getUserByUsername","dangerbot"],"options":{"compress":true},"id":0,"nsp":"/"} as 20["user.getUserByUsername","dangerbot"] +2ms
      sockbot:provider:nodebb:user retrieving user by login dangeruss +28ms
      socket.io-client:socket emitting packet with ack id 1 +18ms
      socket.io-client:manager writing packet {"type":2,"data":["user.getUserByUsername","dangeruss"],"options":{"compress":true},"id":1,"nsp":"/"} +4ms
      socket.io-parser encoding packet {"type":2,"data":["user.getUserByUsername","dangeruss"],"options":{"compress":true},"id":1,"nsp":"/"} +18ms
      socket.io-parser encoded {"type":2,"data":["user.getUserByUsername","dangeruss"],"options":{"compress":true},"id":1,"nsp":"/"} as 21["user.getUserByUsername","dangeruss"] +0ms
      socket.io-parser decoded 30[null,{"username":"dangerbot","userslug":"dangerbot","joindate":1482691840703,"lastonline":1482718471379,"picture":"","location":"","birthday":"","website":"","signature":"","uploadedpicture":"","profileviews":0,"reputation":0,"postcount":1,"topiccount":1,"lastposttime":1482692135483,"banned":0,"status":"online","uid":141780,"icon:text":"D","icon:bgColor":"#795548","joindateISO":"2016-12-25T18:50:40.703Z","lastonlineISO":"2016-12-26T02:14:31.379Z"}] as {"type":3,"nsp":"/","id":0,"data":[null,{"username":"dangerbot","userslug":"dangerbot","joindate":1482691840703,"lastonline":1482718471379,"picture":"","location":"","birthday":"","website":"","signature":"","uploadedpicture":"","profileviews":0,"reputation":0,"postcount":1,"topiccount":1,"lastposttime":1482692135483,"banned":0,"status":"online","uid":141780,"icon:text":"D","icon:bgColor":"#795548","joindateISO":"2016-12-25T18:50:40.703Z","lastonlineISO":"2016-12-26T02:14:31.379Z"}]} +258ms
      socket.io-client:socket calling ack 0 with [null,{"username":"dangerbot","userslug":"dangerbot","joindate":1482691840703,"lastonline":1482718471379,"picture":"","location":"","birthday":"","website":"","signature":"","uploadedpicture":"","profileviews":0,"reputation":0,"postcount":1,"topiccount":1,"lastposttime":1482692135483,"banned":0,"status":"online","uid":141780,"icon:text":"D","icon:bgColor":"#795548","joindateISO":"2016-12-25T18:50:40.703Z","lastonlineISO":"2016-12-26T02:14:31.379Z"}] +259ms
      socket.io-parser decoded 31[null,null] as {"type":3,"nsp":"/","id":1,"data":[null,null]} +257ms
      socket.io-client:socket calling ack 1 with [null,null] +257ms
      sockbot Error: E_USER_NOT_FOUND
      sockbot     at parse (/usr/lib/node_modules/sockbot/providers/nodebb/user.js:283:23)
      sockbot     at _emit.then (/usr/lib/node_modules/sockbot/providers/nodebb/index.js:514:52)
      sockbot     at process._tickCallback (internal/process/next_tick.js:103:7) +535ms
    [2016-12-25T18:08:51.907Z] A-derp! Fatal Startup Error: E_USER_NOT_FOUND
    

    Do I need to set something on the bot account before it starts working?


  • The Cold Doesn't Bother Us Anyway

    @dangeRuss said in GM Tools and Help:

    Do I need to set something on the bot account before it starts working?

    no, but you do need to use the correct casing of usernames in the config file.,

    nodebb usernames are currently case sensitive in the API.....

    i REALLY need to create that PR that makes them case insensitive in the API, just like they are in the UI (which does some weardh gymnastic shenanigans to accomplish that)



  • @accalia said in GM Tools and Help:

    @dangeRuss said in GM Tools and Help:

    Do I need to set something on the bot account before it starts working?

    no, but you do need to use the correct casing of usernames in the config file.,

    nodebb usernames are currently case sensitive in the API.....

    i REALLY need to create that PR that makes them case insensitive in the API, just like they are in the UI (which does some weardh gymnastic shenanigans to accomplish that)

    Thank you, that did it.

    In the meantime, perhaps you can just mention it in the docs somewhere?


  • The Cold Doesn't Bother Us Anyway

    @dangeRuss said in GM Tools and Help:

    @accalia said in GM Tools and Help:

    @dangeRuss said in GM Tools and Help:

    Do I need to set something on the bot account before it starts working?

    no, but you do need to use the correct casing of usernames in the config file.,

    nodebb usernames are currently case sensitive in the API.....

    i REALLY need to create that PR that makes them case insensitive in the API, just like they are in the UI (which does some weardh gymnastic shenanigans to accomplish that)

    Thank you, that did it.

    In the meantime, perhaps you can just mention it in the docs somewhere?

    i think it is somewhere...... i'll make a ntoe to make it more prominent....
    .



  • @Yamikuronue logidice still doesn't work. Should I file an issue?


  • I survived the hour long Uno hand

    @dangeRuss said in GM Tools and Help:

    logidice still doesn't work.

    Is there any message on startup?


  • I survived the hour long Uno hand

    @dangeRuss said in GM Tools and Help:

    sockbot Error: Cannot find module '/usr/lib/node_modules/sockbot/lib/../plugins/sock-logidice'

    Oh nevermind, this is the error?

    @accalia how is your plugin-finding code looking for it here?


  • The Cold Doesn't Bother Us Anyway

    @Yamikuronue said in GM Tools and Help:

    @dangeRuss said in GM Tools and Help:

    sockbot Error: Cannot find module '/usr/lib/node_modules/sockbot/lib/../plugins/sock-logidice'

    Oh nevermind, this is the error?

    @accalia how is your plugin-finding code looking for it here?

    ... it's looking for builtin plugin before testing for installed plugin. that's a safety feature to prevent installed plugins from overriding base (and why only summoner and echo are "allowed" to be builtin)

    but it should have caught that error and retried as plain.....

    i are confuzed


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.