This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Arnold_X-P
Master
Posts: 243 Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:
Post
by Arnold_X-P » Thu Dec 02, 2021 5:01 pm
thanks heartbroken, thank you again
.:an ideal world:.
www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
networks: DALnet #tcls ChatZona #tcl Libera.Chat #tcls
bayo
Voice
Posts: 15 Joined: Tue Jan 25, 2022 4:14 pm
Location: Bulgaria
Contact:
Post
by bayo » Wed Feb 02, 2022 2:29 pm
Hi, when I try to add it to my bot and chanset it it shows:
[18:27:25] <BAYO> .chanset #Forbidden +wtime
[18:27:25] <ec|ipse> Error trying to set +wtime for #Forbidden, invalid mode.
Any help?
CrazyCat
Revered One
Posts: 1347 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Wed Feb 02, 2022 6:46 pm
Which of the scripts in the thread do you try ?
The functionnal one is from heartbroken @ 14/11/2021 16:28
Bosco
Voice
Posts: 9 Joined: Mon Oct 31, 2022 10:57 pm
Post
by Bosco » Wed Mar 01, 2023 8:55 pm
<03@Freebsd> Connection failor! Unsupported URL type "https" <--- work but this thing spawn every time check .t
<03@Freebsd> 04 »04 North America »04 Canada »04 Ontario »04 London : Current local time: 7:53:53 pm Date: Wednesday 1 March 2023 Time zone: EST (Eastern Standard Time) Current time zone offset: -05:00 hours
<03@Freebsd> NOW: EST Eastern Standard Time 06 Nov 2022 Sunday 06 Nov 2022 at 1:00:00 am local time to 12 Mar 2023 Sunday 12 Mar 2023 at 2:00:00 am local time, the time changes to 3:00:00 am Offset: UTC -5:00 DST ended on 06 Nov 2022, clocks moved back 1 hour; from 2:00:00 am to 1:00:00 am
CrazyCat
Revered One
Posts: 1347 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Thu Mar 02, 2023 4:22 am
This is probably because the register https is started only when the script is loaded, and peharps you have another script which unregister it.
aut
Voice
Posts: 12 Joined: Wed Oct 25, 2023 6:14 am
Post
by aut » Tue Sep 17, 2024 6:46 pm
.t Karachi
15(@Caro15): 04 » Asia » Pakistan » Karachi : Current local time: 3:31:39 am Date: Wednesday 18 September 2024 Time zone: PKT (Pakistan Time) Current time zone offset: +05:00 hours
15(@Caro15): PKT Pakistan Time has been in effect since 2009 Offset: UTC +5:00
it gave me this %araquo
CrazyCat
Revered One
Posts: 1347 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Wed Sep 18, 2024 2:41 am
Probably the site now uses html entities rather than direct chars.
Find the line:
regsub -all -- {»} $str \003\u00bb\00304 str
Just after, add:
set str [string map {"»" "\003\u00bb\00304"} $str]
I use
string map because there are potentialy others chars which will need to be replaced, I think it's better to not have one regexp per char.
Arnold_X-P
Master
Posts: 243 Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:
Post
by Arnold_X-P » Mon Apr 28, 2025 11:04 pm
This TCL has stopped working, when I request it, it only shows me this
.t japan
No any information found for "japan"
It worked fine before, the data I requested came out, please someone help me
Code: Select all
package require http
package require tls 1.6.4
bind pub - .t worldntime
proc worldntime {nick uhost hand chan text} {
if {![channel get $chan wtime]} { return 0 }
if {![llength $text]} { puthelp "privmsg $chan :Usage: $::lastbind <location>"; return 0 }
set TxT [YouGotTheSource https://translate.googleapis.com/translate_a/single?[http::formatQuery client gtx sl auto tl en dt t q $text]]
if {[regexp -- {\"([^\"]+)\"} $TxT - transout]} { set query $transout } { set query $text }
set data [YouGotTheSource http://localtimes.mobi/search/?[http::formatQuery s $query x 0 y 0]]
if {[regexp -- {Home</a>(.+?)</span>.+?<div class="timeinfo">(.+?)</div>.+?<div class="tz_container">(.+?)</li>} $data - loc t1 t2]} {
puthelp "privmsg $chan :\00304[cleanup $loc]\003: [cleanup $t1]"
puthelp "privmsg $chan :[cleanup $t2]"
} else { puthelp "privmsg $chan :No any information found for \"$text\". Please be more specific!"; return }
return 0
}
proc cleanup str {
regsub -all -- {(?:<label>|</label>)} $str \002 str
regsub -all -- "<.+?>" $str " " str
regsub -all -- {»} $str \003\u00bb\00304 str
regsub -all -- { } $str { } str
regsub -all -- {\s+} $str { } str
set str [string map {"»" "\003\u00bb\00304"} $str]
return $str
}
proc YouGotTheSource URL {
if {[catch {set token [http::geturl $URL -timeout 9000]} error]} {
set err "Connection failor! [string map {\n " "} $error]"
} elseif {[http::status $token] ne "ok" || [http::ncode $token] != "200"} {
set err "[http::status $token] - [http::code $token]"
::http::cleanup $token
} else {
set data [http::data $token]
::http::cleanup $token
}
if {[info exists data] && [string length $data]} {
return $data
}
if {[info exists err] && [string length $err]} {
foreach _ [channels] { if {[channel get $_ wtime]} { puthelp "privmsg $_ :$err" }}
}
}
::http::register https 443 [list ::tls::socket -ssl2 0 -ssl3 0 -tls1 1]
setudef flag wtime
Apparently Google updated something internally, which is why the TCL no longer provides the requested information.
.:an ideal world:.
www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
networks: DALnet #tcls ChatZona #tcl Libera.Chat #tcls
CrazyCat
Revered One
Posts: 1347 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Tue Apr 29, 2025 2:04 am
Google's API works fine but localtimes.mobi is now a parked domain, so it can't return you the localtime of countries.