Compare commits

..

No commits in common. "c3f297deaa6d31d38b06f249c81da07ce141a1df" and "f712b59df10e7e6340134276df39a4e1ed31ab31" have entirely different histories.

2 changed files with 24 additions and 25 deletions

View file

@ -6,11 +6,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1719815435, "lastModified": 1717223092,
"narHash": "sha256-K2xFp142onP35jcx7li10xUxNVEVRWjAdY8DSuR7Naw=", "narHash": "sha256-ih8NPk3Jn5EAILOGQZ+KS5NLmu6QmwohJX+36MaTAQE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "ebfe2c639111d7e82972a12711206afaeeda2450", "rev": "9a025daf6799e3af80b677f0af57ef76432c3fcf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -59,11 +59,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1719506693, "lastModified": 1716948383,
"narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", "rev": "ad57eef4ef0659193044870c731987a6df5cf56b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -75,27 +75,27 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1720386169, "lastModified": 1718811006,
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", "narHash": "sha256-0Y8IrGhRmBmT7HHXlxxepg2t8j1X90++qRN3lukGaIk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "194846768975b7ad2c4988bdb82572c00222c0d7", "rev": "03d771e513ce90147b65fe922d87d3a0356fc125",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.05", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1721116560, "lastModified": 1719379843,
"narHash": "sha256-++TYlGMAJM1Q+0nMVaWBSEvEUjRs7ZGiNQOpqbQApCU=", "narHash": "sha256-u+D+IOAMMl70+CJ9NKB+RMrASjInuIWMHzjLWQjPZ6c=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9355fa86e6f27422963132c2c9aeedb0fb963d93", "rev": "b3f3c1b13fb08f3828442ee86630362e81136bbc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -129,11 +129,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1721042469, "lastModified": 1719259945,
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -153,11 +153,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1719760370, "lastModified": 1717169693,
"narHash": "sha256-fsxAuW6RxKZYjAP3biUC6C4vaYFhDfWv8lp1Tmx3ZCY=", "narHash": "sha256-qBruki5NHrSqIw5ulxtwFmVsb6W/aOKOMjsCJjfalA4=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "ea7fdada6a0940b239ddbde2048a4d7dac1efe1e", "rev": "d6d735e6f20ef78b16a79886fe28bd69cf059504",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -39,7 +39,6 @@ pub async fn main() {
match message { match message {
ServerMessage::Privmsg(m) => { ServerMessage::Privmsg(m) => {
let is_moderator = m.badges.iter().any(|badge| badge.name == "moderator"); 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 channel = m.channel_login.clone();
let sender = m.sender.name.clone(); let sender = m.sender.name.clone();
let contents = m.message_text.clone(); let contents = m.message_text.clone();
@ -54,7 +53,7 @@ pub async fn main() {
match command { match command {
"ping" => { "ping" => {
if is_moderator || is_broadcaster { if is_moderator {
ping_command(&m, &client).await.unwrap_or_default(); ping_command(&m, &client).await.unwrap_or_default();
} else { } else {
sleep(Duration::from_secs(1)); sleep(Duration::from_secs(1));
@ -62,7 +61,7 @@ pub async fn main() {
} }
} }
"song" => { "song" => {
if is_moderator || is_broadcaster { if is_moderator {
lastfm_command(&m, &client).await.unwrap_or_default(); lastfm_command(&m, &client).await.unwrap_or_default();
} else { } else {
sleep(Duration::from_secs(1)); sleep(Duration::from_secs(1));
@ -70,7 +69,7 @@ pub async fn main() {
} }
} }
"user" => { "user" => {
if is_moderator || is_broadcaster { if is_moderator {
get_user_command(&m, &client, &arguments) get_user_command(&m, &client, &arguments)
.await .await
.unwrap_or_default(); .unwrap_or_default();
@ -82,7 +81,7 @@ pub async fn main() {
} }
} }
"logs" => { "logs" => {
if is_moderator || is_broadcaster { if is_moderator {
logs_command(&m, &client, &arguments) logs_command(&m, &client, &arguments)
.await .await
.unwrap_or_default(); .unwrap_or_default();
@ -94,7 +93,7 @@ pub async fn main() {
} }
} }
"massping" => { "massping" => {
if is_moderator || is_broadcaster { if is_moderator {
massping_command(&m, &client).await.unwrap_or_default(); massping_command(&m, &client).await.unwrap_or_default();
} else { } else {
sleep(Duration::from_secs(1)); sleep(Duration::from_secs(1));