protonbot 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/protonbot/core_plugin/commands/admin.rb +1 -1
- data/lib/protonbot/log.rb +4 -7
- data/lib/protonbot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0814365197098c02754b106236c66abb16240c6
|
4
|
+
data.tar.gz: 3ea53eb5a89ceefc4e9108adc66720e0eccbf5ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17b89999e3cfa3bbe9d4d281d6f1a0432944caa2802b31d4921fbee398ad55e58a5b7b126efd50928a3ceefc001d7bbcc27c0381f860247034fd587225e4eb0b
|
7
|
+
data.tar.gz: e80b0efde5fda4c0c939c7eb1427ee70b9f7804be89d988b9449b25ab362bae2dec5611e521f146491ee4080940d7d182861211403e646a445bb8ea4e39e19b3
|
@@ -7,7 +7,7 @@ cmd(cmd: 'key') do |dat|
|
|
7
7
|
if dat[:split][0] == @key && !@key.nil?
|
8
8
|
dat.reply "#{dat[:nick]}: given key is valid! You are an owner now!"
|
9
9
|
addperm(dat[:plug], dat[:host], 'owner')
|
10
|
-
elsif dat[:split][0] == dat[:plug].conf[
|
10
|
+
elsif dat[:split][0] == dat[:plug].conf['uniq_key'] && dat[:plug].conf['uniq_key']
|
11
11
|
dat.reply "#{dat[:nick]}: given key is valid! You are an owner now!"
|
12
12
|
addperm(dat[:plug], dat[:host], 'owner')
|
13
13
|
else
|
data/lib/protonbot/log.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# @!attribute [rw] logging
|
5
5
|
# @return [Bool] If false, does not write messages.
|
6
6
|
class ProtonBot::Log
|
7
|
-
attr_accessor :levels, :logging
|
7
|
+
attr_accessor :levels, :logging
|
8
8
|
|
9
9
|
def initialize
|
10
10
|
@pastel = Pastel.new
|
@@ -17,7 +17,6 @@ class ProtonBot::Log
|
|
17
17
|
@levels = DEFAULT_SCHEME
|
18
18
|
|
19
19
|
@logging = true
|
20
|
-
@log_info = false
|
21
20
|
|
22
21
|
@stop = false
|
23
22
|
|
@@ -36,11 +35,9 @@ class ProtonBot::Log
|
|
36
35
|
# @param msg [String]
|
37
36
|
# @param nam [String] Name
|
38
37
|
def info(msg, nam = 'log')
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
@pastel.strip(dat)
|
43
|
-
end
|
38
|
+
dat = gsub(msg.to_s, :info, nam)
|
39
|
+
@queue << dat
|
40
|
+
@pastel.strip(dat)
|
44
41
|
end
|
45
42
|
|
46
43
|
# @param msg [String]
|
data/lib/protonbot/version.rb
CHANGED