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.

Restrictor.tcl not working

Old posts that have not been replied to for several years.
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Yeah this is why i don't get why the other format didnt work :<
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

I could use some help here, this is a bug and i have no clue where its coming from.

Code: Select all

bind mode - "* -o" deop:prot 

proc deop:prot {nick uhost hand chan mode target} { 
global botnick 
if {(![channel get $chan paranoid]) || ([string equal -nocase $botnick $nick]) || ([string equal -nocase $target $nick]) || ([matchattr $hand o|o $chan])} { return 0 } 
if {([string match "*-o*" $mode]) && ($target == "$botnick")} { 
putquick "PRIVMSG [cserve $chan] :chanlev $chan $nick -aovgm"
putquick "PRIVMSG [cserve $chan] :deopall $chan"
putserv "MODE $chan +b [maskhost [getchanhost $nick $chan]]" -next 
putserv "KICK $chan $nick :Do not abuse your op!" -next; return 0 
} elseif { ([string match "*-o*" $mode]) && ($target != "")} { 
putquick "MODE $chan -o+b+o $nick [maskhost [getchanhost $nick $chan]] $target" -next 
putquick "KICK $chan $nick :Do not abuse your op." -next; return 0 
} 
} 
proc cserve {chan} {
if {[onchan Q $chan]} {return "Q"} elseif {[onchan L $chan]} {return "L"} else {return ""}
}
Now what happens when someone deops the bot is this.

Code: Select all

[22:57:07] * rd^ sets mode: -o Q13
[22:57:07] * xs4all.nl.quakenet.org sets mode: -oooooo rd^ HauKKa` diabolikal v1per MeTroiD fishbot
[22:57:07] * xs4all.nl.quakenet.org sets mode: -o L
[22:57:07] * xs4all.nl.quakenet.org sets mode: +o L
[22:57:07] * L sets mode: +o Q13
[22:57:08] * Q13 sets mode: +b rd^!*@*
[22:57:08] * Info: This rd^!*@* ban affects rd^
[22:57:08] * L sets mode: +o MeTroiD
[22:57:08] -L- Done.
[22:57:11] * Q13 sets mode: +b L!*@*
[22:57:11] * Info: This L!*@* ban affects @L
[22:57:19] * Q13 sets mode: +b fishbot!*@*
It bans everyone that was previously opped
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Try this.

Code: Select all

bind mode - "-*o*" deop:prot 

proc deop:prot {nick uhost hand chan mode target} {
global botnick
 if {(![channel get $chan paranoid]) || ([string equal -nocase $botnick $nick]) || ([string equal -nocase $target $nick]) || ([matchattr $hand o|o $chan]) || (![string match "*-o*" $mode])} { return 0 } 
 if {([string match "*-o*" $mode])} && ([string equal -nocase $botnick $target]) && (![string equal "L" $nick])} {
  putquick "PRIVMSG [cserve $chan] :chanlev $chan $nick -aovgm"
  putquick "PRIVMSG [cserve $chan] :deopall $chan"
  putquick "MODE $chan -o+b $nick [maskhost [getchanhost $nick $chan]]" -next
  putquick "KICK $chan $nick :Do not abuse your op!" -next; return 0
  }
}

proc cserve {chan} {
 if {([onchan Q $chan])} { return "Q" } 
  elseif {([onchan L $chan])} { return "L" } 
  else { return "" }
}
Also try using putlogs in each putquick line so you can check to see which line here is being called more than once, probobaly because -o has been triggered alot of times. It looks fine to me. Maybe another -o mode bind is being triggered or something of the type. :-?
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Well it doesnt ban because L is deopping as i gave L/Q as user account on my bot, but ill give the putlog's a try a see what its doing
Locked