How do you supoose to stick the ban thats never been set correctly? Your using putquick'd mode changes, not eggdrops internal bans to catch this. Perhaps you should use:
proc CorePermBan { nick host hand chan text } {
set who [lindex [split $text] 0]
set why [lrange [split $text] 1 end]
set whohost [stricthost [lindex [split $text] 0] $chan]
putquick "MODE $chan +b $whohost"
putquick "KICK $chan $who :$why"
newchanban $chan $whohost "$nick-PUB" $why 0
stick ban $whohost $chan
}
As you can see, you forgot the $chan parameter of the stick command. You also forgot to put the colon between $who and $why in your putquick'd kick, meaning the ircd would always kick users without giving your entire $why reason. It would've only given the first word used, not the entire sentence. This is what the colon is for.
Last edited by speechles on Wed Jul 15, 2009 8:12 pm, edited 1 time in total.
speechles wrote:How do you supoose to stick the ban thats never been set correctly? Your using putquick'd mode changes, not eggdrops internal bans to catch this. Perhaps you should use:
proc CorePermBan { nick host hand chan text } {
set who [lindex [split $text] 0]
set why [lrange [split $text] 1 end]
set whohost [stricthost [lindex [split $text] 0] $chan]
putquick "MODE $chan +b $whohost"
putquick "KICK $chan $who :$why"
newchanban $chan $whohost "$nick-PUB" $why 0
stick ban $whohost $chan
}
As you can see, you forgot the $chan parameter of the stick command. You also forgot to put the colon between $who and $why in your putquick'd kick, meaning the ircd would always kick users without giving your $why reason.
Yeah, I was trying to do that instead, but the bot isn't setting the ban at all with newchanban, and it's not outputting any errors.
The use of $nick-PUB was to set the owner of the ban to the person's nickname that issued the command plus the tag "-PUB" and Yes, its superfluous but i prefer to include it
As for newchanban not working, you could trying removing the putquick' and stuff, since added a ban via newchanban will already result in a ban and kick of any/all users matching the given address.
arfer:
Regarding $nick-PUB, due to various mechanics in tcl, if you intend to have a dash (-) in the name of a variable, you'll have to enclose it using {} when reading it. Ie: ${nick-PUB}. Otherwise, the dash is taken as the end of the variable name. As such, speechles' and TCL_no_TK's approach is fully valid, although perhaps not the best of practice in demonstration. The proper way to "tag" in the case of other characters than dash, once again you would use the {}; Ie: ${nick}-PUB.
So far, I've seen several different approaches to use newchanban, and all seem perfectly valid. Perhaps focus on figuring out why newchanban does not set the ban on the channel instead?
Branden:
Think you could post your channel settings (use .chaninfo from the dcc chat partyline)? Especially the dynamicbans and enforcebans (shouldn't matter since we've got it sticky though).
Could you check whether the new bans are added to your eggdrop's internal banlist (use .bans all from the dcc chat partyline)?
Also, have you verified that the generated banmask isn't blocked by the server (numerous ircd's these days bounce bans that match already active bans on the channel).
Other things to check, that the ban/invite/exempt-list isn't full, and that your eggdrop's setting match the ircd's capabilities..