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.

Need help with newchanban command

Old posts that have not been replied to for several years.
Locked
m
malaki86
Voice
Posts: 7
Joined: Tue Jul 05, 2005 10:41 am

Need help with newchanban command

Post by malaki86 »

Ok - i'm gonna rip the hair off my legs in a sec, mainly cuz i've already pulled it off my head...

I can't get the newchanban command to do ANYTHING at all. I've read the manual, looked at 100's of scripts, and don't see what the problem is.

here's the line I'm using:
newchanban "$chan" "$sub_mask" "$nick" "$reason" "$::sub_ban_temp"

$chan = the channel
$sub_mask = the users mask
$nick = the users nick that requested the ban
$reason = the $nick's reason for the ban
$::sub_ban_temp = the amount of time for the ban

I did a putlog of the exact line, and this is the response I get:
newchanban #malaki86 *!malaki86@*.res.rr.com MaL Requested 15

However, the newchanban is doing absolutely nothing.

edit:
I just noticed this:
if i set the newchanban
then, kick the user and set the +b for that mask
it DOES unset after the set time.

Should it be like this? (newchanban, then kick, then ban)?

Did i miss something in my conf?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

use [putkick] immediately after [newchanban] to enforce the ban
m
malaki86
Voice
Posts: 7
Joined: Tue Jul 05, 2005 10:41 am

Post by malaki86 »

use [putkick] immediately after [newchanban] to enforce the ban
Tried that - doesn't set the ban.

I have to do it like this:
newchanban "$chan" "$sub_mask" "$nick" "$reason" "$::sub_ban_temp"
putserv "MODE $chan +b $sub_mask"
putkick $chan $target $reason

Then it works - unless someone removes the ban manually.

If they do, the user can then rejoin without getting re-banned automatically. When this happens, the ban is still in the bot, but flagged as "inactive".

It does, however, automatically remove the ban when it expires.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

what do you care whether the ban is set immediately on the channel or set upon banned user entering the channel? in both cases it will be enforced immediately - in the first case by using [putkick] in the script, in the second case automatically by eggdrop's default behaviour

if you don't want bans to be lifted on the channel, use -dynamicbans chan setting
m
malaki86
Voice
Posts: 7
Joined: Tue Jul 05, 2005 10:41 am

Post by malaki86 »

what do you care whether the ban is set immediately on the channel or set upon banned user entering the channel? in both cases it will be enforced immediately - in the first case by using [putkick] in the script, in the second case automatically by eggdrop's default behaviour

if you don't want bans to be lifted on the channel, use -dynamicbans chan setting
Ok - unless i manually set the +b mode with the script, the ban isn't enforced, even though it's there.

If another op removes the ban from the banlist (not from the bot), the user can return and doesn't get re-banned, even though the ban is still in the bot.

On a second note: out of all the scripts i looked at that use the newchanban cmd, none of them have a kick, or manual mode change along with them. But they work...
D
Dizzle
Op
Posts: 109
Joined: Thu Apr 28, 2005 11:21 am
Contact:

Post by Dizzle »

If i use this my ban always gets active on channel

Code: Select all

putserv "KICK $chan $nick 
set ban *!*[string tolower [string range $uhost [string first @ $uhost] end]]
newchanban $chan $ban $comment $reason $bantime

Well, isnt he givin any errors wehn setting ban or when the specific user joins the channel ?
What's this real life ppl keep talking about ??? And where can I download it ???
m
malaki86
Voice
Posts: 7
Joined: Tue Jul 05, 2005 10:41 am

Post by malaki86 »

I'm not getting any errors at all.

The ban sets, but stays inactive.

If i do the mode change (within the bot, and set the ban), then it's active.

If an op removes the ban, it stays in the bot, but inactive.

After the op removes the ban, the user can re-enter, and doesn't get rebanned (even though the ban is still in the bot).
m
malaki86
Voice
Posts: 7
Joined: Tue Jul 05, 2005 10:41 am

Post by malaki86 »

Ok - found something out.

It's something in the settings for the chan i was testing in.
I moved the script to monitor another channel, and it works perfect with just setting the newchanban.

Thanks for the help ;-)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

your channel might be full of bans; when that happens, it's impossible to set a new ban on the channel without removing an older one first
Locked