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.

covid-19.tcl by blackshadow

Help for those learning Tcl or writing their own scripts.
User avatar
abah
Halfop
Posts: 69
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Post by abah »

ubuntu covid work fine but openbsd not working
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Did you check to see if you got the tls package there?
Once the game is over, the king and the pawn go back in the same box.
User avatar
abah
Halfop
Posts: 69
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Post by abah »

caesar wrote:Did you check to see if you got the tls package there?

Code: Select all

% package require tls
1.6.7
% 
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

You tried with the change i suggested and still get the same error?
Once the game is over, the king and the pawn go back in the same box.
User avatar
abah
Halfop
Posts: 69
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Post by abah »

Code: Select all

proc corona:getdata {} {
	set link "https://www.worldometers.info/coronavirus/"
	::http::register https 443 tls:socket
	set ipq [http::config -useragent "lynx"]
	set ipq [::http::geturl "$link" -timeout 5000] 
	set status [::http::status $ipq]
if {$status != "ok"} { 
	::http::cleanup $ipq
	return 
}

Code: Select all

package require http

proc tls:socket args {
   set opts [lrange $args 0 end-2]
   set host [lindex $args end-1]
   set port [lindex $args end]
   ::tls::socket -servername $host {*}$opts $host $port
}

Code: Select all

Tcl error [corona:pub]: wrong # args: should be "tls::socket ?options? host port"
User avatar
Ezekiel
Voice
Posts: 21
Joined: Tue Dec 16, 2014 8:05 am

Post by Ezekiel »

you need this:

Code: Select all

cd /tmp
wget https://core.tcl-lang.org/tcltls/uv/tcltls-1.7.20.tar.gz
tar -xzf tcltls-1.7.20.tar.gz
cd tcltls-1.7.20
./configure
make (ca root)
make install
restart the bot then and should work..
http://tclscripts.net - home of BlackTools.tcl the most complete channel management script who can manage channels from all the IRC networks.
User avatar
abah
Halfop
Posts: 69
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Post by abah »

using shell user not root
s
sysusr
Voice
Posts: 7
Joined: Tue Dec 13, 2016 12:19 am

Post by sysusr »

cool script but is there any way you could do states/provinces?
User avatar
abah
Halfop
Posts: 69
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Post by abah »

thanks my problem solved but i get one problem again.

I am used latest version but i want to autocovid show random country not only global contry
b
blameshift
Voice
Posts: 12
Joined: Mon Mar 27, 2017 4:24 am

Post by blameshift »

caesar wrote:Locate this line:

Code: Select all

http::register https 443 [list ::tls::socket -autoservername true]
and replace it with:

Code: Select all

::http::register https 443 tls:socket
and under the 'package require http' line add this code:

Code: Select all

proc tls:socket args {
	set opts [lrange $args 0 end-2]
	set host [lindex $args end-1]
	set port [lindex $args end]
	::tls::socket -servername $host {*}$opts $host $port
}
Thank you sir this helped me on debian 9 :)

100% working thank you so much :D
n
nix
Voice
Posts: 1
Joined: Sun Aug 01, 2021 12:36 am

Covid script

Post by nix »

Hi,

Is this script still works?

Because I can't get it to work. The bot return replies with no data/statistics included.

p/s I got all the package updated
User avatar
BLaCkShaDoW
Op
Posts: 120
Joined: Sun Jan 11, 2009 4:50 am
Location: Romania
Contact:

Re: Covid script

Post by BLaCkShaDoW »

BLaCkShaDoW Production @ WwW.TclScripts.Net
User avatar
abah
Halfop
Posts: 69
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Re: Covid script

Post by abah »

BLaCkShaDoW wrote: Mon Aug 16, 2021 7:55 am Download it from here : https://tclscripts.net/downloads/covid19-tcl/
Is this TCL running in Centos ?
abah - Kota Makassar - Indonesia
User avatar
CrazyCat
Revered One
Posts: 1304
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Re: covid-19.tcl by blackshadow

Post by CrazyCat »

TCL rarely depends on ditribution, it could depends on eggdrop and tcl (tcllib) version.
User avatar
abah
Halfop
Posts: 69
Joined: Sun Dec 01, 2013 3:04 am
Location: Indonesia

Re: covid-19.tcl by blackshadow

Post by abah »

CrazyCat wrote: Sat Nov 23, 2024 3:35 am TCL rarely depends on ditribution, it could depends on eggdrop and tcl (tcllib) version.
thanks
abah - Kota Makassar - Indonesia
Post Reply