From b4c0567fbe0d7e7aff1052897f6f48138ba7e9ec Mon Sep 17 00:00:00 2001 From: Rogier Neeleman Date: Thu, 25 Sep 2014 14:29:05 +0200 Subject: [PATCH] Oper commands added --- botconfig.py.example | 2 ++ modules/common.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/botconfig.py.example b/botconfig.py.example index 79c1794..7f857df 100644 --- a/botconfig.py.example +++ b/botconfig.py.example @@ -3,6 +3,8 @@ CHANNEL = "#mywolfgame" HOST = "irc.freenode.net" PORT = 6667 USERNAME = "" # for authentication, can be left blank if same as NICK +OPERUSER = "OPPER user" +OPERPASS = "OPER password" NICK = "mywolfbot" CMD_CHAR = "!" CHANGING_HOST_QUIT_MESSAGE = "Changing host" diff --git a/modules/common.py b/modules/common.py index fdc825f..ed211f4 100644 --- a/modules/common.py +++ b/modules/common.py @@ -97,6 +97,8 @@ hook = decorators.generate(HOOKS, raw_nick=True, permissions=False) def connect_callback(cli): def prepare_stuff(*args): + cli.send("OPER", botconfig.OPERUSER, botconfig.OPERPASS) + cli.join(botconfig.CHANNEL) cli.msg("ChanServ", "op "+botconfig.CHANNEL)