Giter Club home page Giter Club logo

hex's Introduction

Hexidecimal IRC bot

An IRC bot for the x10hosting IRC written completely in Node.js

Installation

To install, copy config/index.sample.js to config/index.js and modify the necessary config settings.

Usage

To run the bot (once you have installed it), use either of these two commands:

nohup node hex.js >> log &
supervisor --watch README hex.js >> log &

Run them from inside the Hex directory.

Demo Bot

There is a small bot written in PHP in /demo/. It's not used, and is just there for reference.

Contributing

If you wish to contribute to Hex, run it past me first. If you're adding a feature, you'll want to confirm with me that Hex actually needs that feature. If you're fixing a bug, it is less important. File an issue on GitHub, and say that you're fixing it - this lets everyone else know that you're fixing it, so that they don't fix it themselves.

IRC

We're on IRC (obviously); go to #x10bot on irc.x10hosting.com. Standard ports and stuff.

Coding Standards

Most of this is fairly obvious - look at hex.js and handler.js, and copy the coding standards used in there. A basic summary:

  • Curly brackets on the same line, with white space in the normal places.
  • Space before the parenthesis on function expressions, but not function declerations.
  • Semi-colons everywhere! (except after function declerations)
  • Single quotes only, please.
  • No micro-optimisations. It's a robot.

Committing

Only a few guidelines here. Commits should use the following syntax:

[issue/#] Basic description of the commit.

Longer description of what the commit does and how it does it. Can wrap
multiple lines. The commit message should not be any longer than 79 characters
wide at any point - you editor should do this for you, anyway. Second line
should remain empty.

ref #ticketnumber

I should be able to tell exactly what the commit does without reading the diff - a commit message can never be too long!

If you notice an error in a previous commit which you haven't pushed yet, amend it instead of making a new commit.

So an example commit:

[issue/19] Fixed a bug where blank wiki command would link nowhere.

Now it links to the wiki main page.

ref #19

Branching

Every issue should have its own branch; branch the master branch, make changes, send a pull request. This means that you can continue working on something else while your pull request is waiting to be merged.

Contributors

  • callumacrae - GIT Janitor
  • Dead-i - Server Slave
  • GtoXic - Server Admin
  • xav0989 - Awesome Coder
  • Sharky - THE BOSS
  • The Weather Guy - That guy
  • Sierra - Administrative Suspendotron of many names
  • stpvoice - The VOICE of Silver, Turquoise and Purple
  • zachary - The Bot Whisperer

hex's People

Contributors

callumacrae avatar

Stargazers

Jonathan Lopez avatar  avatar  avatar John Houlder avatar Tom Doyle avatar Charleno Pires avatar

Watchers

 avatar James Cloos avatar Ethan Waite avatar

hex's Issues

Part command doesn't work

when using hex: admin part #channel the bot crashes with error:

GtoXic added as admin.
"admin part" called by GtoXic

/cygdrive/c/hex/node_modules/bot.js:88
listeners[i][1](info, data);
^
TypeError: Property '1' of object /^:GBot![^@]+@[^ ]+ PART #lynxphp/,,true is not a function
at IRC.handle (/cygdrive/c/hex/node_modules/bot.js:88:19)
at Socket. (/cygdrive/c/hex/node_modules/bot.js:20:12)
at Socket.emit (events.js:64:17)
at Socket._onReadable (net.js:673:31)
at IOWatcher.onReadable as callback

Hostmask Change = Ignored by Hex

Callumacrae told me to report this.

I recently changed my vhost via hostserv on an IRC network Hex is installed on, and now I'm unable to use any commands at all, not even the public ones. Cal says that it's because of the hostmask change, so I'm blaming that.

News

Same as was planned for x10Bot - get latest twitter, status, etc. stuff.

Check if nick exists before sending

At the moment, the @ symbol can be used to direct messages towards a certain person. Although this is a rather good feature, it currently does not detect whether the requested user exists or not. This may be a very useful improvement to prevent spamming and abuse.

If a bot from BotServ was in the room, it would probably be possible for any user to perform any channel commands in the room (like op, devoice, etc). Here is an example of this exploit if a BotServ bot was in channel. In this case, the BotServ bot is called 'Holly'.

<+User> hex ping @ !op User blah
<@Hex> !op User blah: PONG
* Holly set mode +o for User

process.exit needs latency

calling "a quit" causes the bot to do the same as "a restart" because of the fact there is no latency.

Hex ping does not respond

Although it works for many other people, when I run 'hex ping', it does not respond to me.

Steps to replicate:
<+Dead-i> hex ping
<+Somebody-Else> hex ping
<@Hex> Somebody-Else: PONG

Log to channel

Bot messages ("blabla has identified as admin") should be output into a channel.

Actual code documentation

Having in-code documentation would be great, i.e. having comments in the code that describe what each block or complex section does.

hex js

bugs if just "hex js"

Submit issues through Hex

If anyone finds an issue, then they will be able to submit bug reports and feature requests through the bot itself. Here is an example:

<+Dead-i> hex a issue The PING command appears to have broken.
<@Hex> The issue was posted to GitHub.

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.