@verb #4980:"htell" any any any rxd #9223
@program #4980:"htell" any any any
"here we go"
"objectives..."
"1. Telnet text to single telnetter [player:tell]"
"4. Telnet text to single hyperlisted [player:tell]"
""
"7. unstyled hypertext to single hyperlisted [1883:htell]"
" (with reject warning for bad attempt) "
"10. styled hypertext to single hyperlisted [1183:htell]"
" (with reject warning for bad attempt) "
"NEW01: If styleref, but not '<' first, tell both moozers and telnetters!"
{target, styleref, text} = args
this.owner:tell(verb, " target: ", target)
this.owner:tell(verb, " styleref: ", styleref)
this.owner:tell(verb, " text: ", text)
if (!$recycler:valid(target))
player:tell(verb, " reports invalid target! (args[1]) ")
this.owner:tell(verb, " invalid target! ", toliteral(args[1]))
return
endif
if (!(target in connected_players()))
player:tell(verb, " reports non-connected target! (args[1]) ")
this.owner:tell(verb, " non-connected target! ", toliteral(args[1]))
return
endif
"Here's some weirdness for us."
itsHTML = 0
itsBOTH = 0
"moo canada tweakings"
text = $html_utils:de_literal_text(text)
if (index(text, "<") == 1)
this.owner:tell(verb, " - itshtml!")
itsHTML = 1
itsBOTH = 0
elseif (styleref)
this.owner:tell(verb, " - itsboth!")
itsHTML = 1
itsBOTH = 1
endif
if (itsHTML)
"objectives 7 & 10"
if (styleref)
"objective 10"
if (typeof(styleref) == $INT)
style = this.stylesystem:get_style_by_id(styleref)[2]
elseif (typeof(styleref) == $STR)
style = this.stylesystem:get_style_by_class(styleref)[2]
else
player:tell(verb, " reports no such style found! (args[2]) ")
this.owner:tell(verb, " style lookup failure! ", toliteral(args[2]))
return
endif
"hyper check"
if (!this:is_hyper(target))
"objective NEW01 - tell telies any text that's stylerefed, but not '<' starting"
if (itsBOTH)
"set wrapper element"
opencontainer = $html_utils:de_literal_text("")
closecontainer = $html_utils:de_literal_text("")
target:tell(opencontainer + text + closecontainer)
else
player:tell(verb, " reports target is not in hyper mode! (args[1]) ")
this.owner:tell(verb, " non-hyper target! ", toliteral(args[1]))
return
endif
else
"set wrapper element"
opencontainer = $html_utils:de_literal_text("")
closecontainer = $html_utils:de_literal_text("")
for target in (roomhypers)
target:tell(opencontainer + text + closecontainer)
endfor
endif
endif
else
"objectives 1 & 4"
target:tell(text)
endif
"Last modified by Dax (#789) on Tue May 3 13:43:10 2005 MDT."
.