djazman85 Voice
Joined: 22 Sep 2009 Posts: 1 Location: Indonesia
|
Posted: Tue Sep 22, 2009 11:57 pm Post subject: fix tcl for sms |
|
|
Hello masters, I need help to fix tcl sms below.
I really do not understand programming tcl.
I have tried to make it by editing tcl google. but the results do not fit with what I want.
| Code: | Website = http://domain.com/sms.php/phone=xxxxx&msg=yyyyyyyyyyy
xxxx = phone number
yyyy = message
I want command bot :
!sms phonenumber message |
| Code: | bind pub - !sms pub:sms
set agent "Mozilla"
proc pub:sms {nick uhost hand chan arg} {
global agent
if {[llength $arg]==0} {
putserv "PRIVMSG $nick :!sms phonenumber message"
} else {
set query "http://domain.com/sms.php/phone="
for { set index 0 } { $index<[llength $arg] } { incr index } {
set query "$query[lindex $arg $index]"
if {$index<[llength $arg]-1} then {
set query "$query+"
}
}
#putserv "PRIVMSG $channel :$query"
set token [http::config -useragent $agent]
set token [http::geturl $query]
set html [http::data $token]
puts stderr ""
upvar #0 $token state
set max 0
foreach {name value} $state(meta) {
if {[regexp -nocase ^location$ $name]} {
set newurl [string trim $value]
putserv "PRIVMSG $channel :$newurl"
if {[string match "*SMS Sent Sucessfully*" $html]} {
puthelp "PRIVMSG $chan :SMS Sent Sucessfully"
return 0
}
if {[string match "*SMS Send Failed*" $html]} {
puthelp "PRIVMSG $chan :SMS Send Failed"
return 0
}
}
}
}
}
putlog "TCL Free sms by Jasman" |
Now tcl only run with command !sms phonenumber&msg=My Message
without SMS Sent Sucessfully & SMS Send Failed.
Help me... _________________ Regard,
Jasman
http://forum.ihsana.com |
|