Compare commits
No commits in common. "c3f297deaa6d31d38b06f249c81da07ce141a1df" and "f712b59df10e7e6340134276df39a4e1ed31ab31" have entirely different histories.
c3f297deaa
...
f712b59df1
2 changed files with 24 additions and 25 deletions
38
flake.lock
38
flake.lock
|
@ -6,11 +6,11 @@
|
|||
"rust-analyzer-src": "rust-analyzer-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719815435,
|
||||
"narHash": "sha256-K2xFp142onP35jcx7li10xUxNVEVRWjAdY8DSuR7Naw=",
|
||||
"lastModified": 1717223092,
|
||||
"narHash": "sha256-ih8NPk3Jn5EAILOGQZ+KS5NLmu6QmwohJX+36MaTAQE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "ebfe2c639111d7e82972a12711206afaeeda2450",
|
||||
"rev": "9a025daf6799e3af80b677f0af57ef76432c3fcf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -59,11 +59,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1719506693,
|
||||
"narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=",
|
||||
"lastModified": 1716948383,
|
||||
"narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a",
|
||||
"rev": "ad57eef4ef0659193044870c731987a6df5cf56b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -75,27 +75,27 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1720386169,
|
||||
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
|
||||
"lastModified": 1718811006,
|
||||
"narHash": "sha256-0Y8IrGhRmBmT7HHXlxxepg2t8j1X90++qRN3lukGaIk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "194846768975b7ad2c4988bdb82572c00222c0d7",
|
||||
"rev": "03d771e513ce90147b65fe922d87d3a0356fc125",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1721116560,
|
||||
"narHash": "sha256-++TYlGMAJM1Q+0nMVaWBSEvEUjRs7ZGiNQOpqbQApCU=",
|
||||
"lastModified": 1719379843,
|
||||
"narHash": "sha256-u+D+IOAMMl70+CJ9NKB+RMrASjInuIWMHzjLWQjPZ6c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9355fa86e6f27422963132c2c9aeedb0fb963d93",
|
||||
"rev": "b3f3c1b13fb08f3828442ee86630362e81136bbc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -129,11 +129,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721042469,
|
||||
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=",
|
||||
"lastModified": 1719259945,
|
||||
"narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd",
|
||||
"rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -153,11 +153,11 @@
|
|||
"rust-analyzer-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1719760370,
|
||||
"narHash": "sha256-fsxAuW6RxKZYjAP3biUC6C4vaYFhDfWv8lp1Tmx3ZCY=",
|
||||
"lastModified": 1717169693,
|
||||
"narHash": "sha256-qBruki5NHrSqIw5ulxtwFmVsb6W/aOKOMjsCJjfalA4=",
|
||||
"owner": "rust-lang",
|
||||
"repo": "rust-analyzer",
|
||||
"rev": "ea7fdada6a0940b239ddbde2048a4d7dac1efe1e",
|
||||
"rev": "d6d735e6f20ef78b16a79886fe28bd69cf059504",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
11
src/main.rs
11
src/main.rs
|
@ -39,7 +39,6 @@ pub async fn main() {
|
|||
match message {
|
||||
ServerMessage::Privmsg(m) => {
|
||||
let is_moderator = m.badges.iter().any(|badge| badge.name == "moderator");
|
||||
let is_broadcaster = m.badges.iter().any(|badge| badge.name == "broadcaster");
|
||||
let channel = m.channel_login.clone();
|
||||
let sender = m.sender.name.clone();
|
||||
let contents = m.message_text.clone();
|
||||
|
@ -54,7 +53,7 @@ pub async fn main() {
|
|||
|
||||
match command {
|
||||
"ping" => {
|
||||
if is_moderator || is_broadcaster {
|
||||
if is_moderator {
|
||||
ping_command(&m, &client).await.unwrap_or_default();
|
||||
} else {
|
||||
sleep(Duration::from_secs(1));
|
||||
|
@ -62,7 +61,7 @@ pub async fn main() {
|
|||
}
|
||||
}
|
||||
"song" => {
|
||||
if is_moderator || is_broadcaster {
|
||||
if is_moderator {
|
||||
lastfm_command(&m, &client).await.unwrap_or_default();
|
||||
} else {
|
||||
sleep(Duration::from_secs(1));
|
||||
|
@ -70,7 +69,7 @@ pub async fn main() {
|
|||
}
|
||||
}
|
||||
"user" => {
|
||||
if is_moderator || is_broadcaster {
|
||||
if is_moderator {
|
||||
get_user_command(&m, &client, &arguments)
|
||||
.await
|
||||
.unwrap_or_default();
|
||||
|
@ -82,7 +81,7 @@ pub async fn main() {
|
|||
}
|
||||
}
|
||||
"logs" => {
|
||||
if is_moderator || is_broadcaster {
|
||||
if is_moderator {
|
||||
logs_command(&m, &client, &arguments)
|
||||
.await
|
||||
.unwrap_or_default();
|
||||
|
@ -94,7 +93,7 @@ pub async fn main() {
|
|||
}
|
||||
}
|
||||
"massping" => {
|
||||
if is_moderator || is_broadcaster {
|
||||
if is_moderator {
|
||||
massping_command(&m, &client).await.unwrap_or_default();
|
||||
} else {
|
||||
sleep(Duration::from_secs(1));
|
||||
|
|
Loading…
Reference in a new issue