Hi
I'm trying to script my eggdrop to be able to mute someone on a chan. Instead of voicing everyone else and moderating the chan, I prefer to ban the person (WITHOUT kicking him).
I use the newchanban procedure in the script, and here is my problem :
- with +dynamicbans, the user is kicked (even with -enforceban) which makes sense after all (something to do with the user joining the chan because the ban is not on the chan ? correct me if I'm wrong)
- with -dynamicbans, the user is not kicked (-enforceban) which is great, BUT here is how it looks from the bot's point of view :
<bot> [22:57] #librarian# bans all
<bot> Global bans: (! = not active on #chan)
<bot> Channel bans for #chan: (! = not active, * = not placed by bot)
<bot> ! [ 1] *nick!*@host (expires at 22:58)
<bot> author: reason
<bot> Created 22:57
<bot> * [ 2] *!*user@host (botnick!botname@bothost) (active 00:20)
The channel's banlist :
--- #chan Banlist: Sun Mar 16 22:57:04 *!*user@host botnick!botname@bothost
That is, when I use the newchanban command (I use getchanhost on a nick to get his host) the bot places the ban on the chan and has TWO entries in its own ban list.
(note the difference between the two ban masks is the bot's ban list)
My problem is that after the expiration time, the bot announces :
[22:59] No longer banning *nick!*@host on #chan (expired)
But leaves the ban on the chan. Here is its ban list :
<bot> [23:01] #librarian# bans all
<bot> Global bans: (! = not active on #chan)
<bot> Channel bans for #chan: (! = not active, * = not placed by bot)
<bot> * [ 1] *!*user@host (botnick!botname@bothost) (active 04:15)
I looked around and found that the duplicate entry was because 'newchanban #chan user@host author reason' goes as user!*@host in the bot's banlist BUT the bot places +b *!*user@host on the chan... (bug I think) So I tried with newchanban #chan *!user@host... which was ok (same and unique entry in both banlists) EXCEPT that the bot kicked the user (with -enforcebans)...
Please tell me I'm doing this wrong and I DON'T have to place the ban 'manually' and check every minute if it has expired (as the duration of the 'punishment' is an argument to the mute function)...