From ffd5a354dd521c31a4c66cd1b64b751ecf0d2f62 Mon Sep 17 00:00:00 2001 From: Loris TICHADOU <loris.tichadou@ensiie.fr> Date: Mon, 14 Jan 2019 18:13:42 +0100 Subject: [PATCH] Update kohlanta.py, nardco.py files --- kohlanta.py | 4 +--- nardco.py | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/kohlanta.py b/kohlanta.py index 636c176..1e4ea17 100644 --- a/kohlanta.py +++ b/kohlanta.py @@ -8,6 +8,4 @@ sentences = ["$NAME, les aventuriers de la tribu $CHANN ont decidés de vous eli def kohlanta (name, channel) : - return sentences[randrange(0, len(sentences) - 1)].replace("$NAME", name).replace("$CHANN", channel) - -print(kohlanta("toto", "#titch")) \ No newline at end of file + return sentences[randrange(0, len(sentences) - 1)].replace("$NAME", name).replace("$CHANN", channel) \ No newline at end of file diff --git a/nardco.py b/nardco.py index ccc4caa..9b7a5bb 100755 --- a/nardco.py +++ b/nardco.py @@ -16,6 +16,7 @@ import viieux import codage import nordpresse import commit +import kohlanta # import rateau def couper(pseudo): @@ -273,6 +274,10 @@ class Boooob(ircbot.SingleServerIRCBot): elif cmd == "viieux" : serv.privmsg(canal, viieux.get_viieux()) + elif cmd == "kohlanta" : + if (len(args) > 2 ) : + serv.privmsg(canal, kohlanta.kohlanta(args[1], args[2])) + elif cmd == "new" : if len(args)>1 : if args[1] in personnalizedCmd.keys() : -- GitLab