diff --git a/README.md b/README.md index 151416f..b971a19 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,6 @@ The config file is a yaml formatted file with the following fields: | `debug` | Yes | false | Yes | debug mode | | `insecure`, | Yes | false | Yes | TLS will skip verification (but still uses TLS) | | `no_tls`, | Yes | false | Yes | turns off TLS | -| `webhook_prefix`, | Yes | | No | a prefix for webhooks, so we know which ones to keep and which ones to delete | | `nickserv_identify` | No | | Yes | on connect this message will be sent: `PRIVMSG nickserv IDENTIFY `, you can provide both a username and password if your ircd supports it | | `cooldown_duration` | No | 86400 (24 hours) | Yes | time in seconds for a discord user to be offline before it's puppet disconnects from irc | | `show_joinquit` | No | false | yes | displays JOIN, PART, QUIT, KICK on discord | diff --git a/bridge/bridge.go b/bridge/bridge.go index 17373f4..de65e2e 100644 --- a/bridge/bridge.go +++ b/bridge/bridge.go @@ -56,9 +56,6 @@ type Config struct { // an IRC connection for each of the online Discord users. SimpleMode bool - // WebhookPrefix is prefixed to each webhook created by the Discord bot. - WebhookPrefix string - Suffix string // Suffix is the suffix to append to IRC puppets Separator string // Separator is used in IRC puppets' username, in fallback situations, between the discriminator and username. @@ -108,10 +105,6 @@ func (b *Bridge) load(opts *Config) error { return errors.New("missing server name") } - if opts.WebhookPrefix == "" { - return errors.New("missing webhook prefix") - } - if err := b.SetChannelMappings(opts.ChannelMappings); err != nil { return errors.Wrap(err, "channel mappings could not be set") } diff --git a/bridge/discord.go b/bridge/discord.go index 2a4dd74..a8f900d 100644 --- a/bridge/discord.go +++ b/bridge/discord.go @@ -60,7 +60,7 @@ func newDiscord(bridge *Bridge, botToken, guildID string) (*discordBot, error) { } func (d *discordBot) Open() error { - d.transmitter = transmitter.New(d.Session, d.guildID, d.bridge.Config.WebhookPrefix, true) + d.transmitter = transmitter.New(d.Session, d.guildID, "go-discord-irc", true) d.transmitter.Log = logrus.NewEntry(logrus.StandardLogger()) if err := d.transmitter.RefreshGuildWebhooks(nil); err != nil { return fmt.Errorf("failed to refresh guild webhooks: %w", err) diff --git a/config.yml b/config.yml index 7b4a751..c7de9fa 100644 --- a/config.yml +++ b/config.yml @@ -31,7 +31,6 @@ max_nick_length: 30 # Maximum Length of a nick allowed insecure: true no_tls: false debug: false -webhook_prefix: "(auto-test)" # simple: true # irc_listener_prejoin_commands: diff --git a/main.go b/main.go index 1d0d11d..58bda4e 100644 --- a/main.go +++ b/main.go @@ -110,8 +110,6 @@ func main() { viper.SetDefault("separator", "~") separator := viper.GetString("separator") // - webhookPrefix := viper.GetString("webhook_prefix") // the unique prefix for this bottiful bot - // viper.SetDefault("cooldown_duration", int64((time.Hour * 24).Seconds())) cooldownDuration := viper.GetInt64("cooldown_duration") // @@ -164,7 +162,6 @@ func main() { Separator: separator, SimpleMode: *simple, ChannelMappings: channelMappings, - WebhookPrefix: webhookPrefix, CooldownDuration: time.Second * time.Duration(cooldownDuration), ShowJoinQuit: showJoinQuit, MaxNickLength: maxNickLength,