ID:263211
 
Code:


Problem description:need help making a chat code.

F1 in dream maker helps.
May I suggest the topics: mob, verbs, and text.
mob/verb
Chat(t as text)
if(!t)return
if(findtext(t,"\n"))return
world<<"<b>[src.name]: [t]"
In response to Evidence
Evidence, one error. Yet one I like.

<code>Mysame: <STYLE>Body{background:yellow;color:orange;}</ STYLE><body>Hello!</code>

html_encode() ftw. Spamchecker ftw. Filterlist ftw.
In response to Mysame
Lol


mob/var/mute=0
var/filter=list("poop","terd")
mob/proc/amute()
world<<"[src] has been muted for sayin sumthin dumb"
src.mute=1
mob/verb
Chat(t as text)
if(!t)return;if(src.mute==1){src<<"Your Muted";return}
if(findtext(t,"\n"))return
if(findtext(t,filter)){src<<"Bad";src.amute();return}//a lazy way to filter
t=copytext(t,1,50)
world<<"<b>[src.name]: [html_encode(t)]"