Browse Source

Misc tweaks and fixes

dave/xdcc
dave 5 years ago
parent
commit
7379d03153
  1. 4
      bin/pubsubbot
  2. 1
      pyircbot/modules/ModInfo.py
  3. 2
      pyircbot/modules/SMS.py
  4. 2
      pyircbot/modules/Tell.py

4
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:

1
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):
"""

2
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-<name> text somebody on the VIP list", cmds=["text"])
@regex(r'(?:^\.text\-([a-zA-Z0-9]+)(?:\s+(.+))?)', types=['PRIVMSG'])
def cmd_text(self, msg, match):
"""

2
pyircbot/modules/Tell.py

@ -61,7 +61,7 @@ class Tell(ModuleBase):
# Delete
self.db.query("DELETE FROM `tells` WHERE `id`=?", (tell["id"],))
@info(".tell <person> <message> relay a message when the target is online", cmds=["tell"])
@info("tell <person> <message> 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:

Loading…
Cancel
Save