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.

Public Kick/Ban Script (w/ stored info & extended mutes)

Support & discussion of released scripts, and announcements of new releases.
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

i placed it here but it didnt seem to have the desired effect:
set ok "" ; set err ""

foreach user $userls {
set user "[string trimleft $user "@+"]"
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

thanks for the explanation on irc spike^^ i guess stripping @ would break gettin a custom banmask to set ban on as u explained on irc
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

Perhaps this can be a usable compromise.

Find this line in the script

Code: Select all

    } elseif {[string is digit -strict $item]} {  set btime $item
and Add these lines just after that line...

Code: Select all

    } elseif {[string match {[+%]?*} $item]} {
      lappend nickls [string trimleft $item "+%"]
    } elseif {[string match "@?*" $item] && ![string match {*[.:]*} $item]} {
      lappend nickls [string trimleft $item "@"]

SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

excellent tried it and seems to work well thanks Spike^^
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

i had a request if u are up for it Spike^^ as we use this code on various networks i found chanops on some of our networks never use multiple nicks to kick and kickban users but rather use:

!k nick custom reason
!kb nick custom reason

would it be easy to edit the code to have it work like this ?


thanks in advance.
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

I thought that was how it worked now?
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

atm its stacked both modes and kicks
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

I don't get the difference.

the stacker can work with a "stack" of 1, just as well as 4 or 44?
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

yea but it wont get the custom kick msg
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

<+Simo> !k Dari test
Dari Kicked from #test
-Hawk- : test is not on channel #test

the custom kick msg wasnt used by the code
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

That's because the command is: !k Dari .test
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

but we wanted to just kick 1 nick at a time and have custom kick message right after it without any additional chars like . or other


!k nick custom kick here
!kb nick custom kick here
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Lame hack

Post by SpiKe^^ »

Try find this line in the script....

Code: Select all

  if {$uh ne "Timer" && ![is:allowed $nk $hn $ch]} {  return 0  }

and add these lines just after that line...

Code: Select all

  if {$do eq "k" || $do eq "kb"} {
    if {[llength [set temp [split $tx]]]>1 && ![matchstr ".*" [lindex $temp 1]]} {
      set tx "[lindex $temp 0] .[join [lrange $temp 1 end]]"
    }
  }

Leaves the script mostly as it is except for the !k and !kb commands can only do a single nick, unless you start the custom reason with a . as before.

EDIT: On further thought that may be somewhat shortsighted, as it does not look for "change target channel" or "custom bantime" arguments...
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
s
simo
Revered One
Posts: 1069
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

so doing like this wont work ?

!k nick custom kick msg
!kb nick custom kick msg

i tested it ad added the line u suggested but it didnt add the custom kick msg
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

That's not what I said.

Said it just does that and kills the other options for the k and kb commands.

Try the hack and see...
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
Post Reply