--[[ mass_message.lua v0.03 by blastbeat ]]-- local check_failed = function( user, rank ) if not user:isRegged( ) or user:getRank( ) < rank then return true end return false end hub:setListener( "onBroadcast", { }, function( p ) local user, cmd, text = p.user, p.cmd, p.msg local command, parameters = utf.match( text, "^[+!#](%a+) ?(.*)" ) if command == "bc" then if check_failed( user, hub:getCfg "op_rank" ) then user:reply{ msg = "You are not allowed to use this command.", from = hub:getBot( ) } return PROCESSED end local msg = utf.match( parameters, "^(%S+)" ) if not msg then user:reply{ msg = "Usage: +pm ", from = hub:getBot( ) } else hub:broadcast{ msg = msg, from = user, pm = user } end return PROCESSED --// dont send cmd to hub and other scripts end return nil end ) hub:debug( "** Loaded mass_message.lua **" )