summaryrefslogtreecommitdiffstats
path: root/bridge/irc
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-03-06 20:41:34 +0100
committerWim <wim@42.be>2018-03-06 20:41:34 +0100
commita6f37f1d617b4a963337fd164706ebaecf69ea5b (patch)
treedeb34980701a8ab41114ffc05b8909536fc5514b /bridge/irc
parent9de915182689f266a47ebcade0000b9d03cf2c6d (diff)
downloadmatterbridge-msglm-a6f37f1d617b4a963337fd164706ebaecf69ea5b.tar.gz
matterbridge-msglm-a6f37f1d617b4a963337fd164706ebaecf69ea5b.tar.bz2
matterbridge-msglm-a6f37f1d617b4a963337fd164706ebaecf69ea5b.zip
Use default values (irc)
Diffstat (limited to 'bridge/irc')
-rw-r--r--bridge/irc/irc.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index 0e817327..1c9ec90e 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -64,7 +64,7 @@ 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 {
@@ -204,7 +204,7 @@ 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 {
@@ -214,8 +214,8 @@ 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}