modelomaker812 / bashbot Goto Github PK
View Code? Open in Web Editor NEWThis project forked from shinohai/bashbot
Simple IRC bot written entirely in bash.
This project forked from shinohai/bashbot
Simple IRC bot written entirely in bash.
== bashbot - damn simple IRC bot == Bashbot is a simple bot written entirely in bash. I've written it such that the addition of commands is simple, and language agnostic (any executable script/file can be used as a command). The use of 'filters' is also supported (see below). Note: bashbot has not been audited for insecurities...its main deployment is on an IRC server where I trust all of the users. == getting started == The bot consumes a bashbot.config file in the directory it is executed from. The default braindead configuration should be easily modified to meet your needs: nick=bashbot server=irc.freenode.net port=6667 chans=( "#bottest" ) == commands == Any executable file placed in the 'commands' subdirectory is available for execution immediately by the bot. Commands are executed when the bot is mentioned in a channel it currently belongs to. For example, if 'bashbot: do_something a b c d' was said in a channel bashbot belongs to, it will attempt to execute the 'do_something' executable in the command subdirectory, passing it the arguments a, b, c, and d. It is also possible for a user to directly PM the bot. Commands also have available to them: $CHANNEL - the channel with which the query was requested from $NAME - the nickname of the individual making the request send() - function allowing for the sending of raw messages to the server Standard output is captured and sent back to the requesting user. == filters == When any non-command message is sent to a channel, the message is checked against a series of regexps, and if they match, a callback is executed. Filters are added by adding a simple bash script to the filters/ subdirectory. For example, if we want to tell the channel 'polo' whenever anyone says 'marco', we can accomplish this by adding the following file to the filters subdir: say_polo() { echo 'polo'; } filter 'marco' say_polo In addition, arguments are passed to the callback that correspond the regexp match state. For example, if you to respond by saying 'goodbye, {x}' whenever someone says 'hello, {x}', you can do so fairly simply: say_goodbye() { echo "goodbye, $2"; } filter 'hello, ([^ ]+)' say_goodbye Note: the first argument passed is the entire matched string.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.