CraftIRC

42.7k Downloads

Queue size not working?

liquidox opened this issue ยท 1 comments

commented

I am testing anti-spam using these settings:

#Prevent flood by setting a delay (in ms) between messages to IRC and a maximum queue size.
message-delay: 1000
queue-size: 3

On a connect IRC channel I pasted this (in one go) in chat:

hi test
hi test
hi test
hi test
hi test
hi test
hi test

All messages were mirrored in-game. Isn't it supposed to only display 3 in this case, or am I missing the purpose of queue-size?

commented

9 months ago on irc:

06:53 < dx> mbaxter: "queue-size: 5" in the config is completely useless. looks like it's a feature added by Protected but never fully implemented.
06:54 < dx> mbaxter: that value is set with setQueueSize() of Pircbot, but it's only enforced when the messages are sent through sendRawLineViaQueue()... and that's never used
06:57 < dx> mbaxter gWork2002: if it were enforced, if players are sending more than one message per 1000ms (the default value, used to sleep() between sends) and the queue grows over 5 pending messages, those extra messages would be silently dropped
06:58 < dx> i don't think this is desirable
06:58 < dx> so the quickest solution would be to remove the queue-size option from the config
06:59 < dx> i don't know how to 'fix' it into something that makes sense

Now

07:28 <@dx> if you need it, i can rename queue-size to something else, so that old configs won't drop messages (it will remain a useless config entry), and new configs can choose a decent limit for it
07:28 < Joy> I think it'd be cool ye, if not too much hassle :P
07:29 <@dx> oh, even better idea... use-queue: true
07:29 <@dx> or, drop-shit: true
07:29  * dx is not good with names right now