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

Binding specific ip to irc connection #141

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

Conversation

kofany
Copy link

@kofany kofany commented Nov 4, 2022

No description provided.

"crypto/tls"
"log"
"os"

irc "github.com/kofany/go-ircevent"
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefix is not required.

"crypto/tls"
"fmt"

irc "github.com/kofany/go-ircevent"
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefix is not required.

@@ -1,6 +1,6 @@
module github.com/thoj/go-ircevent
module github.com/kofany/go-ircevent
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not change the module name

Copy link
Author

Choose a reason for hiding this comment

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

I change as I use fork in my project

irc.go Outdated

return nil
}

// Create a connection with the (publicly visible) nickname and username.
// The nickname is later used to address the user. Returns nil if nick
// or user are empty.
func IRC(nick, user string) *Connection {
func IRC(nick, user string, myhost string) *Connection {
Copy link
Contributor

Choose a reason for hiding this comment

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

This breaks backwards compatibility.

Copy link
Author

Choose a reason for hiding this comment

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

Sorry I add this functionality for my own project and im not pro in go, I try to find a better solution for this future.
Maybe you can suggest the way?

irc_callback.go Outdated
Comment on lines 238 to 245
if irc.nickcurrent == "" {
irc.nickcurrent = irc.nick
}
if len(irc.nickcurrent) > 8 {
irc.nickcurrent = "_" + irc.nickcurrent
} else {
irc.nickcurrent = irc.nickcurrent + "_"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I would create a function for this, the exact same code is used four times.

Copy link
Author

Choose a reason for hiding this comment

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

I will try to do that in my next code update for this fork.

irc_callback.go Outdated
irc.Lock()
defer irc.Unlock()
if !irc.fully_connected {
// Zachowaj obecny nick i nie podejmuj kolejnej próby zmiany
Copy link
Contributor

Choose a reason for hiding this comment

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

english

Copy link
Author

Choose a reason for hiding this comment

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

Will be fixed also, like I said before go is new for me (working with git pull/push also :P)

irc_struct.go Outdated Show resolved Hide resolved
irc_struct.go Outdated Show resolved Hide resolved
kofany and others added 4 commits October 17, 2024 19:39
fully_connected to fullyConnected name change

Co-authored-by: Iceflower <[email protected]>
myhost to host name change

Co-authored-by: Iceflower <[email protected]>
@kofany
Copy link
Author

kofany commented Oct 18, 2024

Nów it should be backward compatible as of tag/release v0.1.4 of my fork

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.

2 participants