Giter Club home page Giter Club logo

shellby's Introduction

Shellby

Shellby is an IRC bot built mostly in bash script. This allows you to write handlers that work on the IRC input as a stream, with stdout being sent to the IRC server.

Motivation

Yeah, yeah, but your [developers] were so preoccupied with whether or not they could that they didn't stop to think if they should.

Dr. Ian Malcolm

Usage

Configure ~/.shellby/etc/config with appropriate values then run bin/shellby.

If you register the account for the bot you can add a ~/.shellby/etc/password file containing just the nickserv password and it will auth itself on join.

Dependencies

  • ncat (provided by nmap)
  • dos2unix
  • gawk
  • bash >=4

Data

The files for the gh command are not included in the repository. I have compiled a list of submissions for use with the bot, but I do not believe that I am allowed to redistribute said content. Email me if you would like a copy.

shellby's People

Contributors

benoithiller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

shellby's Issues

Proper Unicode Search

Provide a unicode search command that uses the latest unicode consortium data.

Interface

Search by codepoint

./u <code>

Where code can have any of the following formats:

  • uFFFF
  • u+FFFF
  • \uFFFF
  • 0xFFFF
  • 0xF0 0x9F 0x98 0xBC where the provided numbers form a single valid codepoint
  • 240 159 152 188 where the provided numbers form a single valid codepoint
  • 128572 which is treated as a decimal unicode identifier

Search by string:

./u <regex>...

Search against the entity name field(s) using the specified regex. I will probably end up doing this with the awk regex engine.

Seach by char:

./u <char>

Will search through the character representation fields. Not sure if/how I want to handle normalization with that. This search is performed instead of string search when the argument is exactly one unicode character.

Update database:

./u -u

Print current version and retrieval date:

./u -v

Output

The queries should all output the following information:

U+[ID], [codepoints array], [description] ([char])

Quotes

Command to add a line from the recent chat history to a file of user quotes.

Command Syntax

Adding a quote:

./quote <nick> <quote text...>

Getting a quote, with optional target user:

./quote [nick]

Getting all quotes, with optional target user:

./quote -a [nick]

Logging breaks with timezone changes

As is the timestamps in the logs are local unix time. This means that if you read them back after changing the timezone it will get the time wrong.

They should be written out as UTC and converted to local when read back in.

There are probably many similar time handling issues that should be fixed the same way.

Karma Tracking

I would like Shellby to provide completely invisible karma tracking.

Thus it should:

  • report karma only when asked
  • populate initial karma from logs
  • attempt to determine user accounts and combine karma for nicks that share an account(maybe)
  • recognize the following forms:
    • /^nickname[:,]? \+\+([^+]|$)/
    • /\bnickname\+\+([^+]|$)/
  • only accept one inline increment, because seriously

./py

Command to make using python with eval.in easier.

Simply send the following as the code to execute:

import sys;from code import InteractiveInterpreter;
InteractiveInterpreter().runsource(sys.stdin.read())

Then pass the user submitted code to stdin.

Tells

Command to provide a reminder for a user next time they speak.

Syntax

./tell <nickname> <message>

When the user talks shellby will send them a message in the following format:

<nickname>: <sender> asked me to tell you <message>

I am not sure whether it is desirable to add so much overhead. The max message length would be, in the worst case, SERVER_MAX - 25 - NICK_MAX * 2. Though anything over 400 seems sufficient for almost all non annoying messages.

It may also be desirable to provide ./ask that uses asked me to ask you in the reminder.

Log viewer

A user should be able to view logs by channel and date in text, html, and json.

Nicks not normalized

Strictly speaking case-invariant compare is insufficient for irc nicks because of how {|} should equal [/] respectively.

There are many places in the code that need to be changed to use normalized nicks.

It may be wise to attempt to normalize them when they are read in with a preprocessor.

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.