sBot = "[MUTER]" MUTE = {} function DataArrival(user, data) if (strsub(data,1,1) == "<") then data=strsub(data,1,strlen(data)-1) s,e,cmd = strfind(data,"%b<>%s+(%S+)") if ((cmd=="+mute")) then DoMute(user, data) return 1 elseif ((cmd=="+unmute")) then DoUnMute(user, data) return 1 end if strsub(data,1,1) == "<" then if MUTE[user.sName] == 1 then return 1 end end end end function DoMute(user, data) local s,e,cmd,vic = strfind(data,"%b<>%s+(%S+)%s+(%S+)") local victim = GetItemByName(vic) if victim == nil then user:SendData(sBot,"User is not in the hub...") else if MUTE[victim.sName] == nil then MUTE[victim.sName] = 1 SendToAll(sBot,"Tell me "..victim.sName..", How good is a phonecall if you're unable to speak? ;)") end end end function DoUnMute(user, data) local s,e,cmd,vic = strfind(data,"%b<>%s+(%S+)%s+(%S+)") local victim = GetItemByName(vic) if victim == nil then user:SendData(sBot,"User is not in the hub...") else if MUTE[victim.sName] == 1 then MUTE[victim.sName] = nil; SendToAll(sBot, victim.sName.." Was umuted ;) ") end end end