diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-04-21 14:48:09 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-04-21 14:48:09 -0700 |
commit | 7f94ea0c30bee85c0eecbd4ccb4c8e7efb3889bb (patch) | |
tree | c3520d0727314bff2dbfac006743672f825f605d /module/admin.rb | |
parent | 211018e2f94c60fdf7a47b87cbcb07432f0fa25d (diff) | |
download | dinobot-7f94ea0c30bee85c0eecbd4ccb4c8e7efb3889bb.tar.gz dinobot-7f94ea0c30bee85c0eecbd4ccb4c8e7efb3889bb.tar.xz |
Add simple getter/setter methods to Store.
Diffstat (limited to 'module/admin.rb')
-rw-r--r-- | module/admin.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/admin.rb b/module/admin.rb index f26a652..957be7d 100644 --- a/module/admin.rb +++ b/module/admin.rb @@ -12,21 +12,21 @@ module Dinobot @commands << :join << :part << :quit << :load << :unload @commands << :listadmins << :listmodules << :listchannels - @admins = @store.data[:admins] + @admins = @store[:admins] @admins ||= Array.new end def add(user) @admins << user unless @admins.include?(user) - @store.data[:admins] = @admins + @store[:admins] = @admins @store.save end def remove(user) @admins.delete(user) - @store.data[:admins] = @admins + @store[:admins] = @admins @store.save end |