Actually have a random nick ONLY when our nick is RANDOM

This commit is contained in:
Florent Le Coz 2013-05-01 18:52:29 +02:00
parent 5ff6e2a8c6
commit 48aa8d0bda

View file

@ -27,8 +27,9 @@ class Plugin(BasePlugin):
def change_nick_to_random(self, presence):
to = presence["to"]
to.resource = gen_nick(3)
presence["to"] = to
if to.resource == 'RANDOM':
to.resource = gen_nick(3)
presence["to"] = to
s = ["i", "ou", "ou", "on", "a", "o", "u", "i"]
c = ["b", "c", "d", "f", "g", "h", "j", "k", "m", "l", "n", "p", "r", "s", "t", "v", "z"]