|
@@ -34,8 +34,14 @@ class MsgHandler(SocketServer.BaseRequestHandler):
|
|
|
return
|
|
|
|
|
|
target = bot.config.core.owner
|
|
|
- if bot.config.has_section('ffpb') and not (bot.config.ffpb.msg_target is None):
|
|
|
- target = bot.config.ffpb.msg_target
|
|
|
+ if bot.config.has_section('ffpb'):
|
|
|
+ is_public = data.lstrip().lower().startswith("public:")
|
|
|
+
|
|
|
+ if is_public and not (bot.config.ffpb.msg_target_public is None):
|
|
|
+ data = data[7:].lstrip()
|
|
|
+ target = bot.config.ffpb.msg_target_public
|
|
|
+ elif not (bot.config.ffpb.msg_target is None):
|
|
|
+ target = bot.config.ffpb.msg_target
|
|
|
|
|
|
bot.msg(target, "[{0}] {1}".format(sender, str(data)))
|
|
|
|