Add little delay before ban. Looks like jabber.ru a bit on a slowpoke side.
This commit is contained in:
4
buny.go
4
buny.go
@@ -356,6 +356,10 @@ func squash(room, jid string, reasonEnable bool, vType string) (string, error) {
|
|||||||
|
|
||||||
ban += "</item>"
|
ban += "</item>"
|
||||||
|
|
||||||
|
// Выжидаем 0.3 секунды перед баном. А то можно настолько рано забанить, что сервер не внсёт злодея в банлист
|
||||||
|
// комнаты и пришлёт affiliation: none вместо affiliation: outcast. Надеюсь, этого будет хватать.
|
||||||
|
time.Sleep(333 * time.Millisecond)
|
||||||
|
|
||||||
if id, err = talk.RawInformationQuery(
|
if id, err = talk.RawInformationQuery(
|
||||||
talk.JID(),
|
talk.JID(),
|
||||||
room,
|
room,
|
||||||
|
|||||||
Reference in New Issue
Block a user