Comparison

plugins/mod_c2s.lua @ 7328:de76ded98b84

mod_c2s: Just destroy the session when it has no connection (see #641)
author Kim Alvefur <zash@zash.se>
date Sun, 03 Apr 2016 15:18:21 +0200
parent 7221:56e65b1e54e8
child 7329:ab811c1bb730
child 8232:176b7f4e4ac9
comparison
equal deleted inserted replaced
7230:20246b139607 7328:de76ded98b84
173 end); 173 end);
174 else 174 else
175 sm_destroy_session(session, reason); 175 sm_destroy_session(session, reason);
176 conn:close(); 176 conn:close();
177 end 177 end
178 else
179 local reason = (reason and (reason.name or reason.text or reason.condition)) or reason;
180 sm_destroy_session(session, reason);
178 end 181 end
179 end 182 end
180 183
181 module:hook_global("user-deleted", function(event) 184 module:hook_global("user-deleted", function(event)
182 local username, host = event.username, event.host; 185 local username, host = event.username, event.host;