lowercase
This commit is contained in:
parent
91f9e777cf
commit
72a09af340
2 changed files with 11 additions and 8 deletions
|
|
@ -8,6 +8,7 @@ import "package:shelf_router/shelf_router.dart";
|
||||||
|
|
||||||
void main(List<String> argsRaw) async {
|
void main(List<String> argsRaw) async {
|
||||||
final container = ProviderContainer();
|
final container = ProviderContainer();
|
||||||
|
final isDebug = true;
|
||||||
|
|
||||||
final handler = const Pipeline()
|
final handler = const Pipeline()
|
||||||
.addMiddleware(logRequests())
|
.addMiddleware(logRequests())
|
||||||
|
|
@ -53,13 +54,15 @@ void main(List<String> argsRaw) async {
|
||||||
);
|
);
|
||||||
|
|
||||||
final server = HttpServer.listenOn(
|
final server = HttpServer.listenOn(
|
||||||
await ServerSocket.bind(
|
isDebug
|
||||||
InternetAddress(
|
? await ServerSocket.bind(InternetAddress.loopbackIPv4, 8080)
|
||||||
"/var/run/cozybot/socket",
|
: await ServerSocket.bind(
|
||||||
type: InternetAddressType.unix,
|
InternetAddress(
|
||||||
),
|
"/var/run/cozybot/socket",
|
||||||
0,
|
type: InternetAddressType.unix,
|
||||||
),
|
),
|
||||||
|
0,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
serveRequests(server, handler);
|
serveRequests(server, handler);
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class RecordController extends Notifier<String> {
|
||||||
message,
|
message,
|
||||||
_,
|
_,
|
||||||
) {
|
) {
|
||||||
if (userstate.username == "Streamlabs") {
|
if (userstate["username"] == "streamlabs") {
|
||||||
final match = RegExp(
|
final match = RegExp(
|
||||||
r"\d+[Ww]?-\d+[Ll]?",
|
r"\d+[Ww]?-\d+[Ll]?",
|
||||||
).allMatches(message).lastOrNull;
|
).allMatches(message).lastOrNull;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue