Javascript library to connect and interact with Quassel IRC server.
npm install --production libquasselYou just need to import dist/libquassel.js in your HTML page.
npm install libquasselIn order to create a browser compatible file, run the following commands
# use browserify to build on change
npm run watch
# before commit, make the dev version + minified version + the doc
npm run buildVersion 3.0 introduces the following breaking changes:
message.Typehas been superseded bymessage.Types, and all its constants are now UPPERCASEchannel.activehas been superseded bychannel.isActivechannel.isChannel()has been superseded bychannel.isChannelchannel.isHighlighted()has been superseded bychannel.isHighlightedmessage.isHighlighted()has been superseded bymessage.isHighlightedmessage.isSelf()has been superseded bymessage.isSelfnetwork.getBufferCollection()andnetwork.getBufferMap()have been merged intonetworks.buffersnetworkCollection.findBuffer(...)andnetworkCollection.get(...)have been merged intonetwork.getBuffer(...)- The majority of setter methods has been replaced by direct affectation to the target property
- e.g.
network.setName(name)as been superseded bynetwork.name = name
- e.g.
- The majority of getter methods has been replaced by direct access to the target property
- e.g.
network.getStatusBuffer()as been superseded bynetwork.statusBuffer
- e.g.
Client(...).connectmethod expects aSocketor any otherDuplexas parameter.
libquasselis available as a global object.Client(...).connectmethod expects alibquassel.WebSocketStreamor any otherDuplexas parameter.
const { Client } = require('libquassel');
const net = require('net');
const socket = net.createConnection({
host: "localhost",
port: 4242
});
const quassel = new Client((next) => next("user", "password"));
quassel.on('network.init', (networkId) => {
network = quassel.networks.get(networkId);
// ...
});
// ...
quassel.connect(socket);<!-- In your HTML -->
<script src="/path/to/libquassel.js"></script>// libquassel in available as a global in browser
const socket = new libquassel.WebSocketStream('wss://domain.tld:12345', ['binary', 'base64']);
const quassel = new libquassel.Client((next) => next("user", "password"));
quassel.on('network.init', (networkId) => {
network = quassel.networks.get(networkId);
// ...
});
// ...
quassel.connect(socket);See test folder for examples.
- Add support for core highlight rules
- Update dependencies
Copyright (c) 2019 Joël Charles Licensed under the MIT license.