ID:261899
 
client/var/
const
DENYMSG = "You were denied permission to log in because another person with the same ip address is logged in!"
BOOTMSG = "You were booted for multi play!"
var/Banned_Ip_list[0]
var/log = 0
mob/var/spamcheck = 0
mob/proc/filter(T as text, var/list/L)
for(var/O in L)
if(findtext(T,O))
return TRUE
mob/proc/spamcheck()
if(src.spamcheck >= 1)
return TRUE
else
src.spamcheck += 1
spawn(25)
src.spamcheck -= 1

proc/ipban(address)
if(!Banned_Ip_list.Find(address) && address &&address!="localhost" &&address!="127.0.0.1")
Banned_Ip_list.Add(address)

mob/Login()
..()
src << "<b><i>This game is Protected by <font color = red>Shadow-Security!</font></i></b>"

proc/scan(mob/M in world)
var/mob/player
for(player in world)
if(player.client && player != M)
return TRUE
break
else
return
mob/proc/boot()
del(src)



mob
var
color = "black"
verb/Say(t as text)
set category ="Misc"
if(spamcheck == TRUE)//if the player is spamming
src << "Spam rate exceeded please wait a moment and try again!"//tell him to wait for a second
return //stop it from sending
else//if the message is ok to send
src.spamcheck()//check for spam
world<<"<font face = verdana color =[src.color] size = 1><b>\icon [src] [src]: [t]"

^ how do i make that so you can enter like 3 msges in a row w/o the spam thing being activated?..

Thanks.
-Cait
Mashed_The_Hamster wrote:
mob/proc/spamcheck()
if(src.spamcheck >= 3)
return TRUE
else
src.spamcheck += 1
spawn(25)
src.spamcheck -= 1

I believe the modification in bold is what you're looking for.
In response to Polatrite
Nope doenst work <=\
Try these changes...
<code> mob/var/spamcheck = 0 mob/proc/spamcheck() if(src.spamcheck >= 3) return TRUE else src.spamcheck += 1 spawn(25) src.spamcheck -= 1 return FALSE mob var color = "black" verb/Say(t as text) set category ="Misc" if(spamcheck() == TRUE)//if the player is spamming src << "Spam rate exceeded please wait a moment and try again!"//tell him to wait for a second return //stop it from sending else//if the message is ok to send //Removed a line here... (the spamcheck one...) world<<"<font face = verdana color =[src.color] size = 1><b>\icon [src] [src]: [t]" </code>
That works for me, although I had to slow it down to be sure. You do know that spawn(25) is 2.5 seconds right?