| View previous topic :: View next topic |
| Author |
Message |
m4s Halfop

Joined: 30 Jan 2017 Posts: 97
|
Posted: Sun Mar 29, 2020 1:36 pm Post subject: The best! |
|
|
Hi, m00nie!
Thanks a lot, it works fine!
It's a great script!
(I added the ytsearch flag to switch on/off the searching function only: .chanset #channel +ytsearch)
Cheers
Last edited by m4s on Sun Apr 05, 2020 12:08 pm; edited 1 time in total |
|
| Back to top |
|
 |
AlbozZz Voice
Joined: 26 Jan 2020 Posts: 3
|
Posted: Sun Mar 29, 2020 3:30 pm Post subject: Some errors to be fix here |
|
|
http://paste.tclhelp.net/?id=6ia7
Some error to be fix if u can thx in advance m00nie
| Code: |
Line 33: WARNING: Unknown command "tls::init"
Line 34: WARNING: Unknown command "tls::socket"
Line 46: ERROR: Unknown variable "m00nie::youtube::regex"
Line 50: ERROR: Unknown variable "m00nie::youtube::key"
Line 84: ERROR: Unknown variable "m00nie::youtube::user_throt"
Line 85: ERROR: Unknown variable "m00nie::youtube::chan_throt"
Line 93: NOTICE: Found constant "rawpage" which is also a variable.
Line 97: WARNING: Unknown command "json::json2dict"
Line 108: ERROR: Unknown variable "m00nie::youtube::key"
|
|
|
| Back to top |
|
 |
m00nie Voice
Joined: 28 Mar 2020 Posts: 14
|
Posted: Sun Mar 29, 2020 4:21 pm Post subject: Re: The best! |
|
|
| m4s wrote: |
(I added the ytsearch flag to switch on/off the searching functions only: .chanset #channel +ytsearch)
|
Hi m4s 😁
Thanks for the good idea. I've added that to the script and posted an update, cheers for the suggestion.
@AlbozZz sorry I'm not familiar with that help site but it looks like it's missed the TCL packages like TLS etc? If you run the script on your bit and it fails please post the output from that and people should be able to help
Cheers
m00nie |
|
| Back to top |
|
 |
m4s Halfop

Joined: 30 Jan 2017 Posts: 97
|
Posted: Mon Mar 30, 2020 2:45 pm Post subject: Re: The best! |
|
|
| m00nie wrote: | Hi m4s 😁
Thanks for the good idea. I've added that to the script and posted an update, cheers for the suggestion.
|
Hi again,
Do you have time to have a look at your news eggdrop script?
I have problems with it...:\ |
|
| Back to top |
|
 |
m00nie Voice
Joined: 28 Mar 2020 Posts: 14
|
Posted: Tue Mar 31, 2020 3:50 pm Post subject: |
|
|
Sure (not wanting to take this off topic and upset the mods but) I'll have a look over the next short while and see if I can sort it too 😁
Cheers
m00nie |
|
| Back to top |
|
 |
m4s Halfop

Joined: 30 Jan 2017 Posts: 97
|
|
| Back to top |
|
 |
m4s Halfop

Joined: 30 Jan 2017 Posts: 97
|
|
| Back to top |
|
 |
m00nie Voice
Joined: 28 Mar 2020 Posts: 14
|
Posted: Tue Apr 07, 2020 4:33 pm Post subject: |
|
|
v2.1 adds per search/link throttling, a parsing fix and more 'modern' way of doing TLS (before that breaks) ☺️
Cheers
m00nie |
|
| Back to top |
|
 |
m4s Halfop

Joined: 30 Jan 2017 Posts: 97
|
Posted: Wed Apr 08, 2020 12:53 am Post subject: Link throttling |
|
|
Hi m00nie!
What is link throttling?
Thanks!
p.s.: script version is 2.2.  |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Wed Apr 08, 2020 7:18 am Post subject: |
|
|
Throttling is limiting the usage if the number of requests are above a certain amount in a small window time frame, basically prevent others from flooding your bot with commands to fetch results.
Why don't you store variables inside an array, I mean instead of:
| Code: |
variable user_throt 30
variable chan_throt 10
variable link_throt 300
|
have:
| Code: |
set yt(user_throt) 30
set yt(chan_throt) 10
set yt(link_throt) 300
|
and first line under the proc line, let's say this one:
| Code: |
proc autoinfo {nick uhost hand chan text} {
|
just add a:
for example and where needed just use $yt(user_throt) for example instead of that $m00nie::youtube::regex for example. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
m4s Halfop

Joined: 30 Jan 2017 Posts: 97
|
Posted: Wed Apr 08, 2020 8:21 am Post subject: |
|
|
| caesar wrote: | Throttling is limiting the usage if the number of requests are above a certain amount in a small window time frame, basically prevent others from flooding your bot with commands to fetch results.
|
But where are the number of requests defined?
The variable user_throt 30 means the user has 30 seconds to send yt links to the channel. Right? But how many requests means the flood?
Thanks!  |
|
| Back to top |
|
 |
m00nie Voice
Joined: 28 Mar 2020 Posts: 14
|
Posted: Wed Apr 08, 2020 10:53 am Post subject: |
|
|
Hi Caesar
Thanks for the suggestion I'll have a look into it and see if that would help (just a different way than I've done it before so something to learn/try for me) 😁
m4s the default is one request per user ever 30s, one per channel every 10s and the same search term or link spammed in 5 mins and it jumped to 2.2 very quickly when the logic for checking was a bit....crap in the real world but hopefully better now
Cheers
m00nie |
|
| Back to top |
|
 |
m4s Halfop

Joined: 30 Jan 2017 Posts: 97
|
Posted: Wed Apr 08, 2020 12:58 pm Post subject: |
|
|
| m00nie wrote: |
m4s the default is one request per user ever 30s, one per channel every 10s and the same search term or link spammed in 5 mins a....
Cheers
m00nie |
Now I got it!
Thanks m00nie & Cheers  |
|
| Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Sat Apr 18, 2020 8:31 am Post subject: |
|
|
Thanks m00nie helped a lot cheers _________________ ComputerTech |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat May 16, 2020 12:12 pm Post subject: |
|
|
there seems to be something broken in the script recently
been gettin this error in PL:
| Quote: |
<TCL-IRC> Tcl error [m00nie::youtube::autoinfo]: unable to convert date-time string "2019-08-17T17:43:19Z": more than one time zone in string
|
Last edited by simo on Sun May 17, 2020 9:35 am; edited 2 times in total |
|
| Back to top |
|
 |
|