Giter Club home page Giter Club logo

hubot-ingress's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hubot-ingress's Issues

Add badge causes TypeError

Adding badges causes failures

To reproduce:
hubot I have the founder badge

Result:

[Mon Aug 29 2016 22:34:55 GMT-0400 (EDT)] ERROR TypeError: Cannot read property 'U1G3C40F2' of undefined
  at Object.badges.forUser (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:162:12, <js>:108:56)
  at Object.badges.del (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:157:7, <js>:99:66)
  at Object.badges.add (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:153:9, <js>:91:18)
  at TextListener.callback (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:206:9, <js>:154:18)
  at executeListener (/home/will/hubot/node_modules/hubot/src/listener.coffee:65:11, <js>:53:19)
  at allDone (/home/will/hubot/node_modules/hubot/src/middleware.coffee:44:37, <js>:34:16)
  at /home/will/hubot/node_modules/async/lib/async.js:274:13
  at Object.async.eachSeries (/home/will/hubot/node_modules/async/lib/async.js:142:20)
  at Object.async.reduce (/home/will/hubot/node_modules/async/lib/async.js:268:15)
  at /home/will/hubot/node_modules/hubot/src/middleware.coffee:49:7, <js>:37:22
  at nextTickCallbackWith0Args (node.js:420:9)
  at process._tickCallback (node.js:349:13)

Fix please Badge addition failure

Adding badges causes failures ::

Entering ::
herbert I have the founder badge

Causes ::
[Mon Aug 29 2016 22:34:55 GMT-0400 (EDT)] ERROR TypeError: Cannot read property 'U1G3C40F2' of undefined
at Object.badges.forUser (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:162:12, :108:56)
at Object.badges.del (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:157:7, :99:66)
at Object.badges.add (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:153:9, :91:18)
at TextListener.callback (/home/will/hubot/node_modules/hubot-ingress/src/badges.coffee:206:9, :154:18)
at executeListener (/home/will/hubot/node_modules/hubot/src/listener.coffee:65:11, :53:19)
at allDone (/home/will/hubot/node_modules/hubot/src/middleware.coffee:44:37, :34:16)
at /home/will/hubot/node_modules/async/lib/async.js:274:13
at Object.async.eachSeries (/home/will/hubot/node_modules/async/lib/async.js:142:20)
at Object.async.reduce (/home/will/hubot/node_modules/async/lib/async.js:268:15)
at /home/will/hubot/node_modules/hubot/src/middleware.coffee:49:7, :37:22
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)

Add latest anomaly badge

Any chance of a badge update to include the latest anomaly badge?

Thanks, as always for your work.

Link Range Calculation

I think a link range command would be useful. Something like:

Hubot link range [level] [amps]
would return the portal distance it could link

Hubot link range [distance] [num agents] [amps]
would return the portal level needed and fewest, lowest level agents needed to build it without amps
if num agents is provided, then the same but with that number of agents
if amps is provided, then using those link amps

amps would probably need to be something more than just a number. Maybe syntax like 1R2V?

Badge commands aren't working

My bad. No redis ... all is well. Sorry for the bother!

When issuing badge commands i am getting the error below. I am using hubot-ingress 0.4.0 with all node and nom bits installed today at their current versions. Any guidance to where i should look? I saw another person with badge problems and it was mentioned that there could be a problem with reds configuration? It does say it is using default reds on localhost:6379, so it seems to be working.

Any help would be great!

Thanks

--Ryan

[Wed Dec 31 2014 20:47:55 GMT-0500 (EST)] ERROR TypeError: Cannot read property 'U030JFAM1' of undefined
at Object.badges.forUser (/home/corvock/fogbot/node_modules/hubot-ingress/src/badges.coffee:54:12, :39:56)
at Object.badges.del (/home/corvock/fogbot/node_modules/hubot-ingress/src/badges.coffee:49:7, :30:66)
at Object.badges.add (/home/corvock/fogbot/node_modules/hubot-ingress/src/badges.coffee:45:9, :22:18)
at TextListener.callback (/home/corvock/fogbot/node_modules/hubot-ingress/src/badges.coffee:78:9, :71:18)
at TextListener.Listener.call (/home/corvock/fogbot/node_modules/hubot/src/listener.coffee:27:7, :23:14)
at Robot.receive (/home/corvock/fogbot/node_modules/hubot/src/robot.coffee:197:9, :142:33)
at SlackBot.Adapter.receive (/home/corvock/fogbot/node_modules/hubot/src/adapter.coffee:66:5, :47:25)
at SlackBot.message (/home/corvock/fogbot/node_modules/hubot-slack/src/slack.coffee:135:7, :166:21)
at Client. (/home/corvock/fogbot/node_modules/hubot-slack/src/slack.coffee:1:1, :3:61)
at Client.emit (events.js:95:17)
at Client.onMessage (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/src/client.js:439:14)
at WebSocket. (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/src/client.js:142:24)
at WebSocket.emit (events.js:98:17)
at Receiver.self._receiver.ontext (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/node_modules/ws/lib/WebSocket.js:697:10)
at Receiver.opcodes.1.finish (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/node_modules/ws/lib/Receiver.js:397:14)
at Receiver.expectHandler (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/node_modules/ws/lib/Receiver.js:384:31)
at Receiver.add (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/node_modules/ws/lib/Receiver.js:93:24)
at CleartextStream.firstHandler (/home/corvock/fogbot/node_modules/hubot-slack/node_modules/slack-client/node_modules/ws/lib/WebSocket.js:678:22)
at CleartextStream.emit (events.js:95:17)
at CleartextStream. (stream_readable.js:765:14)
at CleartextStream.emit (events.js:92:17)
at emitReadable
(_stream_readable.js:427:10)
at _stream_readable.js:420:7
at process._tickCallback (node.js:442:13)

Integrate Agent-stats api

the agent-stats api https://apidocs.agent-stats.com/ would allow the hubot to lookup an agents stats or information and report back after receiving a request for information. I would imagine a group would need to be setup for the community so that the bot can access the information.

examples
USER - Hubot, How much AP do I have? (alternate could be how much ap does @user have)
HUBOT - @user has 39,999,999 as of their last Agent-stats upload on 1-1-2016.

USER - Hubot, How long till I get level 16? (alternate could be how long till @user gets level 16)
HUBOT - @user has 39,999,999 as of their last agent-stats upload on 1-1-2016. Agent Stats Predicts them getting level 16 on 1-2-2016

USER - Hubot, who in our group has the most AP?
HUBOT - According to agent stats @user1 has 200,000,000 ap while @user2 is in second place at 69,00,000 ap.

USER- Hubot, how close to the next Purifier badge am I? (or is @agent)
HUBOT - @user needs to destroy 5000 more resonators to hit the next tier for :purifier:. agent-stats predicts this will occur on 1-1-2017 per the monthly stats. User last updated their stats on 1-1-2016

these are just some examples of possible things that could be asked. I am sure more people could think of additional items.

`cps on <date>` returns the incorrect date

Attempting to query the cps on a given date is returning date -1

sambot cps on 8/14/2015

sambotBOT [2:03 PM]
The checkpoints on Thu, August 13th 2015 occur at: 1AM EDT, 6AM EDT, 11AM EDT, 4PM EDT, 9PM EDT.

Its possible that this is a configuration issue.

Also if you do a query on an invalid date it returns the CPs on invalid date

sambot cps on august 14th

sambotBOT [2:01 PM]
The checkpoints on Invalid date occur at: Invalid date,Invalid date,Invalid date,Invalid date,Invalid date.

Split badge on more than just commas

I noticed that the bot has issues when interpreting some strings from users who don't fully understand a comma separated list when trying to add badges, would it be possible to change the method of split from .split(',') to .split(/[ ,;]/) to handle more delimiters that people could use? (i admit to most likely being the only one who would use the ; but its easy to add)

Add me as a maintainer

Project looks a bit neglected, potentially interested in helping maintain it.

(Title reworded to shut up gitmagic-bot)

Request to assist with maintaining package

As the subject indicates, I would be interested in helping with maintaining this package.

Re-opening request from #58, which inadvertently used the wrong username to open the issue.

intelmap function not working

so i am running this on windows and i have the hubot_google_geocode_key in my environment vars with the api key also, i know it works because when i echo %name% it the api key comes back. the problem is that when i am running the bot it will not find any locations, i have a normal google maps script that has no problem finding the location on the maps but when it comes to this script it will not return intel links. any help would be much appreciated

Custom badges

I have a feature request: The ability for admins to award special badges, whether for serious things like local ops or competitions, or just fun stuff like a bad linker or other fun poking.

hubot "intel map" addition

It would be nice if the "hubot intelmap" listener would also respond to "hubot intel map". We have many users who use their phones exclusively, and autocorrect likes to add that space.

Badge Ordering

Love this script. 2 requests:

  1. Could Hubot recite the badges in opposite order he is currently? For example, it currently recites from oldest added to newest added.
  2. Could Hubot prioritize the anomaly badges from newest to oldest anomaly, like the scanner currently does? So the order would be [Anomaly Badges Newest-Oldest],[All other badges newest-oldest].

Thanks!

Fix output for MUs needed when ENL is losing

The output from cycle-times.coffee for MUs needed to win a cycle is incorrect when the Enlightened are losing. Since the difference is calculated using ENL - RES and then if the difference is < 1 it is cast to zero, and then regardless 1 is added to the difference, any time the ENL are losing the output will be 1 MU for them to win. This should be refactored slightly to use Math.abs() instead to always have a positive value returned.

To reproduce, issue the command "mu needed 506114 149875" (which is what I used to discover it, but as long as the RES score is higher than the ENL score, any values will work for this). Depending upon the number of checkpoints into the cycle you are, the value will vary, but you should see a value higher than 1 for the number of MUs needed.

Add contributing guide (contributing.md)

Write a guide detailing the best practices for submitting PRs to this repository. Should we also include a section for maintainers as well, now that we have a couple?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.