Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags
    • Users
    • Groups
    1. Home
    2. accalia
    • Profile
    • Following 3
    • Followers 6
    • Topics 4
    • Posts 68
    • Best 17
    • Groups 1

    Accalia Elementia

    @accalia

    Plugin & Theme Dev

    this is an about me for testing again

    52
    Reputation
    983
    Profile views
    68
    Posts
    6
    Followers
    3
    Following
    Joined Last Online

    accalia Unfollow Follow
    Plugin & Theme Dev

    Best posts made by accalia

    • [sockbot] I wanted a robot, So I made one

      Sockbot 3.0 - Alpha Alpaca - The NodeBB release

      It is with great pleasure that i announce the release of version 3.0.0 of sockbot featuring support for NodeBB forums.

      Sockbot is a userbot that logs in as a standard user and performs actions based on that users behalf. Interactions with the bot can then be achieved via posting messages to the bot.

      Sockbot 3.0 includes two plugins by default echo and summoner, The SockDevs will be releasing more plugins in the future and any interested party is welcome to write their own. We will be providing detailed how-tos regarding writing all sorts of plugins in the near future.

      You can install sockbot via npm, read the docs, view the code and contribute, and file bug reports/feature requests

      Requirements

      In order to run Sockbot you will need at least version 4.0 of nodejs. Version 5.0 or greater is recommended

      Sockbot is developed and tested on Linux, however it should work just fine on Windows and OSX as well.

      Installation

      It is recommended to install Sockbot globally via NPM if you have sufficient access. This adds the binary to your command line environment for convenient access.

      Execute the NPM command below to install Sockbot globally.

      $ npm install -g sockbot
      

      Once sockbot is installed you will need a configuration file to set up necessary settings. Here's one i've prepared earlier that utilizes the summoner module to implement a bot that quotes Zoidberg when mentioned:

      --- 
      - core:
          username: "Zoidberg"
          password: "ZoidbergsPasswordZoidbergsPassword"
          owner: "accalia"
          forum: "http://nodebb.example.com"
        plugins: 
          summoner: 
            messages: 
              - "@%username%, You seem malnourished. Are you suffering from internal parasites?"
              - "@%username%. I challenge you to \"clawplach\"!"
              - "I wonder what the Shroud of Turin tastes like."
              - "Yeah, but did you ever play Jenga? Sometimes you take out one and... [imitates crashing]"
              - "It's good cholesterol, but it spreads like bad cholesterol."
              - "Zoidberg is afoot!"
              - "On margin. Zoidbee wants to buy on margin."
              - "Zoidbie want balloon! Want balloon now! Zoidbie want go outside!"
              - "Tired of Discourse? Why not @Zoidberg?"
              - "I took the liberty of fertilizing your caviar."
              - "I've had it with this game. I'm going for a scuttle."
              - "Doctor Zoidberg, soaking in brine."
              - "You lost the @%username% of your dreams, but you still have Zoidberg. YOU ALL STILL HAVE ZOIDBERG!"
              - "Sit down @%username%. Now open your mouth and lets have a look at that brain. "
              - "Young lady, I am an expert on humans. Now pick a mouth, open it and say \"brglgrglgrrr\"! "
              - "Hooray! People are paying attention to me!"
              - "I've performed a few mercy killings."
              - "It's been years since medical school, so remind me. Disemboweling in your species, fatal or non-fatal?"
              - "The frenzy is over. How am I going to get rid of my male jelly now?"
              - "Welcome to my life! :starts crying:"
              - "I don't like the looks of this doctor. I bet I've lost more patients than he's treated."
              - "What? My mother was a saint! Get out!"
              - "It's funny because it's poisonous!"
              - "Fine, then I'll have one of your young on a roll."
              - "Fine, just give me something crawling with parasites."
              - "And I'm his friend, Jesus!"
              - "Hooray! I'm a teenage heartthrob again!"
              - "There's a humongous fungus among us."
              - "I ate garbage yesterday, and it didn't cost me 300 dollars."
              - "Hey, boys and girls. It's Zoidberg, the loveable tramp."
              - "Hooray! A happy ending for the rich people."
              - "Switch bodies? I don't see why not. I also don't see why."
              - "The hell with your spoiled baby. I need those shoes."
              - "@%username%, look what you did! She won't shut up."
              - "Friends! Help! A guinea pig tricked me!!"
              - "Is it me maybe?"
              - "Once again, the conservative, sandwich-heavy portfolio pays off for the hungry investor."
              - "Ohhh, it's all so complicated, with the flowers, and the romance, and the lies upon lies."
              - "What's this? Two meals in one week?"
              - "Friends! Help! A @%username% tricked me!"
              - "Oh, no! Something's happening! What's happening?"
              - "Are you coming on to me?"
              - "At last, recognition!"
              - "Hello? I'll take eight!"
              - "Hooray! I'm helping!"
      

      Configuration files may be in JSON or YAML format.

      Once you have a configuration file you can start Sockbot by executing the sockbot command with the path to the configuration file as a parameter as seen below.

      $ sockbot path/to/config.yml
      

      This will start the bot, once the bot has logged in you can go to your forum and mention the bot account to get a random Zoidberg quote!

      Up to date installation instructions can be found in the docs, including alternate installation setups.

      Other uses

      Commands

      Sockbot also understands a command format such that can be issued to the bot. All issued commands are registered so that they will be reported by the help command. Sockbot processes commands from any post that generates a notification to the bot and understands two different formats.

      The echo plugin contains an example of using commands in a plugin. The echo plugin adds an echo command to the bot that when triggered replies to the post with a quote of the original post text.

      Mention commands

      Mention commands prefix a mention of the bot to the command name. The mention must be the first non markup element on a line, and must not be in a code block or quote.

      The format for a mention command makes it convenient to issue a command to the bot in such a way that it is guaranteed to generate a notification.

      For example. To execute the florblewitz command with arguments with and arguments you would post:

      @sockbot florblewitz with arguments
      

      Imperative Commands

      Imperative commands prefix an exclamation mark to the command name. The command must be the first non markup element on a line, and must not be in a code block or quote.

      The format for an imperative command makes it convenient for issuing multiple commands per post where the bot will already receive a notification for the post

      For example. To execute the florblewitz command with arguments with and arguments you would post:

      !florblewitz with arguments
      

      Help

      We, the SockDevs, are here to help! Ask questions in this thread, read our documentation, and/or file bug reports and feature requests in our issue tracker

      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      @accalia took a certain fox long enough but....

      Release v3.1.0 has been released to github and npm

      New features:

      • Support for nodebb chats, including support for commands in chats
      • Split notification:mention event into notification:mention and notification:group_mention events

      Fixes several bugs in 3.0.0 including (but not limited to)

      • Failed logins are reported as successful
      • Failure for a plugin to load was not reported, leading to confusion

      Notable updates in this merge:

      • Misc test fixes from test audit
      • update readme for version 3.0
      • adjust configuration validation to include checking for plugin configurations - fixes #293
      • detect when plugin fails to load and fail the bot start because of it
      • detect failed nodebb login - resolves #294
      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: Connection Not Secure

      Ah, that's what it is.

      I was confused as to what could be causing it so fired up firefox to check. confirmed that /recent is currently displaying insecure content.

      Using Dev tools in Chrome i've identified that it was loading these images over regular http instead of https:

      http://i.imgur.com/oDYNb6S.png
      http://i.imgur.com/9EC7UPE.png

      .... anyway, the post with the images is: https://community.nodebb.org/topic/8218/change-nodebb-homepage-to-blocks/5

      looks like this is caused by the "teaser" column loading the full post and having CSS styling applied to it to make the images not display and to prevent the content from spilling over the provided area.

      posted in Bug Reports
      accalia
      Accalia Elementia
    • RE: Nodebb logo concept

      @julian you know.... i think he is.

      i dunno though, i kinda like the current one.

      posted in General Discussion
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      Released version 3.1.0-RC1 on github and npm

      this is a PRE-RELEASE version and as such may have new and undiscovered bugs.

      v3.1.0-RC1

      Fixes several bugs in v3.0.0 including (but not limited to)

      • Failed logins were reported as successful
      • Split notification:mention event into notification:mention and notification:group_mention events
      • Failure for a plugin to load was not reported, leading to confusion

      Noteable updates in this merge:

      • Misc test fixes from test audit
      • update readme for version 3.0
      • remove ignored codeclimate folder
      • update travis configuration
      • release 3.0.0
      • fix crash bug on run and add test to catch regressions of crash bug of 0b95898
      • implement group_mention notification type
      • adjust configuration validation to include checking for plugin configurations - fixes #293
      • detect when plugin fails to load and fail the bot start because of it
      • detect failed nodebb login - resolves #294
      • release 3.1.0-RC1
      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • [Request/PR] Expose REST-API functionality inside websocket connection

      The REST API is great, but there's no analog for it in the websocket connection used by NodeBB.

      I have an application i'm working on that I would like to expose these functions in the websocket as well. This would allow me to avoid having to shuffle multiple cookiejars around my application as the multiple users that the application connects as perform their various tasks.

      I have a PR prepared that adds in the basic read functionality of the RestAPI to the websocket connection, and i have plans to add the remaining endpoints of the REST API in the near future.

      .... Am I doing this right? It's my first time trying to contribute to this project.... :nervous:

      posted in Feature Requests
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      So you have a bot and want to use it? why not use it to help moderate a game of Mafia?

      Yamikuronue and Dreikin of sockbot's home forums have put together a plugin that helps moderate mafia games.

      what is a mafia game? Well what.thedailywtf.com is starting one in the next couple of days, drop on by and take a gander!

      Announcing: SockMafia 2.0!

      ​
      SockMafia is a plugin for SockBot intended to act as a GM helper when running a forum-based game of Mafia. Mafia is a social game intended to be played with the help of a human moderator, or "GM" (for GameMaster); there is a good deal of bookkeeping involved in running the game, however, specifically around tallying votes, so this bot plugin aims to assist by providing commands the players can use and tallying up information to present to the GM to act upon. It is not capable of running a GM-less game, due to the complexity and number of judgement calls that must be made.
      ​

      Usage

      ​

      Player Commands

      All player commands must be run in the thread the game is being played in, as they are a matter of public record.
      ​

      • join: Join a game. The game in question must be in the "Preparing" stage, not yet running or completed.
      • list-players: List the current living players in the game.
      • list-all-players: List all players in the current game, whether alive, dead, or moderator.
      • list-votes: List the current day's votes.
      • vote: Vote for a player to be executed. Takes one parameter: the name of the player to be executed.
      • for: Alternate form of vote. The two forms are identical unless the player in question is a doublevoter.
      • nolynch: Vote for the group to not lynch anyone this current day. If No-lynch wins a vote, no execution occurs and the day ends.
      • no-lynch: Identical to nolynch.
      • unvote: Rescind your current vote.
        ​

      Moderator commands

      ​

      • prepare: Start a new game in the current thread. The person who executes this command becomes the moderator for the new game. Takes one argument: a descriptor for the game.
      • start: Move the game from a preparation state to the running state, closing signups and allowing voting. Must be run in the game thread.
      • set: Set a voting property for a player. Takes two arguments: the target to set, and the property to assign. Must be run in the game thread. Takes two arguments: the target username, such as '@yamikuronue', and the propery, one of loved, hated, or doublevoter.
      • next-phase: Move to the next game phase. Transitions night to day, and day to night. Must be used in the game thread. Takes no arguments.
      • new-day: Alias for next-phase
      • kill: Kill a player. Does not transition the day. Takes one argument: the target username.
      • end: Finish the game. This prevents further voting in the thread of a game that has concluded. Must be run in the game thread.
        ​
        ​

      FAQ

      ​
      What happened to 1.0?
      It's on Github, but we never released it to NPM
      ​
      How do I install this?
      Now that we're on NPM, the easiest way to get a bot running is with the following simple steps:
      ​

      1. npm install -g sockbot
      2. npm install -g sockmafia
      3. Create a config.yml file using the below template:
      ---
      core:
        username: mafiabot
        password: mafiapassword
        owner: ownerAccount
        forum: http://nodebb.example.com/
      plugins:
        sockmafia:
          thread: 52778
          mods:
           - mod
          players:
           - player1
           - player2
          db: './mafiadb'
          name: testMafia
          voteBars: bastard
      
      1. run sockbot config.yml
        ​
        Tadah!
        ​
        What features are included in this release?
      • Voting and vote tracking
      • Loved, Hated, and Doublevoter properties
      • Vote bar configuration options (Bastard bars for weng-style; open for visible vote totals; hidden for no leaking.)
        ​
        Where can I report issues with the plugin?
        We use Github for issue tracking.
      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      @exodo said in [sockbot] I wanted a robot, So I made one:

      i work on synology so actually i think its not posible to update it

      hmm... interesting. don't think i've worked with them before. I've got a QNAP NAS myself and use an Intel NUC, or a Raspberry Pi, as my test box....

      still NVM should work for you, it installs to your home directory so it doesn't interfere with other users or the system.

      @exodo said in [sockbot] I wanted a robot, So I made one:

      thanks for the support

      no worries. it's what i do. let me know if i can do anything more to help.

      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: Can you follow yourself?

      @julian said:

      (provided you're in the right room)

      that's actually what got me to thinking i could do this.

      See my bot doesn't actually ever enter a room and in my testing seems to get new post events sent to it for all posts except my own.

      so if i could figure out a way to get my own as well that would be a simple matter of looking for new posts by my user id and processing them for the "gifmoji" tags.

      i suppose i could do it as a "gifmoji mod" so i run the module on a different login, but that means that i'd need the cooperation of the forum staff and i'd probably also have to be a mod (because i'd know the bot's credentials and it would be a mod) and that is very much :do_not_want.avi:

      still, i'll figure something out. 😉

      posted in Plugin Development
      accalia
      Accalia Elementia
    • RE: Solutions and ideas for insecure images

      hmm. didn't notice this topic had split.

      copying this here with context so it doesn't get lost.

      @accalia said in Connection Not Secure:

      i think ultimately the best solution for most forums is to have a whitelist of image hosts to use that support https, inline images via //domain.example.com/path and just leave all other images as links.

      it's not the prettiest nor the best user experience, but i think it strikes a nice balance between ease of implementation, ease of use, and ease of understanding for non technical people.

      posted in General Discussion
      accalia
      Accalia Elementia

    Latest posts made by accalia

    • RE: [sockbot] I wanted a robot, So I made one

      huh. connection refused, that's a new one, and not something I can help with. You'll have to contact the one running the forum you're connecting to and find out from them why your bot is being refused connection.

      Sorry, but that error really isn't something i can sort out on my end. it's on the server side.

      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      @TheWorms
      Assuming you're absolutely 100% certain the login credentials are correct in the configuration file, the only two things that come to mind are:

      • Check the username. It is case sensitive for logging in via the bot. I keep meaning to fix that but........ yeah havent gotten around to it yet.
      • Check the forum key. are you sure you've set it correctly. If you havent set it it will default to https://what.thedailywtf.com which is almost certainly not what you want.
      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: get all posts

      @sic2 said in get all posts:

      Hi!

      I have a similar question to @louisemcmahon

      I can get the most recent posts from the API /api/recent/posts (API route code

      I can see that there is no way of getting all posts (at least I do not see it). Do you know if there is a workaround or there is a plan to add this feature?

      Thanks!

      it sounds like you want the contents of a topic client side to process.

      if you have a browser that is ES6 compliant (chrome confirmed, firefox is probably good, not sure about safari, IE is out) then this GIST will work fr downloading a single topic as CSV.

      view the gist

      to select the topic to download you edit the final line of that script to include the topic ID you wish to save, replacing the example topic id (in this case 20937) with the one you desire.

      downloadTopic(20937).then(result=>console.log(result))
      

      then execute the script in your browser console while being on the target forum.

      if it complains about window.socket not existing on line 84 of the script, simply refresh the forum with the console open and try again. I've not figured out why, but sometimes chrome can't find the websocket object used by the forums if the console is opened after the page loads.

      posted in Plugin Development
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      @Domas-Vileikis okay..... that's strange as heck.....

      that's not where i expected that failure to occur.

      however i do know what the cause is. and i can help you fix it.

      the error occurs trying to load the configuration settings for the forum in order to get the CSRF token to log in. this is done by loading /api/config on your forum.

      so, for example, if you were running a bot for this forum the value you would have put in core.forum would be https://community.nodebb.org and so the configuration would be at https://community.nodebb.org/api/config

      can you check to make sure that when you visit the URL in your configuration for core.forum you arrive at your forum's home page and that when loading /api/config relative to that URL in the manner i described above your browser loads a JSON document.

      if one or both of these manual checks fail then the value you put in the configuration for core.forum is incorrect and needs to be updated. if both checks pass when tried in a browser then it is most likely your forum has some sort of security in place that is preventing sockbot's user agent access to the REST API of the forum. you will need to update the firewall rules in this case to allow sockbot access, or if you are not the administrator of the webserver your forum runs on you will need to ask your server admin to update the firewall rules for you.

      hoping this gets you off and running with sockbot,
      -Accalia

      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      @jiangcaiyang said in [sockbot] I wanted a robot, So I made one:

      I want to know if people use it for malicious perpose?

      yes, that's possible.

      @jiangcaiyang said in [sockbot] I wanted a robot, So I made one:

      For instance, some could run a script that frequently post ADs to our forum, thus cause our forum unable to run normally?

      yes, but sockbot is incapable of that, it needs a manually registered account so would be far too quickly banned. there are other bots that run the spam.

      @jiangcaiyang said in [sockbot] I wanted a robot, So I made one:

      Is it possible to use it without administrative permission?

      yes, but i hereby formally declare that anyone doing so with sockbot is a total poopy pants. 😉

      sockbot is meant for fun, not malice.

      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      @Domas-Vileikis hmm... well other than nodebb being very confused with the formatting that looks okay.

      can you run the bot as follows and post the results to me via chat? This command will be very verbose with debugging information and may contain sensitive information so please do not post the results publically.

      DEBUG=* sockbot config.yml
      

      that command should provide me with additional information to figure out what's happening so we can sort you out. 😉

      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      @julian true, but as this is a startup error it's highly likely to be caused by a misconfiguration in the config file (usually the wrong URL for the forum)

      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      @Domas-Vileikis interesting error...

      could you post the configuration file you are using for the bot (with password redacted for security) so i can take a look at it? most errors like this are simple typos in configuration and should be easy to solve.

      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      @exodo said in [sockbot] I wanted a robot, So I made one:

      i work on synology so actually i think its not posible to update it

      hmm... interesting. don't think i've worked with them before. I've got a QNAP NAS myself and use an Intel NUC, or a Raspberry Pi, as my test box....

      still NVM should work for you, it installs to your home directory so it doesn't interfere with other users or the system.

      @exodo said in [sockbot] I wanted a robot, So I made one:

      thanks for the support

      no worries. it's what i do. let me know if i can do anything more to help.

      posted in NodeBB Plugins
      accalia
      Accalia Elementia
    • RE: [sockbot] I wanted a robot, So I made one

      @exodo said in [sockbot] I wanted a robot, So I made one:

      i see, my test server doesnt support that new realeases, thank anyways

      unless there's a specific reason why the newer versions of nodejs are not supported i have found nvm to work just fine for managing multiple versions of nodsjs.

      in fact all development for sockbot is done using nvm installed version of node so as to allow me to quickly switch between versions to test functionality against multiple versions of nodejs.

      I'd be happy to help you set up a user account on your test server with nvm so that you can use sockbot on that server without interfering with the already installed applications..... if that's a thing you'd like to do?

      I have also confirmed that cloud9 ide fully supports sockbot in its free tier (and comes with nvm preconfigured). Workspaces for the free tier are quickly frozen when idle, so good for testing, not so good for long term use.

      posted in NodeBB Plugins
      accalia
      Accalia Elementia