Software /
code /
prosody
Comparison
plugins/mod_mam/mod_mam.lua @ 10111:0f335815244f
plugins: Remove tostring call from logging
Taken care of by loggingmanager now
Mass-rewrite using lua pattern like `tostring%b()`
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 30 Jul 2019 02:29:36 +0200 |
parent | 10079:a36c731ed540 |
child | 10299:fd94721186b8 |
comparison
equal
deleted
inserted
replaced
10110:3fa3872588a8 | 10111:0f335815244f |
---|---|
222 module:log("debug", "%s@%s does not exist", user, host) | 222 module:log("debug", "%s@%s does not exist", user, host) |
223 return false; | 223 return false; |
224 end | 224 end |
225 local prefs = get_prefs(user); | 225 local prefs = get_prefs(user); |
226 local rule = prefs[who]; | 226 local rule = prefs[who]; |
227 module:log("debug", "%s's rule for %s is %s", user, who, tostring(rule)); | 227 module:log("debug", "%s's rule for %s is %s", user, who, rule); |
228 if rule ~= nil then | 228 if rule ~= nil then |
229 return rule; | 229 return rule; |
230 end | 230 end |
231 -- Below could be done by a metatable | 231 -- Below could be done by a metatable |
232 local default = prefs[false]; | 232 local default = prefs[false]; |
233 module:log("debug", "%s's default rule is %s", user, tostring(default)); | 233 module:log("debug", "%s's default rule is %s", user, default); |
234 if default == "roster" then | 234 if default == "roster" then |
235 return has_in_roster(user, who); | 235 return has_in_roster(user, who); |
236 end | 236 end |
237 return default; | 237 return default; |
238 end | 238 end |