1.0.1 • Published 8 months ago

@thaunknown/web-irc v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

@thaunknown/web-irc

A TypeScript port of irc-framework's WebIRC client, without the bloat of unnceessary packages.

This port reduces the bundle size from over 500KB to just under 100KB, while increasing speed and reducing resource usage.

Example usage:

import client, { createChannelConstructor } from '@thaunknown/web-irc'

client.connect({
  version: null,
  enable_chghost: true,
  enable_setname: true,
  message_max_length: 350,
  host: hostname,
  port: 5004,
  tls: true,
  path: '',
  password: '',
  account: {},
  nick: ident,
  username: ident,
  gecos: url,
  encoding: 'utf8',
  auto_reconnect: false,
  transport: createChannelConstructor(channelURL, '', 1)
})

client.once('connected', () => {
  const channel = client.channel('name')
  client.once('join', () => {
    channel.say('hello world')
  })
})

Function calls and events are the same as irc-frameworks's.

1.0.1

8 months ago

1.0.0

8 months ago