[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[OpenVerse] url extractor plugin
Here is a little simple plugin that "extracts" a url from regular chat and
send you, and only you if you have the plugin, the url as if it was typed up
as a url.
Example: (a regular chat message):
i found all about cats at http://cats.com.
THAT WOULD MAKE THIS:
/url <your nick> http://cats.com
==================================================================
To install make a directory in your plugins directory named:
UrlExtractor
then cut and paste this text in <whatever>/UrlExtractor/PlugInit.tcl
== start cut ========================================================
#
# UrlExtractor
#
# This extracts urls from a CHAT message and sends (only you) a url it
detects
#
RegisterPlugin UrlExtractor ProcessInput.post UE_Init
proc UE_Init { what cmd parms rest} {
global MV
if {[string compare $cmd "CHAT"] != 0 } {return 1}
set words [split $rest " "]
foreach word $words {
if {[string compare -length 7 $word "http://"] == 0} {
SendToServer "URL $MV(nick) $word"
}
if {[string compare -length 6 $word "ftp://"] == 0} {
SendToServer "URL $MV(nick) $word"
}
if {[string compare -length 7 $word "mailto:"] == 0} {
SendToServer "URL $MV(nick) $word"
}
if {[string compare -length 12 $word "openverse://"] == 0} {
SendToServer "URL $MV(nick) $word"
}
if {[string compare -length 7 $word "file://"] == 0} {
SendToServer "URL $MV(nick) $word"
}
}
return 1
}
== end cut ===========================================================
to whoever might thing this may be usefull,
jack
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-------------------------------------------------------
--
Cruise -
OpenVerse Visual Chat - http://openverse.org/
-----------------------------------------------------------------
To unsubscribe to the OpenVerse mailing list send a message
to openverse-request@openverse.org with the following word
in the BODY of the message.
UNSUBSCRIBE
If you need assistance from a human, email cruise@openverse.org
-----------------------------------------------------------------