aboutsummaryrefslogtreecommitdiffstats
path: root/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils.go')
-rw-r--r--utils.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils.go b/utils.go
index 6bf0015..d990504 100644
--- a/utils.go
+++ b/utils.go
@@ -7,6 +7,13 @@ import (
"github.com/lrstanley/girc"
)
+func Min(x, y int) int {
+ if x < y {
+ return x
+ }
+ return y
+}
+
func IrcJoin(irc *girc.Client, channel []string) {
if len(channel) > 1 && channel[1] != "" {
irc.Cmd.JoinKey(channel[0], channel[1])