diff --git a/kohlanta.py b/kohlanta.py index 636c176d13965659ca95b67bb3cc7e6d8643a2bb..1e4ea17efec2e7d71984069d9ab9d6117acb9ede 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 ccc4caa7492b1332557e5cefbdf7db53a012e352..9b7a5bba342155d1de85a4fe1c93dfa6838ff219 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() :