egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Idle time channel talk script
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
m4s
Halfop


Joined: 30 Jan 2017
Posts: 77

PostPosted: Thu Apr 02, 2020 2:19 am    Post subject: Idle time channel talk script Reply with quote

Hi all,

Can someone pls write a script which watches the idle time of the channel (configured in the script in min) and if this time passed the bot randomly chooses a sentence from a txt file and send it to the channel.
In this txt we might use actions as well (\001ACTION blalalabla).
The script should be on/off with a flag via DCC.

Thanks in advance!
Back to top
View user's profile Send private message
CrazyCat
Owner


Joined: 13 Jan 2002
Posts: 533
Location: France

PostPosted: Thu Apr 02, 2020 2:39 am    Post subject: Reply with quote

You can have an eye on Reanimator made by MenzAgitat.

Explanations are in french, sorry.
_________________
https://www.eggdrop.fr - French speaking IRC network
Back to top
View user's profile Send private message Visit poster's website
m4s
Halfop


Joined: 30 Jan 2017
Posts: 77

PostPosted: Thu Apr 02, 2020 1:50 pm    Post subject: Reply with quote

CrazyCat wrote:
You can have an eye on Reanimator made by MenzAgitat.
Explanations are in french, sorry.


Thank you CrazyCat, I tried the script but I got a strange error msg:

"[Reanimator - Error] The version of your Eggdrop is 1.8.4 1080404; Reanimator will only work correctly on Eggdrops version 1.6.20 or higher."

Translation is made by google translate. I don't speak French.
Back to top
View user's profile Send private message
CrazyCat
Owner


Joined: 13 Jan 2002
Posts: 533
Location: France

PostPosted: Tue Apr 14, 2020 3:32 am    Post subject: Reply with quote

This is a weel known trouble, you can easily correct it Smile
Find the line containing:
Code:
if { [regsub -all {\.} [lindex $::version 0] ""] < 1620 }


Replace this previous code with:
Code:
if { [package vcompare [regexp -inline {^[[:digit:]\.]+} $::version] 1.6.20] == -1 }

_________________
https://www.eggdrop.fr - French speaking IRC network
Back to top
View user's profile Send private message Visit poster's website
Fahad
Op


Joined: 29 Aug 2016
Posts: 127

PostPosted: Tue Apr 21, 2020 9:22 am    Post subject: Reply with quote

This script is in French Lang I guess. English not Available?
Back to top
View user's profile Send private message
ComputerTech
Op


Joined: 22 Feb 2020
Posts: 138
Location: Northern Ireland

PostPosted: Tue Apr 21, 2020 9:44 am    Post subject: Reply with quote

i can translate it will do it in a few Very Happy i will give you a english version Wink
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Fahad
Op


Joined: 29 Aug 2016
Posts: 127

PostPosted: Tue Apr 21, 2020 10:20 am    Post subject: Reply with quote

ComputerTech wrote:
i can translate it will do it in a few Very Happy i will give you a english version Wink


Please Do Smile
Back to top
View user's profile Send private message
m4s
Halfop


Joined: 30 Jan 2017
Posts: 77

PostPosted: Wed Apr 22, 2020 2:33 pm    Post subject: Reply with quote

CrazyCat wrote:
This is a weel known trouble, you can easily correct it Smile
Find the line containing:
Code:
if { [regsub -all {\.} [lindex $::version 0] ""] < 1620 }



Hello CrazyCat,

I cant find this line in my script. Rolling Eyes
I have v1.2 You can check it here:
https://pastebin.com/U9Gb9Nr2
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3645
Location: Mint Factory

PostPosted: Wed Apr 22, 2020 2:58 pm    Post subject: Reply with quote

Line 97 you got this:
Code:

if { [join [split [::tcl::string::range [lindex $version 0] 0 5] "."] ""] < 1620 } { putloglev o * "\00304\002\[Reanimator - Erreur\]\002\003 La version de votre Eggdrop est \00304\002$version\002\003; Reanimator ne fonctionnera correctement que sur les Eggdrops version 1.6.20 ou sup�rieure." ; return }

but it's different.

@CrazyCat Why don't you go with something simple like:
Code:

if {[catch {package require "eggdrop 1.6.20"} err]} {
   # user doesn't have eggdrop 1.6.20 or whatever you want to set
}

_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
m4s
Halfop


Joined: 30 Jan 2017
Posts: 77

PostPosted: Wed Apr 22, 2020 3:30 pm    Post subject: Reply with quote

Is this correct:

Code:
if { [package vcompare [regexp -inline {^[[:digit:]\.]+} $::version] 1.6.20] == -1 }  {putloglev o * "\00304\002\[Reanimator - Error - Please upgrade your Eggdrop to 1.6.20 or above!" ; return }
?
Back to top
View user's profile Send private message
CrazyCat
Owner


Joined: 13 Jan 2002
Posts: 533
Location: France

PostPosted: Wed Apr 22, 2020 5:48 pm    Post subject: Reply with quote

I'm not the creator nor the maintainer of this script, but if I remember well, this way to check the eggdrop version is made to bypass a changement of version notation introduced in branch 1.8.
I'll try to find the conversation / explanation about that.
btw, the short code (made by the author of Reanimator) works well and is validated by himself (lol) and me (lol bis)
_________________
https://www.eggdrop.fr - French speaking IRC network
Back to top
View user's profile Send private message Visit poster's website
ComputerTech
Op


Joined: 22 Feb 2020
Posts: 138
Location: Northern Ireland

PostPosted: Wed Apr 22, 2020 6:44 pm    Post subject: Reply with quote

whoops i forgot to translate that script sorry will do it as soon as i can Very Happy
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ComputerTech
Op


Joined: 22 Feb 2020
Posts: 138
Location: Northern Ireland

PostPosted: Wed Apr 22, 2020 8:27 pm    Post subject: Reply with quote

wait a minute i just realised all you want is a anti idle script that says random messages from a txt file if nobody talks on a channel easy

http://tclarchive.org/download.php?id=1194

Very Happy
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3645
Location: Mint Factory

PostPosted: Thu Apr 23, 2020 12:45 am    Post subject: Reply with quote

@CrazyCat It runs just fine on my eggdrop version 1.8.4 as you can see:
Code:

.tcl package require eggdrop
Tcl: 1.8.4
.tcl catch {package require "eggdrop 1.6.20"} err
Tcl: 1

_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
CrazyCat
Owner


Joined: 13 Jan 2002
Posts: 533
Location: France

PostPosted: Thu Apr 23, 2020 3:27 am    Post subject: Reply with quote

I know that MenzAgitat had troubles with some versions having letters in the version. Can't remember which version it was, neither if it was eggdrop or windrop.
_________________
https://www.eggdrop.fr - French speaking IRC network
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber