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.

Search found 3735 matches

by caesar
Tue Apr 25, 2023 10:57 am
Forum: Scripting Help
Topic: Need help with IPinfo Script
Replies: 23
Views: 24301

And the version that uses ip library to do the IP v4 and v6 validation rather than that regexp that won't match IP v6: package require http package require json package require ip bind raw - NOTICE server:notices proc server:notices {from keyword text} { if {![string match -nocase "*client conn...
by caesar
Tue Apr 25, 2023 10:48 am
Forum: Script Requests
Topic: Chanops Nick Abuse
Replies: 31
Views: 11251

It's more about code readability and re-usability by checking if said element (nick in your case) exists in the list so you don't attempt to remove a non existing element, than performance gain.
by caesar
Mon Apr 24, 2023 2:55 pm
Forum: Script Requests
Topic: Chanops Nick Abuse
Replies: 31
Views: 11251

Code: Select all

set pos [lsearch -nocase $ChanOpsList($chan) $nick]
if {$pos > -1} {
	set ChanOpsList($chan) [lreplace $ChanOpsList($chan) $pos $pos]
}
Assign a position (if one exists in the first place) and reuse it, don't lsearch twice.
by caesar
Thu Apr 06, 2023 2:16 pm
Forum: Script Requests
Topic: Chanops Nick Abuse
Replies: 31
Views: 11251

Right now you create the associative array and when finally done with it you unset everything, thus the result doesn't even exist.

I said move the unset before the loop, meaning when you create it, so you start fresh.
by caesar
Wed Apr 05, 2023 1:09 pm
Forum: Script Requests
Topic: Chanops Nick Abuse
Replies: 31
Views: 11251

Move the unset outside of the loop cos as it is it will set on first member and unset on the next, thus in the end you will have only one member. I'd go with: if {[info exists ChanOpsList]} { unset ChanOpsList } directly placed above the 1st foreach loop. This way you reset everything and only creat...
by caesar
Tue Apr 04, 2023 1:52 pm
Forum: Script Requests
Topic: Chanops Nick Abuse
Replies: 31
Views: 11251

Might want to unset the array before creating it if it exists, to avoid having duplicated details at least.
by caesar
Mon Apr 03, 2023 10:59 am
Forum: Script Requests
Topic: Chanops Nick Abuse
Replies: 31
Views: 11251

I didn't do anything, just made his code easier to follow by adding indentations. I would maintain an active list of the names I want to "protect" via mode change, quit, part, and so on, and upon a regular user joining I would check with that list. I doubt you have 100 names to keep track ...
by caesar
Sat Apr 01, 2023 2:29 am
Forum: Script Requests
Topic: Chanops Nick Abuse
Replies: 31
Views: 11251

On a bind mode change? I fail to understand what exactly is happening there and what exactly you want to achieve.
by caesar
Fri Mar 31, 2023 11:11 am
Forum: Script Requests
Topic: Chanops Nick Abuse
Replies: 31
Views: 11251

Those two binds (nick and join) should be more than enough to cover your needs, without the loop over chanlist every time someone joins. Makes no sense really. Not to mention the code is poorly formatted.. here's a better look to follow things more easily. proc Xchanop:nick-checkerX {nick uhost hand...
by caesar
Tue Mar 28, 2023 3:16 pm
Forum: Eggdrop Help
Topic: Memory issue with 1.9.5?
Replies: 3
Views: 3399

Unload all scripts and then load one at a time and see when the memory usage sky rockets and then inform the author about the issue.
by caesar
Wed Mar 15, 2023 12:21 pm
Forum: Script Requests
Topic: TVMaze Script That lists tonights shows
Replies: 18
Views: 19419

In layman terms, the error states that the 'tvmaze_api_key' variable isn't 'available' for the 'tonight' function (meaning 'proc tonight'). To extrapolate and give a real life example is like you are in a room without any door or windows towards outside and you can't tell if it's day or night outsid...
by caesar
Tue Feb 28, 2023 12:19 pm
Forum: Scripting Help
Topic: extract json data
Replies: 5
Views: 3381

You can use an online app like JSON Viewer as well. :)
by caesar
Mon Feb 27, 2023 1:29 pm
Forum: Scripting Help
Topic: extract json data
Replies: 5
Views: 3381

Add a string map like:

Code: Select all

set todaytext [string map {\n {}} [dict get [lindex [dict get $jdict choices] 0] text]]
to remove the new lines.

Edit: Typo, it's string not strong map. :lol:
by caesar
Thu Feb 16, 2023 2:05 am
Forum: Scripting Help
Topic: Problem with irccloud
Replies: 2
Views: 3059

I fail to see what's wrong with the stuff you posted, so can you provide an example?

Replace the 'putnow' with 'putlog', rehash the bot and issue a command to see what's the output.
by caesar
Thu Feb 09, 2023 1:41 pm
Forum: Script Support & Releases
Topic: WP Eggdrop error
Replies: 6
Views: 4579

The link you provided leads me to TCL Archive's main page, nothing is selected in particular.