diff --git a/irc/channel.go b/irc/channel.go index 26f8909e..d9b73d08 100644 --- a/irc/channel.go +++ b/irc/channel.go @@ -377,8 +377,9 @@ func (channel *Channel) Persist() { channel.server.db.Exec(` INSERT OR REPLACE INTO channel (name, flags, key, topic) - VALUES (?, ?, ?, ?)`, - channel.name, channel.flags.String(), channel.key, channel.topic) + VALUES (?, ?, ?, ?, ?)`, + channel.name, channel.flags.String(), channel.key, channel.topic, + channel.userLimit) } else { channel.server.db.Exec(`DELETE FROM channel WHERE name = ?`, channel.name) } diff --git a/irc/constants.go b/irc/constants.go index 35ff058c..ad1d31fe 100644 --- a/irc/constants.go +++ b/irc/constants.go @@ -23,7 +23,7 @@ var ( ) const ( - SEMVER = "ergonomadic-1.1.0" + SEM_VER = "ergonomadic-1.1.0" CRLF = "\r\n" MAX_REPLY_LEN = 512 - len(CRLF) diff --git a/irc/reply.go b/irc/reply.go index 404a3471..970876fb 100644 --- a/irc/reply.go +++ b/irc/reply.go @@ -151,7 +151,7 @@ func (target *Client) RplWelcome() { func (target *Client) RplYourHost() { target.NumericReply(RPL_YOURHOST, - ":Your host is %s, running version %s", target.server.name, SEMVER) + ":Your host is %s, running version %s", target.server.name, SEM_VER) } func (target *Client) RplCreated() { @@ -161,7 +161,7 @@ func (target *Client) RplCreated() { func (target *Client) RplMyInfo() { target.NumericReply(RPL_MYINFO, - "%s %s aiOorsw abeIikmntpqrsl", target.server.name, SEMVER) + "%s %s aiOorsw abeIikmntpqrsl", target.server.name, SEM_VER) } func (target *Client) RplUModeIs(client *Client) { @@ -371,7 +371,7 @@ func (target *Client) RplWhoisChannels(client *Client) { func (target *Client) RplVersion() { target.NumericReply(RPL_VERSION, - "%s %s", SEMVER, target.server.name) + "%s %s", SEM_VER, target.server.name) } func (target *Client) RplInviting(invitee *Client, channel string) {