-- 3x the same script just for different software. -- ptokax, dch++ and finaly bcdc++ -- it checks for users who type 6 lines in a row without interuption from another user. -- plop -- ptokax version Bot = "Monoloog" counter = 1 function DataArrival(user, data) if ( strsub(data, 1, 1) == "<" ) then if curname then if curname == user.sName then counter = counter + 1 if counter >= 6 then SendToAll(Bot, user.sName.." voert een diepzinige monoloog!|") counter = 1 end else curname = user.sName counter = 1 end else curname = user.sName counter = 1 end end end -- end ptokax version --- dch++ version Bot = "Monoloog" counter = 1 function dchpp.clientMessage( client, msg ) if curname then if curname == client:getNick() then counter = counter + 1 if counter >= 6 then dchpp.sendToAll("<"..Bot.."> "..client:getNick().." voert een diepzinige monoloog!|") counter = 1 end else curname = client:getNick() counter = 1 end else curname = client:getNick() counter = 1 end end -- end dch++ version -- bcdc++ version counter = 1 dcpp:setListener( "chat", "monoloog", function( hub, user, text ) if curname then if curname == user:getNick() then counter = counter + 1 if counter >= 6 then hub:sendChat(user:getNick().." voert een diepzinige monoloog!") counter = 1 end else curname = user:getNick() counter = 1 end else curname = user:getNick() counter = 1 end end ) DC():PrintDebug( " ** Loaded monoloog.lua **" ) -- end bcdc++ version