# Automatically auths with Q on QuakeNet servers
class QPlugin < Plugin
-
+
def help(plugin, topic="")
case topic
when ""
return "qauth register <email>: register with Q, an email on how to proceed will be sent to the email address you provide"
end
end
-
+
def initialize
super
# this plugin only wants to store strings!
val
end
end
+ @source = nil
end
def set(m, params)
@registry['quakenet.auth'] = params[:password]
m.okay
end
-
+
def connect
- identify(nil, nil)
+ identify(nil, {}) if on_quakenet?
end
def identify(m, params)
- @source = m.replyto
+ @source = m.replyto if m
@registry['quakenet.auth'] = params[:password] if params[:password]
if @registry.has_key?('quakenet.user') && @registry.has_key?('quakenet.auth')