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
Wed Nov 04, 2020 12:24 pm
Forum: Script Requests
Topic: strip duplicate characters in nick and match against badnick
Replies: 35
Views: 14671

if {[string match -nocase *guest* $nick2]} return set match 0 foreach i $bnick { if {[string match -nocase *$i* $nick]} { incr match set badpart $i break } } if {$match} { putquick "MODE $chan +b *$badpart*!*@*" putquick "KICK $chan $nick :$kickreason" } I missed to point out th...
by caesar
Wed Nov 04, 2020 2:49 am
Forum: Script Requests
Topic: strip duplicate characters in nick and match against badnick
Replies: 35
Views: 14671

I take it this piece of code is quite old and was aimed to work with previous versions of TCL library, but since TCL is at 8.6 (at least in my Debian server) should adapt every piece of code you are using to take advantage of what it has to offer. Anyway.. if {(([lsearch -exact [string tolower $bcha...
by caesar
Mon Oct 19, 2020 10:35 am
Forum: Script Requests
Topic: help in caps kicker tcl for arfer
Replies: 22
Views: 15335

Instead of your ldiff you can use lmap and lsearch and can make it case insensitive if you want:

Code: Select all

set diff [lmap x $list1{expr {[lsearch -nocase $list2 $x] < 0 ? $x : [continue]}}]
by caesar
Fri Oct 16, 2020 2:59 am
Forum: Script Requests
Topic: reCAPTCHA
Replies: 4
Views: 3208

You could try the mechanism used by Trivia scripts to somewhat protect their questions from copy/paste the questions.
by caesar
Wed Sep 30, 2020 7:18 am
Forum: Script Requests
Topic: News Script
Replies: 2
Views: 2487

Anything is possible as long as you give it the source to read the news from, meaning a website or something, to get them from there to your channel. Got any links or something?
by caesar
Sat Sep 26, 2020 5:46 am
Forum: Script Requests
Topic: setting ban on msg followed by quit
Replies: 26
Views: 12740

What if there are two distinct people with same host? :)
by caesar
Fri Sep 25, 2020 2:58 am
Forum: Script Requests
Topic: setting ban on msg followed by quit
Replies: 26
Views: 12740

@CrazyCat Ah, I see, in that case just replace it instead of removing and adding it again: proc add:spam {nick chan} { global spamlist set match 0 set now [clock seconds] if {[info exists spamlist($chan)]} { putserv "PRIVMSG $chan :spamlist exists for $chan" set pos [lsearch -nocase [dict ...
by caesar
Thu Sep 24, 2020 9:55 am
Forum: Script Requests
Topic: setting ban on msg followed by quit
Replies: 26
Views: 12740

Good catch on that string tolower $chan as this could have caused some issues. Like I previously mentioned, should consider adding a nick change function and something for a bit of house keeping just in case something doesn't work as should and you end up with a big array stored in memory with a bun...
by caesar
Wed Sep 23, 2020 1:30 am
Forum: Script Requests
Topic: setting ban on msg followed by quit
Replies: 26
Views: 12740

Instead of using the spamlist($chan,$nick) time format I would go with per channel format like spamlist($chan) {nick time} cos is easier to store and most important to maintain the list. So, with this in mind instead of: set ::spamlist($chan,$nick) [unixtime] would become: lappend spamlist($chan) [l...
by caesar
Sun Sep 20, 2020 12:03 pm
Forum: Script Requests
Topic: raw on connect
Replies: 30
Views: 16818

Opening the link you mentioned in Firefox on Windows gives me a {status: "fail"} reply, but if where to use the same curl in Linux it works just fine, meaning getting the same result.
by caesar
Sat Sep 19, 2020 10:10 am
Forum: Script Requests
Topic: raw on connect
Replies: 30
Views: 16818

I used the link in the code with a random IP, then went on the website and tried the examples they give in the documentation page and i got the error I mentioned above. I concluded at the time it's a error on their side since I wasn't the only one that was apparently getting that error. Anyway...
by caesar
Fri Sep 18, 2020 12:55 am
Forum: Script Requests
Topic: raw on connect
Replies: 30
Views: 16818

Their API isn't working properly for some reason as i get this JSON answer: {"status":"fail","message":"SSL unavailable for this endpoint, order a key at https://members.ip-api.com/"} So, you got two options: 1. contact them and ask why the free plan isn't wor...
by caesar
Wed Sep 16, 2020 12:54 am
Forum: Script Requests
Topic: chanset via pub command
Replies: 15
Views: 8344

Did you add a putlog line to see what mode and value would be set and what error do you get? Something like:

Code: Select all

putlog "trying to set $mode to $value"
by caesar
Tue Sep 15, 2020 4:23 am
Forum: Script Requests
Topic: chanset via pub command
Replies: 15
Views: 8344

You shouldn't use set, arg or args cos they have special meanings in TCL.

Here's a nice trick with lassign:

Code: Select all

% set text "ap:repeatl 2:10 60 k:kb 2"
ap:repeatl 2:10 60 k:kb 2
% set value [lassign $text mode]
2:10 60 k:kb 2
% puts $mode
ap:repeatl
% puts $value
2:10 60 k:kb 2
by caesar
Sat Aug 29, 2020 1:44 pm
Forum: Scripting Help
Topic: check banlist for certain banmasks
Replies: 14
Views: 7326

Shouldn't it be:

Code: Select all

timer sec [list proc $arg1 $arg2 ...]
I mean shouldn't:

Code: Select all

set ::btimer($chan) [list [timer 20 [rmban $chan]]] 
be:

Code: Select all

set ::btimer($chan) [timer 20 [list rmban $chan]]