--[[ motd.lua v0.02 by blastbeat - this script sends a message stored in a file to connecting users - changelog 0.02: - updated script api ]]-- --// settings begin //-- local hub_getbot = hub.getbot local motd = "MOTD" local path = "scripts/motd/motd.txt" --// settings end //-- hub:setListener( "onStart", { }, function( ) local file, err = io.open( path, "r" ) if file then motd = file:read( "*a" ) or motd file:close( ) end return nil end ) hub:setListener( "onLogin", { }, function( user ) user:reply( motd, hub_getbot( ) ) return nil end ) hub.debug( "** Loaded motd.lua **" )