irc 1.2.2-dev.2 copy "irc: ^1.2.2-dev.2" to clipboard
irc: ^1.2.2-dev.2 copied to clipboard

outdated

A feature-full Dart IRC library

Dart IRC Build Status #

The Beautiful IRC Library for Dart that WORKS!

Report any issues here!

Design #

irc.dart is designed to work out of the box in a very configurable way.

  • Optional Synchronous System
  • Builtin Bot System
  • Ability to create your own bots
  • Easy to Understand API
  • Use of a lot of Language Features
  • Optionally use only what you need

Bots #

Command Bot #

The command bot is just a normal bot implementation of commands.

import 'package:irc/irc.dart';

void main() {
    BotConfig config = new BotConfig(
        host: "irc.freenode.net",
        port: 6667,
        nickname: "DartBot",
        username: "DartBot"
    );

    CommandBot bot = new CommandBot(config, prefix: ".");

    bot.register((ReadyEvent event) {
        event.join("#irc.dart");
    });

    bot.command("help").listen((CommandEvent event) {
        event.reply("> ${Color.BLUE}Commands${Color.RESET}: ${bot.commands.keys.join(', ')}");
    });

    bot.connect();
}

Dumb Bot #

This bot just prints messages to the console.

import 'package:irc/irc.dart';

void main() {
    BotConfig config = new BotConfig(
        host: "irc.freenode.net",
        port: 6667,
        nickname: "DartBot",
        username: "DartBot"
    );

    CommandBot bot = new DumbBot(config);

    bot.register((ReadyEvent event) {
        event.join("#irc.dart");
    });

    bot.connect();
}

Library #

There is also a plain library to write your own IRC Bots!

import 'package:irc/irc.dart';

void main() {
    BotConfig config = new BotConfig(
        host: "irc.esper.net",
        port: 6667,
        nickname: "DartBot",
        username: "DartBot"
    );

    Client client = new Client(config);

    client.register((ReadyEvent event) {
        event.join("#DirectCode");
    });

    client.connect();
}
6
likes
0
points
128
downloads

Publisher

unverified uploader

Weekly Downloads

A feature-full Dart IRC library

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

event_dispatcher

More

Packages that depend on irc