gaypizzaspecifications / irc.dart Goto Github PK
View Code? Open in Web Editor NEWDart IRC Library
License: MIT License
Dart IRC Library
License: MIT License
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.
Add Ban List Tracking
Channel {
List<GlobHostmask> get bans;
void reload_bans();
}
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 a Kick Event
Hi,
I made a few changes:
https://github.com/DirectMyFile/irc.dart/wiki/Getting-Started
Please verify.
Thanks!
In order to improve the API, it would be nice to include user objects.
class User {
String nickname;
String username;
List<Channel> channels = [];
String mode;
}
About 2 months ago, Dart 2.12 was released, which made NNBD/Null-safety stable. This package has to be migrated.
Closed by #36.
In order to make irc.dart more stable, we need unit tests.
Add WHOIS Handling.
This will be difficult, but we can do it.
Add the ActionEvent.
Adds Support for loading Bot Configurations from JSON
BotConfig.fromJSON(String input) {
var config = JSON.convert(input);
this.fromMap(config);
}
Dependencies: #5
SASL came with IRCv3.1, and it's a big thing to support.
There should be a connect method that allows you to bind to a specific host, such as a different IP than the default.
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 */
}
The StartTLS IRCv3 extension has been deprecated and replaced. We need to remove this from our library.
I get this error when trying to use this library in flutter.
flutter --version:
Flutter 1.17.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f7a6a7906b (2 weeks ago) • 2020-05-12 18:39:00 -0700
Engine • revision 6bc433c6b6
Tools • Dart 2.8.2
While removing the bot-based classes, the debug client had to be removed. It will need to be rewritten for development purposes.
Can happen :(
And no error message, it just never fires up.
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!
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.
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!! 🦄 🖤
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.