Comparison

plugins/mod_register.lua @ 1858:49eef8e19a71

mod_register: Changed error type for hitting registration rate limit from 'cancel' to 'wait'.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 02 Oct 2009 16:52:50 +0500
parent 1857:ef266aa8e18f
child 1859:c965b0accc7c
comparison
equal deleted inserted replaced
1857:ef266aa8e18f 1858:49eef8e19a71
129 local ip = recent_ips[session.ip]; 129 local ip = recent_ips[session.ip];
130 ip.count = ip.count + 1; 130 ip.count = ip.count + 1;
131 131
132 if os_time() - ip.time < min_seconds_between_registrations then 132 if os_time() - ip.time < min_seconds_between_registrations then
133 ip.time = os_time(); 133 ip.time = os_time();
134 session.send(st.error_reply(stanza, "cancel", "not-acceptable")); 134 session.send(st.error_reply(stanza, "wait", "not-acceptable"));
135 return; 135 return;
136 end 136 end
137 ip.time = os_time(); 137 ip.time = os_time();
138 end 138 end
139 end 139 end