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.

AllProtection.tcl (Stable: v4.8 / Beta: v4.9b4)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
T
TRaSH
Halfop
Posts: 56
Joined: Wed Feb 26, 2003 3:38 pm
Location: #Anime-Supreme

Post by TRaSH »

i'm getting a weird error
when trying to use chanserv to kick/ban

the following happens
[22:22:45] [Sir^Killalot] [22:22] dkshd_pball kicked from #Anime-Supreme by Sir^Killalot: Text repeating detected. (3 repeats in 1.121 secs) :: [Sat Oct 25 22:22:42 2008] - Banned 0 minutes ·3762·
[22:22:45] [Sir^Killalot] [22:22] -ChanServ (service@rizon.net)- Nick *!*@Rizon-FF4200E8.red83-165.mundo-r.com isn't currently in use.

changing it not to use chanserv is places the ban correct.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

What is the ban command you use through ChanServ?
T
TRaSH
Halfop
Posts: 56
Joined: Wed Feb 26, 2003 3:38 pm
Location: #Anime-Supreme

Post by TRaSH »

Code: Select all

# If banthruX is 1/2, set the command here to ban through services:
set banthruX(cmd) "privmsg ChanServ :ban %chan %ban %btime %level %reason"

Code: Select all

[23:53:18] -ChanServ- Syntax: BAN [#channel [nick [reason]]]
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Ok, so you're supposed to specify a nickname instead of ban-mask. Unfortunately, AllProtection does not currently support that. You can modify the script to support using nicknames by applying the following changes:

Replace %ban with %nick in your banthruX(cmd) setting

Code: Select all

set banthruX(cmd) "privmsg ChanServ :ban %chan %nick %reason"
(I removed the %bantime and %reason because they're not supported by your service's syntax)

Replace the following line in proc mapXcmd

Code: Select all

string map [list %reason $k %level $level %btime $time %ban $ban %chan $c] $cmd
with

Code: Select all

string map [list %reason $k %level $level %btime $time %ban $ban %nick $n %chan $c] $cmd
T
TRaSH
Halfop
Posts: 56
Joined: Wed Feb 26, 2003 3:38 pm
Location: #Anime-Supreme

Post by TRaSH »

Sir_Fz wrote: (I removed the %bantime and %reason because they're not supported by your service's syntax)
reason is supported

Code: Select all

[09:59:10] -ChanServ- Syntax: BAN [#channel [nick [reason]]]
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I meant %level instead of %reason, but that shouldn't affect you (also the setting is correct).
k
kenneal
Voice
Posts: 10
Joined: Sun Mar 11, 2007 8:21 am

Post by kenneal »

The link is down, does anybody have a working link?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Yeah, lost my hosting account :P get the newest version from here. Fixed a few bugs from 4.6b8.
D
Danik
Halfop
Posts: 49
Joined: Sun Jun 15, 2008 12:59 pm
Location: Moldova
Contact:

Post by Danik »

Code: Select all

[15:19:21] * InGeRaSa` was kicked by |1C (Advertising detected. (* http://*) :: [Fri Nov 14 16:19:20 2008] - Banned 180 minutes ·249·)
[15:19:21] * InGeRaSa` (~Ingerasa@InGeRaSs.users.undernet.org) has joined #999.md
[15:19:21] * |1C sets mode: +b *!*@InGeRaSs.users.undernet.org
it has to ban first, and after that to kick the user

............

I think the error is Here ...

Code: Select all

"kb" {
   foreach {jn ju} $nl {
    if {[onchan $jn $c] && ![punishing k:$jn:$c]} {
     putquick "KICK $c $jn :[clonemap [mapall $km $c $bti] [incr cc]]"
    }
    if {[punishing b:[set bm [masktype $jn!$ju $bty]]:$c]} {continue}
    if {![info exists arb($bm)]} {
     if {$banthruX(do)==1 || ($banthruX(do) && [llength [chanbans $c]] >= ${max-bans})} {
      putquick [mapXcmd $banthruX(cmd) $jn $ju $c [clonemap [mapall $km $c $bti] $cc] $bty $bti]
     } {
      queue $c $bm
      if {$bti > 0 && [istimer "pushmode $c -b $bm"] == ""} {
       timer $bti [list pushmode $c -b $bm]
      }
      set arb($bm) 1
     }
    }
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

This has been requested before and I promised to add it, unfortunately haven't got the time nor the motivation to do it. So if you want it, replace the "kb" scope (from "kb" { .... }) with:

Code: Select all

"kb" {
 foreach {jn ju} $nl {
  if {![punishing b:[set bm [masktype $jn!$ju $bty]]:$c]} {
   if {![info exists arb($bm)]} {
    if {$banthruX(do)==1 || ($banthruX(do) && [llength [chanbans $c]] >= ${max-bans})} {
     putquick [mapXcmd $banthruX(cmd) $jn $ju $c [clonemap [mapall $km $c $bti] $cc] $bty $bti]
    } {
     queue $c $bm
     if {$bti > 0 && [istimer "pushmode $c -b $bm"] == ""} {
      timer $bti [list pushmode $c -b $bm]
     }
     set arb($bm) 1
    }
   }
  }
  if {[onchan $jn $c] && ![punishing k:$jn:$c]} {
   putquick "KICK $c $jn :[clonemap [mapall $km $c $bti] [incr cc]]"
  }
 }
}
D
Danik
Halfop
Posts: 49
Joined: Sun Jun 15, 2008 12:59 pm
Location: Moldova
Contact:

Post by Danik »

this code didn't change anything :(
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Are you using the ban queue?
# Do you want your bot to queue bans? set here the time in seconds before dumping bans:
# NOTE: 0 means the bot will set the ban immediately
# The modes-per-line setting in eggdrop.conf is the number of modes allowed per command.
set apqueue(time) 1
If yes, then you should take into consideration that the bot sends bans to the channel every $apqueue(time) seconds; so if you want it to immediately set the ban in the channel, change apqueue(time) to 0.
D
Danik
Halfop
Posts: 49
Joined: Sun Jun 15, 2008 12:59 pm
Location: Moldova
Contact:

Post by Danik »

i'm using eggdrop 1.6.19 : downloaded from www.egghelp.org

I checked... and i don't see this ban queue .. in bot's conf
D
Danik
Halfop
Posts: 49
Joined: Sun Jun 15, 2008 12:59 pm
Location: Moldova
Contact:

Post by Danik »

hmmm...it ban's the user .. but only through X undernet ... if X is'nt on the channel it doesnt ban .... it just kick the user .... and thats's all
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Danik wrote:i'm using eggdrop 1.6.19 : downloaded from www.egghelp.org

I checked... and i don't see this ban queue .. in bot's conf
The setting is in the script, and not in your Eggdrop's configuration file.
Post Reply