summaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'bridge')
-rw-r--r--bridge/bridge.go5
-rw-r--r--bridge/config/config.go2
-rw-r--r--bridge/irc/helper.go2
-rw-r--r--bridge/irc/irc.go4
-rw-r--r--bridge/mattermost/mattermost.go6
-rw-r--r--bridge/rocketchat/rocketchat.go1
-rw-r--r--bridge/slack/slack.go2
-rw-r--r--bridge/steam/steam.go2
8 files changed, 10 insertions, 14 deletions
diff --git a/bridge/bridge.go b/bridge/bridge.go
index 2cf56c0b..8e0fe063 100644
--- a/bridge/bridge.go
+++ b/bridge/bridge.go
@@ -88,10 +88,7 @@ func New(cfg *config.Config, bridge *config.Bridge, c chan config.Message) *Brid
func (b *Bridge) JoinChannels() error {
err := b.joinChannels(b.Channels, b.Joined)
- if err != nil {
- return err
- }
- return nil
+ return err
}
func (b *Bridge) joinChannels(channels map[string]config.ChannelInfo, exists map[string]bool) error {
diff --git a/bridge/config/config.go b/bridge/config/config.go
index 69a13e43..2bac2e7d 100644
--- a/bridge/config/config.go
+++ b/bridge/config/config.go
@@ -209,7 +209,7 @@ func Deprecated(cfg Protocol, account string) bool {
log.Printf("ERROR: %s BindAddress is deprecated, you need to change it to WebhookBindAddress.", account)
} else if cfg.URL != "" {
log.Printf("ERROR: %s URL is deprecated, you need to change it to WebhookURL.", account)
- } else if cfg.UseAPI == true {
+ } else if cfg.UseAPI {
log.Printf("ERROR: %s UseAPI is deprecated, it's enabled by default, please remove it from your config file.", account)
} else {
return false
diff --git a/bridge/irc/helper.go b/bridge/irc/helper.go
index 355dc552..dd1cc468 100644
--- a/bridge/irc/helper.go
+++ b/bridge/irc/helper.go
@@ -4,6 +4,7 @@ import (
"strings"
)
+/*
func tableformatter(nicks []string, nicksPerRow int, continued bool) string {
result := "|IRC users"
if continued {
@@ -29,6 +30,7 @@ func tableformatter(nicks []string, nicksPerRow int, continued bool) string {
}
return result
}
+*/
func plainformatter(nicks []string, nicksPerRow int) string {
return strings.Join(nicks, ", ") + " currently on IRC"
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index b86ff508..a5f047d0 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -148,9 +148,9 @@ func (b *Birc) Send(msg config.Message) error {
func (b *Birc) doSend() {
rate := time.Millisecond * time.Duration(b.Config.MessageDelay)
- throttle := time.Tick(rate)
+ throttle := time.NewTicker(rate)
for msg := range b.Local {
- <-throttle
+ <-throttle.C
b.i.Privmsg(msg.Channel, msg.Username+msg.Text)
}
}
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go
index 222522ee..d4258345 100644
--- a/bridge/mattermost/mattermost.go
+++ b/bridge/mattermost/mattermost.go
@@ -12,9 +12,8 @@ type MMhook struct {
}
type MMapi struct {
- mc *matterclient.MMClient
- mmMap map[string]string
- mmIgnoreNicks []string
+ mc *matterclient.MMClient
+ mmMap map[string]string
}
type MMMessage struct {
@@ -29,7 +28,6 @@ type Bmattermost struct {
MMapi
Config *config.Protocol
Remote chan config.Message
- name string
TeamId string
Account string
}
diff --git a/bridge/rocketchat/rocketchat.go b/bridge/rocketchat/rocketchat.go
index 8eb788f9..1b731f94 100644
--- a/bridge/rocketchat/rocketchat.go
+++ b/bridge/rocketchat/rocketchat.go
@@ -16,7 +16,6 @@ type Brocketchat struct {
MMhook
Config *config.Protocol
Remote chan config.Message
- name string
Account string
}
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go
index c1e324a9..6555d40b 100644
--- a/bridge/slack/slack.go
+++ b/bridge/slack/slack.go
@@ -120,7 +120,7 @@ func (b *Bslack) Send(msg config.Message) error {
return err
}
np := slack.NewPostMessageParameters()
- if b.Config.PrefixMessagesWithNick == true {
+ if b.Config.PrefixMessagesWithNick {
np.AsUser = true
}
np.Username = nick
diff --git a/bridge/steam/steam.go b/bridge/steam/steam.go
index 5f40972f..ad4b1988 100644
--- a/bridge/steam/steam.go
+++ b/bridge/steam/steam.go
@@ -136,7 +136,7 @@ func (b *Bsteam) handleEvents() {
myLoginInfo.AuthCode = code
}
default:
- log.Errorf("LogOnFailedEvent: ", e.Result)
+ log.Errorf("LogOnFailedEvent: %#v ", e.Result)
// TODO: Handle EResult_InvalidLoginAuthCode
return
}