equal
deleted
inserted
replaced
|
1 local unlimited_jids = module:get_option_inherited_set("unlimited_jids", {}); |
|
2 |
|
3 if unlimited_jids:empty() then |
|
4 return; |
|
5 end |
|
6 |
|
7 module:hook("authentication-success", function (event) |
|
8 local session = event.session; |
|
9 local jid = session.username .. "@" .. session.host; |
|
10 if unlimited_jids:contains(jid) then |
|
11 if session.conn and session.conn.setlimit then |
|
12 session.conn:setlimit(0); |
|
13 elseif session.throttle then |
|
14 session.throttle = nil; |
|
15 end |
|
16 end |
|
17 end); |