Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Soulseek bridge #2167

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Add Soulseek bridge #2167

wants to merge 8 commits into from

Conversation

7x11x13
Copy link

@7x11x13 7x11x13 commented Jul 12, 2024

Adds a bridge to/from Soulseek chatrooms. First time using Go so code review appreciated. I haven't figured out exactly how Soulseek rate limiting works so some messages might not get sent/the bridge account may get banned...

Features:

  • Text messages to/from Soulseek chatroom
  • Receive join/part messages from Soulseek chatroom
  • Receive/send user actions from Soulseek chatroom
  • Document bridge in README

b.local <- bridgeMessage
}

func (b *Bsoulseek) handleLeaveMessage(msg userLeftRoomMessage) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

b.local <- bridgeMessage
}

func (b *Bsoulseek) handleJoinMessage(msg userJoinedRoomMessage) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

}
}

func (b *Bsoulseek) loginLoop() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method Bsoulseek.loginLoop has 65 lines of code (exceeds 50 allowed). Consider refactoring.

}
}

func (b *Bsoulseek) loginLoop() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method Bsoulseek.loginLoop has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring.

}
}

func (b *Bsoulseek) loginLoop() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method Bsoulseek.loginLoop has 66 lines of code (exceeds 50 allowed). Consider refactoring.

}
}

func (b *Bsoulseek) loginLoop() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method Bsoulseek.loginLoop has 68 lines of code (exceeds 50 allowed). Consider refactoring.

}
}

func (b *Bsoulseek) loginLoop() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method Bsoulseek.loginLoop has 69 lines of code (exceeds 50 allowed). Consider refactoring.

Copy link

codeclimate bot commented Jul 26, 2024

Code Climate has analyzed commit 17849a5 and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2
Duplication 2

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant