diff options
author | Fredrik de Vibe <fdv@ifi.uio.no> | 2016-03-18 18:13:17 -0400 |
---|---|---|
committer | Fredrik de Vibe <fdv@ifi.uio.no> | 2016-03-18 18:13:17 -0400 |
commit | 3fcce2d8a05d45da9b13c85702ec6b9069585214 (patch) | |
tree | 30a1cab9fd4ca8fbe1035f31f4d6e336b22c086e | |
parent | a53e6991128f790576a4b5cda519691df1a7c6cc (diff) | |
download | matterbridge-msglm-3fcce2d8a05d45da9b13c85702ec6b9069585214.tar.gz matterbridge-msglm-3fcce2d8a05d45da9b13c85702ec6b9069585214.tar.bz2 matterbridge-msglm-3fcce2d8a05d45da9b13c85702ec6b9069585214.zip |
Limit number of columns to number of IRC nicks.
Don't add more columns to the IRC nicks table than the total number of
nicks in the IRC channel.
-rw-r--r-- | matterbridge.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/matterbridge.go b/matterbridge.go index 8a0dc766..4ca90dcf 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -83,7 +83,7 @@ func tableformatter (nicks_s string, nicksPerRow int) string { nicksPerRow = 4 } for i := 0; i < 2; i++ { - for j := 1; j <= nicksPerRow; j++ { + for j := 1; j <= nicksPerRow && j <= len(nicks); j++ { if i == 0 { result += "|" } else { |