summaryrefslogtreecommitdiffstats
path: root/bridge/irc
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/irc')
-rw-r--r--bridge/irc/helper.go2
-rw-r--r--bridge/irc/irc.go10
2 files changed, 5 insertions, 7 deletions
diff --git a/bridge/irc/helper.go b/bridge/irc/helper.go
index dd1cc468..31382aa4 100644
--- a/bridge/irc/helper.go
+++ b/bridge/irc/helper.go
@@ -32,7 +32,7 @@ func tableformatter(nicks []string, nicksPerRow int, continued bool) string {
}
*/
-func plainformatter(nicks []string, nicksPerRow int) string {
+func plainformatter(nicks []string) string {
return strings.Join(nicks, ", ") + " currently on IRC"
}
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index c1cbdf60..25f6beec 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -271,14 +271,12 @@ func (b *Birc) endNames(client *girc.Client, event girc.Event) {
channel := event.Params[1]
sort.Strings(b.names[channel])
maxNamesPerPost := (300 / b.nicksPerRow()) * b.nicksPerRow()
- continued := false
for len(b.names[channel]) > maxNamesPerPost {
- b.Remote <- config.Message{Username: b.Nick, Text: b.formatnicks(b.names[channel][0:maxNamesPerPost], continued),
+ b.Remote <- config.Message{Username: b.Nick, Text: b.formatnicks(b.names[channel][0:maxNamesPerPost]),
Channel: channel, Account: b.Account}
b.names[channel] = b.names[channel][maxNamesPerPost:]
- continued = true
}
- b.Remote <- config.Message{Username: b.Nick, Text: b.formatnicks(b.names[channel], continued),
+ b.Remote <- config.Message{Username: b.Nick, Text: b.formatnicks(b.names[channel]),
Channel: channel, Account: b.Account}
b.names[channel] = nil
b.i.Handlers.Clear(girc.RPL_NAMREPLY)
@@ -464,6 +462,6 @@ func (b *Birc) storeNames(client *girc.Client, event girc.Event) {
strings.Split(strings.TrimSpace(event.Trailing), " ")...)
}
-func (b *Birc) formatnicks(nicks []string, continued bool) string {
- return plainformatter(nicks, b.nicksPerRow())
+func (b *Birc) formatnicks(nicks []string) string {
+ return plainformatter(nicks)
}