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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Get_A_Fix
Master
Posts: 206 Joined: Sat May 07, 2005 6:11 pm
Location: New Zealand
Post
by Get_A_Fix » Fri Jun 17, 2016 10:37 pm
simo wrote: looks to be working good caesar
is it possible to have it also remove ban on all channels if a ban is removed
You'd have to
Code: Select all
bind mode - "% -b" [namespace current]::banRemoval
and track either only the bans the bot placed, or all of the bans on each channel. It would require building another proc (named banRemoval) to do the opposite of what the enforce procedure does.
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.
simo
Revered One
Posts: 1082 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Sat Jun 18, 2016 4:45 pm
i dont know how too i tried few things but didnt work
simo
Revered One
Posts: 1082 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Tue May 25, 2021 12:47 pm
i tested your script again ceasar when setting bans on weird chars of nicks and that gave me an error:
&ChanServ Sets Mode on #shqiperia to: +b *[*!*@*
18:44:37 (1 User) is Banned [hjsdd]
wich should have kicked [hjsdd]
but instead returned error: Tcl error [::enforceBans::enforce]: wrong # args: should be "incr varName ?increment?"
caesar
Mint Rubber
Posts: 3776 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Wed May 26, 2021 2:18 am
Ah, there's a space between - and $enforce(max), just remove it in:
like:
As for this:
simo wrote: looks to be working good caesar
is it possible to have it also remove ban on all channels if a ban is removed
Add this in the namespace of the other code:
Code: Select all
bind mode - "% -b" [namespace current]::banRemoval
proc banRemoval {nick uhost hand chan mc ban} {
foreach ch [channels] {
if {![botisop $ch]} continue
if {[ischanban $ban $ch]} {
pushmode $ch -b $ban
}
}
}
Haven't tested so let me know if works (or doesn't) as intended.
Once the game is over, the king and the pawn go back in the same box.
simo
Revered One
Posts: 1082 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Wed May 26, 2021 9:58 am
thanks for the reply caesar i changed what u suggested but now when trying to
ban like:
15:56:09 &ChanServ Sets Mode on #shqiperia to: +b *[*!*@*
15:56:09 (1 User) is Banned [dsqw]ccno
wich should have kicked out [dsqw]ccno
but it didnt trigger and no errors
caesar
Mint Rubber
Posts: 3776 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Wed May 26, 2021 10:26 am
Right, let's give
matchaddr a try then by replacing:
Code: Select all
if {![string match -nocase $ban $n![getchanhost $n $c]]} continue
with:
Code: Select all
if {![matchaddr $ban $n![getchanhost $n $c]]} continue
See if this works and reply back.
Once the game is over, the king and the pawn go back in the same box.
simo
Revered One
Posts: 1082 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Wed May 26, 2021 11:41 am
excellent that seems to work in all conditions thanks caesar
i also tested the one for removal and that seems to work as well
much apreciated caesar