From ffb4b743aa77e04d5d7d835c0b601ec002039b7d Mon Sep 17 00:00:00 2001 From: randomuser Date: Mon, 2 Aug 2021 20:57:16 -0500 Subject: [PATCH] add utils.py --- default.py | 5 ++++- utils.py | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 utils.py diff --git a/default.py b/default.py index 6d936b8..8eea45a 100644 --- a/default.py +++ b/default.py @@ -1,6 +1,9 @@ +import utils + def cmd(line, srv): splitted = line.params[1].split(' ') command = splitted[0][1:] if command == "load": srv.load_mod(splitted[1]) - print("loaded") + utils.message(srv, line.params[0], + "loaded: " + splitted[1]) diff --git a/utils.py b/utils.py new file mode 100644 index 0000000..a000c24 --- /dev/null +++ b/utils.py @@ -0,0 +1,4 @@ +from irctokens import build + +def message(srv, channel, msg): + srv.send(build("PRIVMSG", [channel, msg]))