Implement features in the adapter
This commit is contained in:
parent
c81a798a9f
commit
a2acaf372d
1 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,7 @@ module Lita
|
||||||
#
|
#
|
||||||
class Tox < Adapter
|
class Tox < Adapter
|
||||||
config :savedata_filename, type: String
|
config :savedata_filename, type: String
|
||||||
|
config :status, type: String
|
||||||
|
|
||||||
def initialize(robot)
|
def initialize(robot)
|
||||||
super
|
super
|
||||||
|
@ -29,6 +30,9 @@ module Lita
|
||||||
|
|
||||||
log.info("ID: #{@tox.id}")
|
log.info("ID: #{@tox.id}")
|
||||||
|
|
||||||
|
@tox.name = robot.name if robot.name
|
||||||
|
@tox.status_message = config.status if config.status
|
||||||
|
|
||||||
@tox.on_friend_request do |key|
|
@tox.on_friend_request do |key|
|
||||||
@tox.friend_add_norequest(key)
|
@tox.friend_add_norequest(key)
|
||||||
end
|
end
|
||||||
|
|
Reference in a new issue