All Projects → vbauer → jabberjay

vbauer / jabberjay

Licence: EPL-1.0 license
Simple framework for creating Jabber bots

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to jabberjay

Jackal
Instant messaging server for the Extensible Messaging and Presence Protocol (XMPP).
Stars: ✭ 899 (+2397.22%)
Mutual labels:  jabber
Beagle Im
XMPP client for macOS based on TigaseSwift XMPP library
Stars: ✭ 86 (+138.89%)
Mutual labels:  jabber
Smack
Smack is an open-source, highly modular, easy to use, XMPP client library written in Java for Java SE compatible JVMs and Android.
Stars: ✭ 2,267 (+6197.22%)
Mutual labels:  jabber
Inverse.js
inVerse: A fullscreen, single-page, XMPP-chat application.
Stars: ✭ 10 (-72.22%)
Mutual labels:  jabber
Hxmpp
Haxe XMPP library
Stars: ✭ 61 (+69.44%)
Mutual labels:  jabber
Dino
Modern XMPP ("Jabber") Chat Client using GTK+/Vala
Stars: ✭ 1,637 (+4447.22%)
Mutual labels:  jabber
Bitlbee
An IRC to other chat networks gateway 🐝
Stars: ✭ 513 (+1325%)
Mutual labels:  jabber
Converse.js
Web-based XMPP/Jabber chat client written in JavaScript
Stars: ✭ 2,745 (+7525%)
Mutual labels:  jabber
Kaidan
[Replaced by https://invent.kde.org/network/kaidan] Kaidan, a simple and user-friendly Jabber/XMPP client for every device and platform.
Stars: ✭ 67 (+86.11%)
Mutual labels:  jabber
Tigase Server
Highly optimized, extremely modular and very flexible XMPP/Jabber server
Stars: ✭ 170 (+372.22%)
Mutual labels:  jabber
Notifyrelay
forward Android messages to a jabber account or your gotify server
Stars: ✭ 12 (-66.67%)
Mutual labels:  jabber
Omemo Top
Tracking the Progress of OMEMO Integration in various clients
Stars: ✭ 47 (+30.56%)
Mutual labels:  jabber
Vk4xmpp
Jabber-транспорт для ВКонтакте (A jabber gateway to the VK social network)
Stars: ✭ 114 (+216.67%)
Mutual labels:  jabber
Torpedo
Pluggable, multi-network asynchronous chat bot written in Go
Stars: ✭ 19 (-47.22%)
Mutual labels:  jabber
Openfire
Openfire is a real time collaboration (RTC) server licensed under the Open Source Apache License. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber). Openfire is incredibly easy to setup and administer, but offers rock-solid security and performance.
Stars: ✭ 2,423 (+6630.56%)
Mutual labels:  jabber
Ejabberd
Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
Stars: ✭ 5,077 (+14002.78%)
Mutual labels:  jabber
Mongooseim
MongooseIM is a mobile messaging platform with focus on performance and scalability
Stars: ✭ 1,387 (+3752.78%)
Mutual labels:  jabber
Lurch4Adium
OMEMO Xtra for Adium (packaging the lurch and carbons libpurple plugins)
Stars: ✭ 38 (+5.56%)
Mutual labels:  jabber
Lurch
XEP-0384: OMEMO Encryption for libpurple.
Stars: ✭ 245 (+580.56%)
Mutual labels:  jabber
Blabber.im
blabber.im basiert auf Conversations und ist ein Open Source XMPP/Jabber Messenger für Android 4.1+
Stars: ✭ 124 (+244.44%)
Mutual labels:  jabber

Jabberjay Build Status

Jabberjays are a type of muttation that consist of all male birds that were created in the Capitol labs to spy on enemies and rebels of the Capitol. Jabberjays had the ability to memorize and repeat entire human conversations, and were used as spies, to gather words and information. - The Hunger Games

Jabberjay is a Clojure micro-framework for creating Jabber bots.

Programming your own Jabber bot can be helpful and fun. You can use your Jabber bot to provide information about some running systems or to make your services interact with users.

Configuration

Default configuration is stored in project resources (config.edn) in EDN format:

{:jabber {:username "Fill me up!"
          :password "Fill me up!"
          :host "Fill me up!"
          :domain "Fill me up!"}
 :scripts {:folder "scripts"
           :watchdog 1000}}

Before using, it is necessary to configure the following parameters:

  • :username (ex: "[email protected]")
  • :password (ex: "iddqd")
  • :host (ex: "talk.google.com")
  • :domain (ex: "gmail.com")

It is also possbile to use user-base configuration file, which should be located in ~/jabberjay.edn. All parameters from this file override default config parameters.

Development

To develop Jabber command, you need to create Clojure file in the script :folder. When :watchdog parameter is defined, then FS watchdog will check changes and reload scripts in runtime each N milliseconds. It could be useful in development mode, but you can switch if off in production mode (using :watchdog equals 0).

It is necessary to follow several rules during Jabber command development:

  • Each command should be implemented in separate script file (with the same namespace).
  • Command name is the file name (ignoring case).
  • It is possible to use all artifacts from Jabberjay's classpath.
  • Last function in the script file is the entry point.
  • Result of the last function is the answer message, it will be sent to user.

Script context

Each script receives context parameters, for example:

{:subject nil
 :from "[email protected]/gmail.3167A379"
 :to "[email protected]"
 :thread nil
 :error nil
 :packet-id "5A19D18217BBD43_1"
 :type :chat
 :from-name "[email protected]"
 :body "Hi Bot"
 :text "Bot"}

Example

This simple command always returns "Hello, your jabber account", when client sends "Hi" ("HI", "hi", "hI"):

(ns hi)

(defn init
  "Simple module for greating"
  [data]
  (str "Hello, " (or (:from-name data)
                     (:from data))))

Another example: scripts/weather.clj.

Usage

To grab a JAR from latest release:

curl -L -O https://github.com/vbauer/jabberjay/releases/download/0.2.0/jabberjay.jar

To build executable JAR from sources:

lein do clean, uberjar

To run the bot, simply do:

java -jar target/jabberjay.jar &

Might also like

  • lein-plantuml - a Leiningen plugin for generating UML diagrams using PlantUML.
  • lein-asciidoctor - a Leiningen plugin for generating documentation using Asciidoctor.
  • lein-jshint - a Leiningen plugin for running javascript code through JSHint.
  • lein-jslint - a Leiningen plugin for running javascript code through JSLint.
  • lein-coffeescript - a Leiningen plugin for running CoffeeScript compiler.
  • lein-typescript - a Leiningen plugin for running TypeScript compiler.
  • coderwall-clj - a tiny CoderWall client for Clojure.

License

Copyright © 2015 Vladislav Bauer

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

See LICENSE for more details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].