mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Merge branch 'testing' of github.com:slackhead/Limnoria into testing
This commit is contained in:
commit
c17c21b5ac
@ -239,7 +239,19 @@ class Config(callbacks.Plugin):
|
|||||||
s = group.help()
|
s = group.help()
|
||||||
if s:
|
if s:
|
||||||
if hasattr(group, 'value') and not group._private:
|
if hasattr(group, 'value') and not group._private:
|
||||||
s += _(' (Current value: %s)') % group
|
channel = msg.args[0]
|
||||||
|
if irc.isChannel(channel) and \
|
||||||
|
channel in group._children:
|
||||||
|
globvalue = str(group)
|
||||||
|
chanvalue = str(group.get(channel))
|
||||||
|
if chanvalue != globvalue:
|
||||||
|
s += _(' (Current global value: %s; '
|
||||||
|
'current channel value: %s)') % \
|
||||||
|
(globvalue, chanvalue)
|
||||||
|
else:
|
||||||
|
s += _(' (Current value: %s)') % group
|
||||||
|
else:
|
||||||
|
s += _(' (Current value: %s)') % group
|
||||||
irc.reply(s)
|
irc.reply(s)
|
||||||
else:
|
else:
|
||||||
irc.reply(_('That configuration group exists, but seems to '
|
irc.reply(_('That configuration group exists, but seems to '
|
||||||
|
@ -301,6 +301,10 @@ repositories = {
|
|||||||
'GLolol',
|
'GLolol',
|
||||||
'SupyPlugins',
|
'SupyPlugins',
|
||||||
),
|
),
|
||||||
|
'Iota': GithubRepository(
|
||||||
|
'IotaSpencer',
|
||||||
|
'supyplugins',
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
class PluginDownloader(callbacks.Plugin):
|
class PluginDownloader(callbacks.Plugin):
|
||||||
|
@ -361,15 +361,15 @@ class Favicon(SupyHTTPServerCallback):
|
|||||||
file_path = conf.supybot.servers.http.favicon()
|
file_path = conf.supybot.servers.http.favicon()
|
||||||
found = False
|
found = False
|
||||||
if file_path:
|
if file_path:
|
||||||
|
response = None
|
||||||
try:
|
try:
|
||||||
icon = open(file_path, 'r')
|
icon = open(file_path, 'rb')
|
||||||
found = True
|
response = icon.read()
|
||||||
except IOError:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
finally:
|
finally:
|
||||||
icon.close()
|
icon.close()
|
||||||
if found:
|
if response is not None:
|
||||||
response = icon.read()
|
|
||||||
filename = file_path.rsplit(os.sep, 1)[1]
|
filename = file_path.rsplit(os.sep, 1)[1]
|
||||||
if '.' in filename:
|
if '.' in filename:
|
||||||
ext = filename.rsplit('.', 1)[1]
|
ext = filename.rsplit('.', 1)[1]
|
||||||
|
@ -209,7 +209,10 @@ class ValidLogLevel(registry.String):
|
|||||||
def set(self, s):
|
def set(self, s):
|
||||||
s = s.upper()
|
s = s.upper()
|
||||||
try:
|
try:
|
||||||
level = logging._levelNames[s]
|
try:
|
||||||
|
level = logging._levelNames[s]
|
||||||
|
except AttributeError:
|
||||||
|
level = logging._nameToLevel[s]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
try:
|
try:
|
||||||
level = int(s)
|
level = int(s)
|
||||||
|
Loading…
Reference in New Issue
Block a user