Git Product home page Git Product logo

irc.dart's People

Contributors

azenla avatar kubeliv avatar mbullington avatar neener54 avatar nicolasbrugneaux avatar samrg472 avatar sethladd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

irc.dart's Issues

Documentation build failed

I want to use this package, so I would Consult the Documentation.
But this fails build. How do I watch the Documentation?

P.S. I am not goot at English. Sorry for poor sentence.

Ban List Tracking

Add Ban List Tracking

API

Channel {
  List<GlobHostmask> get bans;
  void reload_bans();
}

Incorrect handler inside function "isUserOn"

Hi, while working with your library, i discovered a potential bug inside function isUserOn of the Client class.

@override
  Future<bool> isUserOn(String name,
    ...
     var handler = (WhoisEvent event) {
      if (event.nickname == nickname) {
        if (!completer.isCompleted) {
          completer.complete(event.away);
        }
      }
   };
    ...

I think the handler is intercepting the wrong event, it should be IsOnEvent, in fact the call always returns false. Moreover, the check "if(event.nickname == nickname)" is incorrect, because nickname represents the current nickname of our client user, not the nickname of the user we are trying to query (whose nickname is on the "name" parameter of the function).

I fixed the handler like so:

var handler = (IsOnEvent event) {
      if (!completer.isCompleted) {
        completer.complete(event.users.contains(name));
      }
    };

Now, it works. Is my reasoning correct or there is something escaping to me? In the first case, I can pull request my fix.``

Add User Objects

In order to improve the API, it would be nice to include user objects.

  • Implement WHOIS Support
  • Create User Objects
  • Add User Tracking
class User {
  String nickname;
  String username;
  List<Channel> channels = [];
  String mode;
}

Null-safety

About 2 months ago, Dart 2.12 was released, which made NNBD/Null-safety stable. This package has to be migrated.

Closed by #36.

Add BotConfig.fromJSON constructor

Adds Support for loading Bot Configurations from JSON

BotConfig.fromJSON(String input) {
  var config = JSON.convert(input);
  this.fromMap(config);
}

Dependencies: #5

Bindhost

There should be a connect method that allows you to bind to a specific host, such as a different IP than the default.

Add BotConfig.fromMap constructor

Will add a BotConfig.fromMap constructor so that configurations can be loaded from a map.

BotConfig.fromMap(Map<String, Object> config) {
  username = config["username"];
  /* Other Fields */
}

Remove deprecated StartTLS

The StartTLS IRCv3 extension has been deprecated and replaced. We need to remove this from our library.

Create new debug client

While removing the bot-based classes, the debug client had to be removed. It will need to be rewritten for development purposes.

Bot Communications

Requirements

  • Set bot to true in the Configuration.
  • If bot is set to true, join #bot-communications.
  • Follow the soon to be written bot communications document.

IRC client.dart not working in Flutter 1.9.1

I get the following error when running the Getting started tutorial:

Compiler message:
../../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/irc-4.0.1/lib/src/client/connection.dart:53:28: Error: The argument type 'Utf8Decoder' can't be assigned to the parameter type 'StreamTransformer<Uint8List, dynamic>'.
 - 'Utf8Decoder' is from 'dart:convert'.
 - 'StreamTransformer' is from 'dart:async'.
 - 'Uint8List' is from 'dart:typed_data'.
Try changing the type of the parameter, or casting the argument to 'StreamTransformer<Uint8List, dynamic>'.
          .transform(const Utf8Decoder(allowMalformed: true))

I couldn't fix it with the suggested solution, seems related to this

Any help is appreciated

Thank you!

Unable to use the library with flutter.

Hello,

I'm trying to use the library with flutter using Android studio. However, every time I try to run the app, I get this error:

/flutter ( 5403): [ERROR:flutter/shell/common/shell.cc(93)] Dart Error: error: import of dart:mirrors is not supported in the current Dart runtime
E/flutter ( 5403): [ERROR:flutter/runtime/dart_isolate.cc(141)] Could not prepare isolate.
E/flutter ( 5403): [ERROR:flutter/runtime/runtime_controller.cc(381)] Could not create root isolate.
E/flutter ( 5403): [ERROR:flutter/shell/common/shell.cc(580)] Could not launch engine with configuration.

I think that this is because of the dart:mirrors package. Any advice would be appreciated.

Thank you.

Example from Getting Started fails!

Following code:

import "package:irc/client.dart";
void makeConnection(){
  var config = new Configuration(
    host: "chat.freenode.net",
    port: 54012,
    nickname:"DartBot",
    username: "DartBot"
  );
  var client = new Client(config);
  client.onReady.listen((event) {
    event.join("#live");
  });
  client.onMessage.listen((event) {
    print("<${event.target.name}><${event.from.name}> ${event.message}");
  });
  client.connect();
}
void main(List<String> arguments) {
  makeConnection();
}

leads to following error:

SocketException: OS Error: Operation timed out, errno = 60, address = chat.freenode.net, port = 54094

If you could enlighten me as to what is causing this (or what I am doing wrong), I would be much obliged to you. Thank you for the awesome library!! 🦄 🖤

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.