add utils.py

This commit is contained in:
randomuser 2021-08-02 20:57:16 -05:00
parent db61080a49
commit ffb4b743aa
2 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,9 @@
import utils
def cmd(line, srv): def cmd(line, srv):
splitted = line.params[1].split(' ') splitted = line.params[1].split(' ')
command = splitted[0][1:] command = splitted[0][1:]
if command == "load": if command == "load":
srv.load_mod(splitted[1]) srv.load_mod(splitted[1])
print("loaded") utils.message(srv, line.params[0],
"loaded: " + splitted[1])

4
utils.py Normal file
View File

@ -0,0 +1,4 @@
from irctokens import build
def message(srv, channel, msg):
srv.send(build("PRIVMSG", [channel, msg]))