commit c300bdadc392ce2edfe0d58f3baaf3e7e854b964
Author: Wim <wim@42.be>
Date: Tue Mar 06 20:41:34 2018 +0000
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index 0e81732..1c9ec90 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -647 +647 @@ func (b *Birc) Command(msg *config.Message) string {
}
func (b *Birc) Connect() error {
- b.Local = make(chan config.Message, b.GetInt("MessageQueue")+10)
+ b.Local = make(chan config.Message, b.MessageQueue+10)
b.Log.Infof("Connecting %s", b.GetString("Server"))
server, portstr, err := net.SplitHostPort(b.GetString("Server"))
if err != nil {
@@ -2047 +2047 @@ func (b *Birc) Send(msg config.Message) (string, error) {
// split long messages on messageLength, to avoid clipped messages #281
if b.GetBool("MessageSplit") {
- msg.Text = helper.SplitStringLength(msg.Text, b.GetInt("MessageLength"))
+ msg.Text = helper.SplitStringLength(msg.Text, b.MessageLength)
}
for _, text := range strings.Split(msg.Text, "\n") {
if len(text) > b.MessageLength {
@@ -2148 +2148 @@ func (b *Birc) Send(msg config.Message) (string, error) {
}
text += " <message clipped>"
}
- if len(b.Local) < b.GetInt("MessageQueue") {
- if len(b.Local) == b.GetInt("MessageQueue")-1 {
+ if len(b.Local) < b.MessageQueue {
+ if len(b.Local) == b.MessageQueue-1 {
text = text + " <message clipped>"
}
b.Local <- config.Message{Text: text, Username: msg.Username, Channel: msg.Channel, Event: msg.Event}