From 7379d031538bf8b191f77192b081e86ebc412138 Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 27 Nov 2017 23:20:51 -0800 Subject: [PATCH] Misc tweaks and fixes --- bin/pubsubbot | 4 ++-- pyircbot/modules/ModInfo.py | 1 + pyircbot/modules/SMS.py | 2 ++ pyircbot/modules/Tell.py | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/pubsubbot b/bin/pubsubbot index bda8d2b..1201798 100755 --- a/bin/pubsubbot +++ b/bin/pubsubbot @@ -98,7 +98,7 @@ class PyIRCBotSub(PrimitiveBot): if __name__ == "__main__": - logging.basicConfig(level=logging.INFO, + logging.basicConfig(level=logging.WARNING, format="%(asctime)-15s %(levelname)-8s %(filename)s:%(lineno)d %(message)s") log = logging.getLogger('main') @@ -108,7 +108,7 @@ if __name__ == "__main__": parser.add_argument("-s", "--server", default="localhost", help="Msgbus server address") parser.add_argument("-p", "--port", default=7100, type=int, help="Msgbus server port") parser.add_argument("-n", "--name", default="default", help="bot name") - parser.add_argument("--debug", action="store_true", help="") + parser.add_argument("--debug", action="store_true", help="increase logging level") args = parser.parse_args() if args.debug: diff --git a/pyircbot/modules/ModInfo.py b/pyircbot/modules/ModInfo.py index f5dcfff..482b88c 100644 --- a/pyircbot/modules/ModInfo.py +++ b/pyircbot/modules/ModInfo.py @@ -63,6 +63,7 @@ class ModInfo(ModuleBase): for modname, module, helptext, helpcommands in self.iter_modules(): self.bot.act_PRIVMSG(msg.args[0], "{}: {}{}".format(modname, command.prefix, helptext)) + @info("helpindex show a short list of all commands", cmds=["helpindex"]) @command("helpindex") def cmd_helpindex(self, msg, cmd): """ diff --git a/pyircbot/modules/SMS.py b/pyircbot/modules/SMS.py index ca8ac99..d833ae9 100644 --- a/pyircbot/modules/SMS.py +++ b/pyircbot/modules/SMS.py @@ -8,6 +8,7 @@ from time import time from math import floor from pyircbot.modulebase import ModuleBase, regex +from pyircbot.modules.ModInfo import info import cherrypy from threading import Thread from twilio.rest import Client @@ -133,6 +134,7 @@ class SMS(ModuleBase): """ cherrypy.engine.exit() + @info("text- text somebody on the VIP list", cmds=["text"]) @regex(r'(?:^\.text\-([a-zA-Z0-9]+)(?:\s+(.+))?)', types=['PRIVMSG']) def cmd_text(self, msg, match): """ diff --git a/pyircbot/modules/Tell.py b/pyircbot/modules/Tell.py index ccd59d4..82074c1 100644 --- a/pyircbot/modules/Tell.py +++ b/pyircbot/modules/Tell.py @@ -61,7 +61,7 @@ class Tell(ModuleBase): # Delete self.db.query("DELETE FROM `tells` WHERE `id`=?", (tell["id"],)) - @info(".tell relay a message when the target is online", cmds=["tell"]) + @info("tell relay a message when the target is online", cmds=["tell"]) @command("tell", allow_private=True) def tellcmds(self, msg, cmd): if len(cmd.args) < 2: