Ver a proveniência

Remove redundant 'seconds'; use int division.

tags/v0.1^2
Ben Kurtovic há 12 anos
ascendente
cometimento
c1da237599
2 ficheiros alterados com 2 adições e 2 eliminações
  1. +1
    -1
      earwigbot/commands/lag.py
  2. +1
    -1
      earwigbot/commands/registration.py

+ 1
- 1
earwigbot/commands/lag.py Ver ficheiro

@@ -33,7 +33,7 @@ class Lag(Command):
if not site:
return

msg = "\x0302{0}\x0F: Toolserver replag is {1} seconds; database maxlag is {2} seconds."
msg = "\x0302{0}\x0F: Toolserver replag is {1}; database maxlag is {2}."
replag, maxlag = site.get_replag(), site.get_maxlag()
msg = msg.format(site.name, self.format(replag), self.format(maxlag))
self.reply(data, msg)


+ 1
- 1
earwigbot/commands/registration.py Ver ficheiro

@@ -64,7 +64,7 @@ class Registration(Command):
("minute", 60), ("second", 1)]
msg = []
for name, size in parts:
num = (t2 - t1) / size
num = int(t2 - t1) / size
t1 += num * size
if num:
chunk = "{0} {1}".format(num, name if num == 1 else name + "s")


Carregando…
Cancelar
Guardar