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 

Help with blackmeteo

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
CP1832
Halfop


Joined: 09 Oct 2014
Posts: 55

PostPosted: Thu Aug 16, 2018 2:40 pm    Post subject: Help with blackmeteo Reply with quote

Hi guys:

Does anyone know how to decode Blackshadow's script? I am trying to make some changes on the code but I can't figure out what encoding was used for this script and how to decode it. I tried an hex decoder but the code is still ununderstable. Does anyone know which encoding is this?

Link to file.
Back to top
View user's profile Send private message
Ezekiel
Voice


Joined: 16 Dec 2014
Posts: 14

PostPosted: Tue Aug 21, 2018 4:17 am    Post subject: Reply with quote

everything that needs to be changed is uncoded, so I do not see your need to decode that tcl, if the author released like that..
Back to top
View user's profile Send private message
CP1832
Halfop


Joined: 09 Oct 2014
Posts: 55

PostPosted: Wed Aug 22, 2018 6:22 pm    Post subject: Reply with quote

Ezekiel wrote:
everything that needs to be changed is uncoded, so I do not see your need to decode that tcl, if the author released like that..
I understand, but I wanted to add (as an example) my personal flooding control script, which checks flooding on every script on my eggdrop, and for that I must add a call to the process in the code.
Back to top
View user's profile Send private message
Ezekiel
Voice


Joined: 16 Dec 2014
Posts: 14

PostPosted: Thu Aug 23, 2018 12:56 am    Post subject: Reply with quote

why not try and contact the author of the script?
Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3489
Location: Area 51

PostPosted: Thu Aug 23, 2018 1:45 am    Post subject: Reply with quote

Why do some people still try to make their code unintelligible when with a few commands (actually is just one command with two different arguments) that anyone can easily find on a Google search (if uses the right *cough* info *cough*) can get the exact code with variables and all that?

Anyway... I looked at the code and I can confirm it has some sort of flood control mechanism inside:
Code:

set flood_protect [blackmeteo:flood:prot $chan $host]
if {$flood_protect == "1"} {
   set get_seconds [blackmeteo:get:flood_time $host $chan]
   blackmeteo:say $nick $chan [list $get_seconds "6" $nick] 0
   return
}

The blackmeteo:flood:prot returns 1 if the user is listed, else the blackmeteo:get:flood_time (another anti-flood mechanism) kicks in. This returns a number of seconds that are then used to say something into the channel via blackmeteo:say function. It's too early morning for me to try to follow his logic. Rolling Eyes

PS: @BLaCkShaDoW
Code:

set number [scan $meteo(flood_prot) %\[^:\]]
set timer [scan $meteo(flood_prot) %*\[^:\]:%s]

really? Rolling Eyes Here's a cleaner version:
Code:

scan $meteo(flood_prot) {%d:%d} number timer

and from here you can take things one step further like:
Code:

if {[scan $meteo(flood_prot) {%d:%d} number timer] != 2} {
   set number 4
   set timer 10
}

to enforce two default values in case user input something wrong, like instead of a number put a letter or whatever.

Other two ways to get the two numbers out of meteo(flood_prot) variable:
Code:

foreach {number timer} [split $meteo(flood_prot) :] { break }
lassign [split $meteo(flood_prot) :] number timer

_________________
You may say anything about me, but at least don't misspell my name. xD
Back to top
View user's profile Send private message
CP1832
Halfop


Joined: 09 Oct 2014
Posts: 55

PostPosted: Thu Aug 23, 2018 4:21 pm    Post subject: Reply with quote

I'm aware that the code has a flood control mechanism, I just wanna add my bot's flood control mechanism, which takes into account every script on the bot. But in order to do that, I must call the script I use from within each script.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
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