+ def notice(m)
+ if m.source.user == "TheQBot" && m.source.host = "CServe.quakenet.org"
+ case m.message
+ when /a user with that name already exists/i
+ @bot.say @source, "user with my name already exists, identify if it belongs to you"
+ when /created successfully/
+ @registry['quakenet.user'] = @bot.nick
+ @bot.say @source, "an email on how to proceed should have been sent to #{@email} -- 'qauth identify <password>' next"
+ when /too many accounts exist from this email address/i
+ @bot.say @source, "too many accounts on that email address"
+ when /registration service is unavailable/
+ @bot.say @source, "the registration service is unavailable, try again later"
+ when /password incorrect/
+ @bot.say @source, "username or password incorrect" if @source
+ when /you are now logged in/i
+ @bot.say @source, "authed successfully" if @source
+ when /auth is not available/
+ @bot.say @source, "already authed" if @source
+ end
+ end
+ end
+
+ def register_nick(m, params)
+ # check nick for invalid characters
+ if @bot.nick =~ /[`~\^\[\]{}|_\\]/
+ m.reply "for me to be able to register, my nick cannot have any of the following characters: `~^[]{}|_\\"
+ return
+ end
+
+ @email = params[:email]
+ @source = m.replyto
+
+ msg_q "hello #{@email} #{@email}"
+ end
+
+ def msg_q(message)
+ @bot.say "Q@CServe.quakenet.org", message if on_quakenet?
+ end
+
+ def on_quakenet?
+ @bot.server.hostname.split(".")[-2] == "quakenet"
+ end