Comparison

plugins/mod_admin_telnet.lua @ 6533:5da544e97bea

mod_admin_telnet: Use the session-specific print function
author Kim Alvefur <zash@zash.se>
date Sat, 13 Dec 2014 16:40:55 +0100
parent 6503:8437058c4226
child 6534:b89406fa076c
child 6580:74946f050209
comparison
equal deleted inserted replaced
6532:a966efeb6cb3 6533:5da544e97bea
972 function def_env.muc:list(host) 972 function def_env.muc:list(host)
973 local host_session = hosts[host]; 973 local host_session = hosts[host];
974 if not host_session or not host_session.modules.muc then 974 if not host_session or not host_session.modules.muc then
975 return nil, "Please supply the address of a local MUC component"; 975 return nil, "Please supply the address of a local MUC component";
976 end 976 end
977 local print = self.session.print;
977 local c = 0; 978 local c = 0;
978 for name in keys(host_session.modules.muc.rooms) do 979 for name in keys(host_session.modules.muc.rooms) do
979 print(name); 980 print(name);
980 c = c + 1; 981 c = c + 1;
981 end 982 end